Browse Source

tests in action

master
esoe 3 months ago
parent
commit
3e738b864b
  1. 9
      gates/src/main/java/ru/mlokoin/gates/controller/v1/EducationsController.java
  2. 9
      gates/src/main/java/ru/mlokoin/gates/model/building/Building.java
  3. 72
      gates/src/main/java/ru/mlokoin/gates/model/course/Course.java
  4. 13
      gates/src/main/java/ru/mlokoin/gates/model/cretarea/ProgramCretarea.java
  5. 75
      gates/src/main/java/ru/mlokoin/gates/model/education/EducatonEntry.java
  6. 12
      gates/src/main/java/ru/mlokoin/gates/model/fs/xlsx/XlsxCell.java
  7. 269
      gates/src/main/java/ru/mlokoin/gates/model/fs/xlsx/XlsxDocumentReestr.java
  8. 33
      gates/src/main/java/ru/mlokoin/gates/model/monitor/AbsentReview.java
  9. 34
      gates/src/main/java/ru/mlokoin/gates/model/monitor/BaseReview.java
  10. 35
      gates/src/main/java/ru/mlokoin/gates/model/monitor/XlsxReview.java
  11. 39
      gates/src/main/java/ru/mlokoin/gates/model/monitoring/EducationsReview.java
  12. 12
      gates/src/main/java/ru/mlokoin/gates/model/organization/Organization.java
  13. 10
      gates/src/main/java/ru/mlokoin/gates/model/program/Program.java
  14. 29
      gates/src/main/java/ru/mlokoin/gates/model/student/Student.java
  15. 10
      gates/src/main/java/ru/mlokoin/gates/model/teacher/Teacher.java
  16. 238
      gates/src/main/java/ru/mlokoin/gates/repository/Storage.java
  17. 139
      gates/src/main/resources/templates/view-as-educations.html
  18. 32
      gates/src/test/java/ru/mlokoin/gates/model/fs/xlsx/XlsxCellTest.java
  19. 64
      gates/src/test/java/ru/mlokoin/gates/model/fs/xlsx/XlsxDocumentReestrTest.java

9
gates/src/main/java/ru/mlokoin/gates/controller/v1/EducationsController.java

@ -18,12 +18,13 @@ import org.springframework.web.reactive.function.client.WebClient; @@ -18,12 +18,13 @@ import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Mono;
import ru.mlokoin.gates.model.building.Building;
import ru.mlokoin.gates.model.course.Course;
import ru.mlokoin.gates.model.course.CourseWraper;
import ru.mlokoin.gates.model.education.EducationEntryWraper;
import ru.mlokoin.gates.model.education.EducatonEntry;
import ru.mlokoin.gates.model.fs.xlsx.XlsxDocument;
import ru.mlokoin.gates.model.fs.xlsx.XlsxDocumentReestr;
import ru.mlokoin.gates.model.monitoring.EducationsReview;
import ru.mlokoin.gates.model.monitor.AbsentReview;
import ru.mlokoin.gates.model.monitor.BaseReview;
import ru.mlokoin.gates.model.monitor.XlsxReview;
import ru.mlokoin.gates.model.organization.Organization;
import ru.mlokoin.gates.model.program.Program;
import ru.mlokoin.gates.model.student.Student;
@ -197,7 +198,9 @@ public class EducationsController { @@ -197,7 +198,9 @@ public class EducationsController {
wraper.setStudents(base_students);
//передача данных в модель
model.addAttribute("review", new EducationsReview());
model.addAttribute("absentReview", new AbsentReview(xlsxEducations, storage));
model.addAttribute("baseReview", new BaseReview(storage));
model.addAttribute("xlsxReview", new XlsxReview(xlsxEducations));
model.addAttribute("wrapEducations", wraper);
model.addAttribute("errors", errors);
model.addAttribute("filename", xlsxEducations.getDocument().getName());

9
gates/src/main/java/ru/mlokoin/gates/model/building/Building.java

@ -1,10 +1,14 @@ @@ -1,10 +1,14 @@
package ru.mlokoin.gates.model.building;
import java.io.Serializable;
import java.util.List;
import java.util.Map.Entry;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import ru.mlokoin.gates.model.fs.xlsx.XlsxCell;
import ru.mlokoin.gates.teh.strings.Stringer;
/**
* Сущность объекта строительства
@ -26,7 +30,12 @@ public class Building implements Serializable{ @@ -26,7 +30,12 @@ public class Building implements Serializable{
this.code_short = code_short;
this.code_full = code_full;
}
public Building(String name_short){
this.setName_short(name_short);
}
public Building(Entry<Integer, List<XlsxCell>> entry) {
this.setName_short(Stringer.clear(entry.getValue().get(19).getContent()));
}
}

72
gates/src/main/java/ru/mlokoin/gates/model/course/Course.java

@ -4,6 +4,7 @@ import java.util.ArrayList; @@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import lombok.AllArgsConstructor;
@ -56,6 +57,29 @@ public class Course { @@ -56,6 +57,29 @@ public class Course {
this.building = building;
}
public Course(Entry<Integer, List<XlsxCell>> entry) {
this.setPlace(Stringer.clear(entry.getValue().get(5).getContent()));
try {
this.setStart_date(new Date(Long.parseLong(Stringer.clear(entry.getValue().get(7).getContent()))));
} catch (Exception e) {
this.setStart_date(null);
}
// this.setStart_date(new Date(Long.parseLong(Stringer.clear(entry.getValue().get(7).getContent()))));
try {
this.setProtocol_date(new Date(Long.parseLong(Stringer.clear(entry.getValue().get(9).getContent()))));
} catch (Exception e) {
this.setProtocol_date(null);
}
// this.setProtocol_date(new Date(Long.parseLong(Stringer.clear(entry.getValue().get(9).getContent())))); // Stringer.clear(entry.getValue().get(9).getContent()));
this.setProtocol_number(Stringer.clear(entry.getValue().get(13).getContent()));
this.setReport_period(Stringer.clear(entry.getValue().get(17).getContent()));
this.setTeacher(new Teacher(entry));
this.setProgram(new Program(entry));
this.setBuilding(new Building(entry));
}
/**
* Консруктор курса из строки xlsx документа
* @param entry
@ -208,39 +232,27 @@ public class Course { @@ -208,39 +232,27 @@ public class Course {
* @return true - если курсы эквивалентны
* false - если курсы различаются
*/
public static boolean isSimilar(Course course1, Course course2) {
if (course1 == null || course2 == null) {
public boolean isSimilar( Course course) {
if (course == null) {
System.out.println("Course is null");
return false;
}
// if (course1.getPlace() != course2.getPlace()) {
// return false;
// }
// if (course1.getStart_date() != course2.getStart_date()) {
// return false;
// }
// if (course1.getProtocol_date() != course2.getProtocol_date()) {
// return false;
// }
if (course1.getProtocol_number() != course2.getProtocol_number()) {
return false;
if (this.getProtocol_number() != null
&& this.getProtocol_number() != ""
&& !this.getProtocol_number().isEmpty()) {
if (this.getProtocol_number().equals(course.getProtocol_number())) {
return true;
}
} else {
if (this.getStart_date().equals(course.getStart_date())
&& this.getBuilding().getName_short().equals(course.getBuilding().getName_short())
&& this.getPlace().equals(course.getPlace())
&& this.getTeacher().getFullName().equals(course.getTeacher().getFullName())
&& this.getProgram().getName().equals(course.getProgram().getName())) {
return true;
}
}
// if (course1.getReport_period() != course2.getReport_period()) {
// return false;
// }
// if (course1.getTeacher() != course2.getTeacher()) {
// return false;
// }
// if (course1.getProgram() != course2.getProgram()) {
// return false;
// }
// if (course1.getBuilding() != course2.getBuilding()) {
// return false;
// }
return true;
return false;
}
/**
*
*/
}

13
gates/src/main/java/ru/mlokoin/gates/model/cretarea/ProgramCretarea.java

@ -1,10 +1,14 @@ @@ -1,10 +1,14 @@
package ru.mlokoin.gates.model.cretarea;
import java.io.Serializable;
import java.util.List;
import java.util.Map.Entry;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import ru.mlokoin.gates.model.fs.xlsx.XlsxCell;
import ru.mlokoin.gates.teh.strings.Stringer;
@NoArgsConstructor
@AllArgsConstructor
@ -25,4 +29,13 @@ public class ProgramCretarea implements Serializable{ @@ -25,4 +29,13 @@ public class ProgramCretarea implements Serializable{
this.name_short = name_short;
}
public ProgramCretarea(Entry<Integer, List<XlsxCell>> entry) {
// исключаем строку заголовка
if (entry.getKey() != 0) {
String cretarea = Stringer.clear(entry.getValue().get(12).getContent());
this.name_short = cretarea;
}
}
}

75
gates/src/main/java/ru/mlokoin/gates/model/education/EducatonEntry.java

@ -13,6 +13,7 @@ import ru.mlokoin.gates.model.organization.Organization; @@ -13,6 +13,7 @@ import ru.mlokoin.gates.model.organization.Organization;
import ru.mlokoin.gates.model.program.Program;
import ru.mlokoin.gates.model.student.Student;
import ru.mlokoin.gates.model.teacher.Teacher;
import ru.mlokoin.gates.teh.strings.Stringer;
@NoArgsConstructor
@AllArgsConstructor
@ -48,6 +49,7 @@ public class EducatonEntry { @@ -48,6 +49,7 @@ public class EducatonEntry {
/**
* Консруктор записи в реестре обученных из строки xlsx документа
* -
* TODO: добавить обработчик null входящих данных
*
* @param entry
* @param base_courses
@ -69,31 +71,10 @@ public class EducatonEntry { @@ -69,31 +71,10 @@ public class EducatonEntry {
* Извлекаем данные из ячеек
*/
Course xlsx_course = new Course(entry, base_teachers, base_programs, base_buildings);
if (xlsx_course.getProtocol_number() != null
&& !xlsx_course.getProtocol_number().isEmpty()
&& xlsx_course.getProtocol_number() != "") {
for (Course base_course : base_courses) {
if (base_course.getProtocol_number().equals(xlsx_course.getProtocol_number())) {
this.course = base_course;
break;
}
}
}
/**
* номер протокола пустой, сравниваем курсы по остальным полям
* -
*/
else{
for (Course base_course : base_courses) {
if (base_course.getPlace().equals(xlsx_course.getPlace())
&& base_course.getStart_date().equals(xlsx_course.getStart_date())
&& base_course.getTeacher().getFullName().equals(xlsx_course.getTeacher().getFullName())
&& base_course.getBuilding().getName_short().equals(xlsx_course.getBuilding().getName_short())
&& base_course.getProgram().getName().equals(xlsx_course.getProgram().getName())) {
this.course = base_course;
break;
}
for (Course base_course : base_courses) {
if(xlsx_course.isSimilar(base_course)){
this.course = base_course;
break;
}
}
@ -114,4 +95,48 @@ public class EducatonEntry { @@ -114,4 +95,48 @@ public class EducatonEntry {
this.sertificate_number = cells.get(14).getContent();
}
}
public EducatonEntry(Entry<Integer, List<XlsxCell>> entry) {
// this(entry, null, null, null, null, null, null);
this.setCourse(new Course(entry));
this.setStudent(new Student(entry));
this.setSertificate_number(Stringer.clear(entry.getValue().get(14).getContent()));
}
/**
* Проверка тождественности записей
*
* @param baseEducatonEntry
* @return true - если записи эквивалентны
* - по номерам удостоверений и курсу
* - по курсу и студенту (если удостоверение отсутствует)
*/
public boolean isSimilar(EducatonEntry educatonEntry) {
if (educatonEntry == null) {
return false;
}
/**
* сравниваем по номеру удостоверения и дате начала курса
*/
if (educatonEntry.getSertificate_number() != null
&& educatonEntry.getSertificate_number() != ""
&& !educatonEntry.getSertificate_number().isEmpty()) {
if (educatonEntry.getSertificate_number().equals(this.getSertificate_number())) {
if (educatonEntry.getCourse().getStart_date().equals(this.getCourse().getStart_date())) {
return true;
}
}
}
/**
* номер удостоверения отсутствует,
* сравниваем по курсу и студенту
*/
else {
if (educatonEntry.getCourse().isSimilar(this.course)
&& educatonEntry.getStudent().isSimilar(this.student)) {
return true;
}
}
return false;
}
}

12
gates/src/main/java/ru/mlokoin/gates/model/fs/xlsx/XlsxCell.java

@ -6,15 +6,15 @@ import lombok.NoArgsConstructor; @@ -6,15 +6,15 @@ import lombok.NoArgsConstructor;
import ru.mlokoin.gates.teh.strings.Stringer;
@Data
@AllArgsConstructor
// @AllArgsConstructor
@NoArgsConstructor
public class XlsxCell {
private String content; //содержимое ячейки
private String textColor; //цвет шрифта
private String bgColor; // цвет заливки ячейки
private String textSize; //8-12-14-24 размеры шрифта
private int textWeight; //жирность: bold (900), normal(500),
private String type;// STRING, NUMERIC, BOOLEAN, FORMULA
// private String textColor; //цвет шрифта
// private String bgColor; // цвет заливки ячейки
// private String textSize; //8-12-14-24 размеры шрифта
// private int textWeight; //жирность: bold (900), normal(500),
// private String type;// STRING, NUMERIC, BOOLEAN, FORMULA
public XlsxCell(String content){
if (Stringer.checkForEmpty(content)) {

269
gates/src/main/java/ru/mlokoin/gates/model/fs/xlsx/XlsxDocumentReestr.java

@ -3,16 +3,17 @@ package ru.mlokoin.gates.model.fs.xlsx; @@ -3,16 +3,17 @@ package ru.mlokoin.gates.model.fs.xlsx;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import ru.mlokoin.gates.model.building.Building;
import ru.mlokoin.gates.model.course.Course;
import ru.mlokoin.gates.model.cretarea.ProgramCretarea;
import ru.mlokoin.gates.model.education.EducatonEntry;
import ru.mlokoin.gates.model.organization.Organization;
import ru.mlokoin.gates.model.program.Program;
import ru.mlokoin.gates.model.student.Student;
import ru.mlokoin.gates.model.teacher.Teacher;
/**
* Класс для извлечения данных из Реестра обученных (educations)
*/
@ -22,6 +23,16 @@ public class XlsxDocumentReestr extends XlsxDocument { @@ -22,6 +23,16 @@ public class XlsxDocumentReestr extends XlsxDocument {
super(xlsx);
}
/**
* Получение списка обучений с вложенными объектами сверенными с базой и содержащими id
* @param base_courses
* @param base_students
* @param base_teachers
* @param base_programs
* @param base_buildings
* @param base_organizations
* @return
*/
public List<EducatonEntry> getEducations(List<Course> base_courses,
List<Student> base_students,
List<Teacher> base_teachers,
@ -31,8 +42,262 @@ public class XlsxDocumentReestr extends XlsxDocument { @@ -31,8 +42,262 @@ public class XlsxDocumentReestr extends XlsxDocument {
List<EducatonEntry> educations = new ArrayList<>();
Map<Integer, List<XlsxCell>> map = getData();
for (Map.Entry<Integer, List<XlsxCell>> entry : map.entrySet()) {
educations.add(new EducatonEntry((Entry<Integer, List<XlsxCell>>) entry, base_courses, base_students, base_teachers, base_programs, base_buildings, base_organizations));
educations.add(new EducatonEntry(entry, base_courses, base_students, base_teachers, base_programs, base_buildings, base_organizations));
}
return educations;
}
/**
* Получить список обучений из xlsx-документа,
* вложенные объекты не сверены с базой, не указаны id
* @return
*/
public List<EducatonEntry> getEducationsAsIs() {
List<EducatonEntry> educations = new ArrayList<>();
Map<Integer, List<XlsxCell>> map = getData();
for (Map.Entry<Integer, List<XlsxCell>> entry : map.entrySet()) {
educations.add(new EducatonEntry(entry));
}
return educations;
}
/**
* Получить список уникальных обучений из xlsx-документа
* @return
*/
public List<EducatonEntry> getUniqueEducations() {
List<EducatonEntry> educations = new ArrayList<>();
Map<Integer, List<XlsxCell>> map = getData();
for (Map.Entry<Integer, List<XlsxCell>> entry : map.entrySet()) {
educations.add(new EducatonEntry(entry));
}
return educations;
}
public int getEducationsCount(){
return getUniqueEducations().size();
}
/**
* Подсчет количества обучений
* @return количество внесенных в реестр обучений
* считаем по количеству строк в документе, отнимаем одну строку, содержащую заголовки
*/
// public int getEducationsCount() {
// if (getData() == null || getData().isEmpty() || getData().size() == 0 || getData().size() == 1) {
// return 0;
// }
// return getData().size() -1;
// }
/**
* Получить список критериев из Реестра обученных
*
* @return список объеков критериев, с заполненными краткими наименованиями критериев.
* не актуализируются по сведениям базы данных
* критерии в перечне соответствуют столбцу в файле, не сортируютс, не фильтруются, не выбираются уникальные
*/
public List<ProgramCretarea> getCretareasAsIs() {
List<ProgramCretarea> programCretareas = new ArrayList<>();
Map<Integer, List<XlsxCell>> map = getData();
for (Map.Entry<Integer, List<XlsxCell>> entry : map.entrySet()) {
if (entry.getKey() != 0) {
programCretareas.add(new ProgramCretarea(entry));
}
}
return programCretareas;
}
/**
* Получить список уникальных критериев из xlsx-документа
* @return
*/
public List<ProgramCretarea> getUniqueCretareas(){
List<ProgramCretarea> programCretareas = getCretareasAsIs();
List<ProgramCretarea> unique = new ArrayList<>();
for (ProgramCretarea programCretarea : programCretareas) {
if (!unique.contains(programCretarea) && programCretarea.getName_short() != "") {
unique.add(programCretarea);
}
}
return unique;
}
/**
* Подсчет количества уникальных критериев
* @return количество уникальных критериев
*/
public int getCretareasCount() {
return getUniqueCretareas().size();
}
public List<Program> getProgramsAsIs() {
List<Program> programs = new ArrayList<>();
Map<Integer, List<XlsxCell>> map = getData();
for (Map.Entry<Integer, List<XlsxCell>> entry : map.entrySet()) {
//исключаем строку заголовков
if (entry.getKey() != 0) {
programs.add(new Program(entry));
}
}
return programs;
}
/**
* Получить список уникальных программ обучения из xlsx-документа
* @return
*/
public List<Program> getUniquePrograms() {
List<Program> programs = getProgramsAsIs();
List<Program> unique = new ArrayList<>();
for (Program program : programs) {
if (!unique.contains(program) && program.getName() != "") {
unique.add(program);
}
}
return unique;
}
/**
* Подсчет количества уникальных программ
* @return
*/
public int getProgramsCount() {
return getUniquePrograms().size();
}
public List<Building> getBuildingsAsIs() {
List<Building> buildings = new ArrayList<>();
Map<Integer, List<XlsxCell>> map = getData();
for (Map.Entry<Integer, List<XlsxCell>> entry : map.entrySet()) {
//исключаем строку заголовков
if (entry.getKey() != 0) {
buildings.add(new Building(entry));
}
}
return buildings;
}
public List<Building> getUniqueBuildings() {
List<Building> buildings = getBuildingsAsIs();
List<Building> unique = new ArrayList<>();
for (Building building : buildings) {
if (!unique.contains(building) && building.getName_short() != "") {
unique.add(building);
}
}
return unique;
}
public int getBuildingsCount() {
return getUniqueBuildings().size();
}
public List<Organization> getOrganizationsAsIs() {
List<Organization> organizations = new ArrayList<>();
Map<Integer, List<XlsxCell>> map = getData();
for (Map.Entry<Integer, List<XlsxCell>> entry : map.entrySet()) {
//исключаем строку заголовков
if (entry.getKey() != 0) {
organizations.add(new Organization(entry));
}
}
return organizations;
}
public List<Organization> getUniqueOrganizations() {
List<Organization> organizations = getOrganizationsAsIs();
List<Organization> unique = new ArrayList<>();
for (Organization organization : organizations) {
if (!unique.contains(organization) && organization.getName_full() != "") {
unique.add(organization);
}
}
return unique;
}
public int getOrganizationsCount() {
return getUniqueOrganizations().size();
}
public List<Teacher> getTeachersAsIs() {
List<Teacher> teachers = new ArrayList<>();
Map<Integer, List<XlsxCell>> map = getData();
for (Map.Entry<Integer, List<XlsxCell>> entry : map.entrySet()) {
//исключаем строку заголовков
if (entry.getKey() != 0) {
teachers.add(new Teacher(entry));
}
}
return teachers;
}
public List<Teacher> getUniqueTeachers() {
List<Teacher> teachers = getTeachersAsIs();
List<Teacher> unique = new ArrayList<>();
for (Teacher teacher : teachers) {
if (!unique.contains(teacher) && teacher.getFullName() != "") {
unique.add(teacher);
}
}
return unique;
}
public int getTeachersCount() {
return getUniqueTeachers().size();
}
public List<Course> getCoursesAsIs() {
List<Course> courses = new ArrayList<>();
Map<Integer, List<XlsxCell>> map = getData();
for (Map.Entry<Integer, List<XlsxCell>> entry : map.entrySet()) {
//исключаем строку заголовков
if (entry.getKey() != 0) {
courses.add(new Course(entry));
}
}
return courses;
}
public List<Course> getUniqueCourses() {
List<Course> courses = getCoursesAsIs();
List<Course> unique = new ArrayList<>();
for (Course course : courses) {
if (!unique.contains(course)) {
unique.add(course);
}
}
return unique;
}
public int getCoursesCount() {
return getUniqueCourses().size();
}
public List<Student> getStudentsAsIs() {
List<Student> students = new ArrayList<>();
Map<Integer, List<XlsxCell>> map = getData();
for (Map.Entry<Integer, List<XlsxCell>> entry : map.entrySet()) {
//исключаем строку заголовков
if (entry.getKey() != 0) {
students.add(new Student(entry));
}
}
return students;
}
public List<Student> getUniqueStudents() {
List<Student> students = getStudentsAsIs();
List<Student> unique = new ArrayList<>();
for (Student student : students) {
if (!unique.contains(student)) {
unique.add(student);
}
}
return unique;
}
public int getStudentsCount() {
return getUniqueStudents().size();
}
}

33
gates/src/main/java/ru/mlokoin/gates/model/monitor/AbsentReview.java

@ -0,0 +1,33 @@ @@ -0,0 +1,33 @@
package ru.mlokoin.gates.model.monitor;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import ru.mlokoin.gates.model.fs.xlsx.XlsxDocumentReestr;
import ru.mlokoin.gates.repository.Storage;
@NoArgsConstructor
@AllArgsConstructor
@Data
public class AbsentReview {
private int educationsCount;
private int programsCount;
private int coursesCount;
private int buildingsCount;
private int teachersCount;
private int studentsCount;
private int organizationsCount;
private int programCretareaCount;
public AbsentReview(XlsxDocumentReestr xlsxEducations, Storage storage) {
setBuildingsCount(storage.getAbsentBuildingsCount(xlsxEducations.getUniqueBuildings()));
setCoursesCount(storage.getAbsentCoursesCount(xlsxEducations.getUniqueCourses()));
setProgramCretareaCount(storage.getAbsentProgramsCount(xlsxEducations.getUniquePrograms()));
setTeachersCount(storage.getAbsentTeachersCount(xlsxEducations.getUniqueTeachers()));
setStudentsCount(storage.getAbsentStudentsCount(xlsxEducations.getUniqueStudents()));
setOrganizationsCount(storage.getAbsentOrganizationsCount(xlsxEducations.getUniqueOrganizations()));
setEducationsCount(storage.getAbsentEducationsCount(xlsxEducations.getUniqueEducations()));
setProgramCretareaCount(storage.getAbsentCretareasCount(xlsxEducations.getUniqueCretareas()));
}
}

34
gates/src/main/java/ru/mlokoin/gates/model/monitor/BaseReview.java

@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
package ru.mlokoin.gates.model.monitor;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import ru.mlokoin.gates.repository.Storage;
@AllArgsConstructor
@NoArgsConstructor
@Data
public class BaseReview implements Serializable{
private int educationsCount;
private int programsCount;
private int coursesCount;
private int buildingsCount;
private int teachersCount;
private int studentsCount;
private int organizationsCount;
private int programCretareaCount;
public BaseReview (Storage storage){
setBuildingsCount(storage.getBuildingsCount());
setCoursesCount(storage.getCoursesCount());
setEducationsCount(storage.getEducationsCount());
setProgramsCount(storage.getProgramsCount());
setStudentsCount(storage.getStudentsCount());
setTeachersCount(storage.getTeachersCount());
setOrganizationsCount(storage.getOrganizationsCount());
setProgramCretareaCount(storage.getCretareasCount());
}
}

35
gates/src/main/java/ru/mlokoin/gates/model/monitor/XlsxReview.java

@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
package ru.mlokoin.gates.model.monitor;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import ru.mlokoin.gates.model.fs.xlsx.XlsxDocumentReestr;
@NoArgsConstructor
@AllArgsConstructor
@Data
public class XlsxReview implements Serializable {
private int educationsCount;
private int programsCount;
private int coursesCount;
private int buildingsCount;
private int teachersCount;
private int studentsCount;
private int organizationsCount;
private int programCretareaCount;
public XlsxReview(XlsxDocumentReestr xlsx){
setBuildingsCount(xlsx.getBuildingsCount());
setCoursesCount(xlsx.getCoursesCount());
setEducationsCount(xlsx.getEducationsCount());
setProgramsCount(xlsx.getProgramsCount());
setStudentsCount(xlsx.getStudentsCount());
setTeachersCount(xlsx.getTeachersCount());
setOrganizationsCount(xlsx.getOrganizationsCount());
setProgramCretareaCount(xlsx.getCretareasCount());
}
}

39
gates/src/main/java/ru/mlokoin/gates/model/monitoring/EducationsReview.java

@ -1,39 +0,0 @@ @@ -1,39 +0,0 @@
package ru.mlokoin.gates.model.monitoring;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.reactive.function.client.WebClient;
import ru.mlokoin.gates.repository.Storage;
/**
* Класс, предоставляющй обзор содержимого
* - реестра обученных в xlsx-файле
* - реестра обученных в базе данных
* - и сравнение этих данных
*/
@Service
public class EducationsReview {
@Autowired
private WebClient client;
@Autowired
private Storage storage;
public int getBaseEducationsCount(){
return storage.getBaseEducationEntries().size();
}
public int getFileEducationsCount(String id){
//вернули размер документа минус строка заголовков
return storage.getXlsxDocument(id).getData().size() - 1;
}
}

12
gates/src/main/java/ru/mlokoin/gates/model/organization/Organization.java

@ -1,10 +1,14 @@ @@ -1,10 +1,14 @@
package ru.mlokoin.gates.model.organization;
import java.io.Serializable;
import java.util.List;
import java.util.Map.Entry;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import ru.mlokoin.gates.model.fs.xlsx.XlsxCell;
import ru.mlokoin.gates.teh.strings.Stringer;
/**
* Сущность организации
@ -35,4 +39,12 @@ public class Organization implements Serializable{ @@ -35,4 +39,12 @@ public class Organization implements Serializable{
this.type = type;
this.inn = inn;
}
public Organization(Entry<Integer, List<XlsxCell>> entry) {
this.setName_full(Stringer.clear(entry.getValue().get(1).getContent()));
}
public boolean isSimilar(Organization organization) {
return this.getName_full().equals(organization.getName_full());
}
}

10
gates/src/main/java/ru/mlokoin/gates/model/program/Program.java

@ -1,9 +1,14 @@ @@ -1,9 +1,14 @@
package ru.mlokoin.gates.model.program;
import java.util.List;
import java.util.Map.Entry;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import ru.mlokoin.gates.model.cretarea.ProgramCretarea;
import ru.mlokoin.gates.model.fs.xlsx.XlsxCell;
import ru.mlokoin.gates.teh.strings.Stringer;
@NoArgsConstructor
@AllArgsConstructor
@ -43,7 +48,8 @@ public class Program { @@ -43,7 +48,8 @@ public class Program {
public Program(String name){
this.setName(name);
}
public Program(Entry<Integer, List<XlsxCell>> entry) {
this.setName(Stringer.clear(entry.getValue().get(6).getContent()));
}
}

29
gates/src/main/java/ru/mlokoin/gates/model/student/Student.java

@ -4,6 +4,7 @@ import java.io.Serializable; @@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import lombok.AllArgsConstructor;
import lombok.Data;
@ -82,11 +83,37 @@ public class Student implements Serializable{ @@ -82,11 +83,37 @@ public class Student implements Serializable{
// Поиск организации
String organization = Stringer.clear(cells.get(1).getContent());
this.organization = base_organizations
if (base_organizations != null) {
this.organization = base_organizations
.stream()
.filter(org -> org.getName_full().equals(organization))
.findFirst()
.orElse(null);
} else {
this.organization = new Organization(entry);
}
}
}
public Student(Entry<Integer, List<XlsxCell>> entry) {
this(entry, null);
}
public boolean isSimilar(Student student) {
if (student != null
&& this.first_name.equals(student.getFirst_name())
&& this.second_name.equals(student.getSecond_name())
&& this.last_name.equals(student.getLast_name())
&& this.profession.equals(student.getProfession())
&& this.direction.equals(student.getDirection())
) {
if (this.organization != null && student.getOrganization() != null) {
return this.organization.isSimilar(student.getOrganization());
}
return true;
}
return false;
}
}

10
gates/src/main/java/ru/mlokoin/gates/model/teacher/Teacher.java

@ -1,10 +1,13 @@ @@ -1,10 +1,13 @@
package ru.mlokoin.gates.model.teacher;
import java.io.Serializable;
import java.util.List;
import java.util.Map.Entry;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import ru.mlokoin.gates.model.fs.xlsx.XlsxCell;
import ru.mlokoin.gates.teh.strings.Naimer;
import ru.mlokoin.gates.teh.strings.Stringer;
@ -93,4 +96,11 @@ public class Teacher implements Serializable{ @@ -93,4 +96,11 @@ public class Teacher implements Serializable{
employee_id = Stringer.clear(employee_id);
}
}
public Teacher(Entry<Integer, List<XlsxCell>> entry) {
String fio = entry.getValue().get(18).getContent();
this.setFirst_name(Naimer.getFirstNameOf(fio));
this.setSecond_name(Naimer.getSecondNameOf(fio));
this.setLast_name(Naimer.getLastNameOf(fio));
}
}

238
gates/src/main/java/ru/mlokoin/gates/repository/Storage.java

@ -95,6 +95,33 @@ public class Storage { @@ -95,6 +95,33 @@ public class Storage {
return list;
}
public List<Program> getAbsentPrograms(List<Program> xlsxList) {
List<Program> baseList = getBasePrograms();
if (xlsxList == null || xlsxList.isEmpty()) {
return new ArrayList<Program>();
}
List<Program> result = new ArrayList<>(xlsxList);
if (baseList == null || baseList.isEmpty()) {
return result;
}
for (Program program : xlsxList) {
for (Program baseProgram : baseList) {
if (program.getName().equals(baseProgram.getName())) {
result.remove(program);
break;
}
}
}
return result;
}
public int getAbsentProgramsCount(List<Program> xlsxList) {
return getAbsentPrograms(xlsxList).size();
}
/**
* Получение перечня объектов строительства из базы
* @param id
@ -110,6 +137,36 @@ public class Storage { @@ -110,6 +137,36 @@ public class Storage {
return list;
}
public List<Building> getAbsentBuildings(List<Building> xlsxList) {
List<Building> baseList = getBaseBuildings();
if (xlsxList == null || xlsxList.isEmpty()) {
return new ArrayList<Building>();
}
List<Building> result = new ArrayList<>(xlsxList);
if (baseList == null || baseList.isEmpty()) {
return result;
}
for (Building building : xlsxList) {
for (Building baseBuilding : baseList) {
if (building.getName_short().equals(baseBuilding.getName_short())) {
result.remove(building);
break;
}
}
}
return result;
}
public int getAbsentBuildingsCount(List<Building> xlsxList) {
return getAbsentBuildings(xlsxList).size();
}
public int getBuildingsCount() {
return getBaseBuildings().size();
}
/**
* Получение списка курсов из базы данных
*/
@ -123,6 +180,32 @@ public class Storage { @@ -123,6 +180,32 @@ public class Storage {
return list;
}
public List<Course> getAbsentCourses(List<Course> xlsxList) {
List<Course> baseList = getBaseCourses();
if (xlsxList == null || xlsxList.isEmpty()) {
return new ArrayList<Course>();
}
List<Course> result = new ArrayList<>(xlsxList);
if (baseList == null || baseList.isEmpty()) {
return result;
}
for (Course course : xlsxList) {
for (Course baseCourse : baseList) {
if(course.isSimilar(baseCourse)) {
result.remove(course);
break;
}
}
}
return result;
}
public int getAbsentCoursesCount(List<Course> xlsxList) {
return getAbsentCourses(xlsxList).size();
}
/**
* Получение перечня преподавателей из базы данных
*/
@ -167,6 +250,8 @@ public class Storage { @@ -167,6 +250,8 @@ public class Storage {
return list;
}
/**
* Получение списка преподавателей, отсутствующих в базе данных (новых преподавателей)
*
@ -195,6 +280,10 @@ public class Storage { @@ -195,6 +280,10 @@ public class Storage {
return result;
}
public List<Teacher> getAbsentTeachers(List<Teacher> xlsxList) {
return getAbsentTeachers(xlsxList, getBaseTeachers());
}
public List<Teacher> sortTeachers(List<Teacher> list) {
System.out.println("Сортировка списка преподавателей ...");
Comparator<Teacher> compareBySecondName = Comparator
@ -206,6 +295,10 @@ public class Storage { @@ -206,6 +295,10 @@ public class Storage {
.collect(Collectors.toCollection(ArrayList::new));
}
public int getAbsentTeachersCount(List<Teacher> uniqueTeachers) {
return getAbsentTeachers(uniqueTeachers).size();
}
/**
* Получение списка критериев из баз данных
@ -220,6 +313,34 @@ public class Storage { @@ -220,6 +313,34 @@ public class Storage {
return list;
}
public List<ProgramCretarea> getAbsentCretareas(List<ProgramCretarea> xlsxList) {
List<ProgramCretarea> baseList = getBaseCretareas();
if (xlsxList == null || xlsxList.isEmpty()) {
return new ArrayList<ProgramCretarea>();
}
List<ProgramCretarea> result = new ArrayList<>(xlsxList);
if (baseList == null || baseList.isEmpty()) {
return result;
}
for (ProgramCretarea xlsxCretarea : xlsxList) {
for (ProgramCretarea baseCretarea : baseList) {
if (xlsxCretarea.getName_short().equals(baseCretarea.getName_short())) {
result.remove(xlsxCretarea);
break;
}
}
}
return result;
}
public int getAbsentCretareasCount(List<ProgramCretarea> xlsxList) {
return getAbsentCretareas(xlsxList).size();
}
/**
* Получение списка организаций из базы данных
*/
@ -233,6 +354,32 @@ public class Storage { @@ -233,6 +354,32 @@ public class Storage {
return list;
}
public List<Organization> getAbsentOrganizations(List<Organization> xlsxList) {
List<Organization> baseList = getBaseOrganizations();
if (xlsxList == null || xlsxList.isEmpty()) {
return new ArrayList<Organization>();
}
List<Organization> result = new ArrayList<>(xlsxList);
if (baseList == null || baseList.isEmpty()) {
return result;
}
for (Organization xlsxOrganization : xlsxList) {
for (Organization baseOrganization : baseList) {
if (xlsxOrganization.getName_full().equals(baseOrganization.getName_full())) {
result.remove(xlsxOrganization);
break;
}
}
}
return result;
}
public int getAbsentOrganizationsCount(List<Organization> xlsxList) {
return getAbsentOrganizations(xlsxList).size();
}
/**
* Получение списка студентов из базы данных
*/
@ -246,6 +393,39 @@ public class Storage { @@ -246,6 +393,39 @@ public class Storage {
return list;
}
public List<Student> getAbsentStudents(List<Student> xlsxList) {
List<Student> baseList = getBaseStudents();
if (xlsxList == null || xlsxList.isEmpty()) {
return new ArrayList<Student>();
}
List<Student> result = new ArrayList<>(xlsxList);
if (baseList == null || baseList.isEmpty()) {
return result;
}
for (Student xlsxStudent : xlsxList) {
for (Student baseStudent : baseList) {
if (xlsxStudent.getSecond_name().equals(baseStudent.getSecond_name())
&& xlsxStudent.getFirst_name().equals(baseStudent.getFirst_name())
&& xlsxStudent.getLast_name().equals(baseStudent.getLast_name())
&& xlsxStudent.getProfession().equals(baseStudent.getProfession())
&& xlsxStudent.getDirection().equals(baseStudent.getDirection())
&& xlsxStudent.getProfession().equals(baseStudent.getProfession())
&& xlsxStudent.getOrganization().getName_full().equals(baseStudent.getOrganization().getName_full())) {
result.remove(xlsxStudent);
break;
}
}
}
return result;
}
public int getAbsentStudentsCount(List<Student> xlsxList) {
return getAbsentStudents(xlsxList).size();
}
public List<EducatonEntry> getBaseEducationEntries() {
System.out.println("Получение списка записей об обучениях из базы данных ...");
List<EducatonEntry> list = client.method(HttpMethod.GET)
@ -256,10 +436,68 @@ public class Storage { @@ -256,10 +436,68 @@ public class Storage {
return list;
}
private List<EducatonEntry> getAbsentEducationEntries(List<EducatonEntry> xlsxList) {
List<EducatonEntry> baseList = getBaseEducationEntries();
if (xlsxList == null || xlsxList.isEmpty()) {
return new ArrayList<EducatonEntry>();
}
List<EducatonEntry> result = new ArrayList<>(xlsxList);
if (baseList == null || baseList.isEmpty()) {
return result;
}
for (EducatonEntry xlsxEducatonEntry : xlsxList) {
for (EducatonEntry baseEducatonEntry : baseList) {
if (xlsxEducatonEntry.isSimilar(baseEducatonEntry)) {
result.remove(xlsxEducatonEntry);
break;
}
}
}
return result;
}
public int getAbsentEducationsCount(List<EducatonEntry> uniqueEducations) {
return getAbsentEducationEntries(uniqueEducations).size();
}
public int getCoursesCount() {
return getBaseCourses().size();
}
public int getEducationsCount() {
return getBaseEducationEntries().size();
}
public int getProgramsCount() {
return getBasePrograms().size();
}
public int getStudentsCount() {
return getBaseStudents().size();
}
public int getTeachersCount() {
return getBaseTeachers().size();
}
public int getCretareasCount() {
return getBaseCretareas().size();
}
public int getOrganizationsCount() {
return getBaseOrganizations().size();
}
}

139
gates/src/main/resources/templates/view-as-educations.html

@ -23,48 +23,83 @@ xmlns:th="http://www.thymeleaf.org"> @@ -23,48 +23,83 @@ xmlns:th="http://www.thymeleaf.org">
</header>
<main>
<div class="doc-info">
<h2>Общие сведения по документу:</h2>
<ul>
<li>Наименование файла:
<span th:text="${filename}"></span>
</li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<div class="controls">
<h2>CONTROLS:</h2>
<form th:action="@{/program-cretareas/check/{id}(id=${id})}" th:method="get">
<input type="submit" value="CHECK-CRETAREAS"/>
</form>
<form th:action="@{/programs/check/{id}(id=${id})}" th:method="get">
<input type="submit" value="CHECK-PROGRAMS"/>
</form>
<form th:action="@{/teachers/check/{id}(id=${id})}" th:method="get">
<input type="submit" value="CHECK-TEACHERS"/>
</form>
<form th:action="@{/buildings/check/{id}(id=${id})}" th:method="get">
<input type="submit" value="CHECK-BUILDINGS"/>
</form>
<form th:action="@{/organizations/check/{id}(id=${id})}" th:method="get">
<input type="submit" value="CHECK-ORGANIZATION"/>
</form>
<form th:action="@{/courses/check/{id}(id=${id})}" th:method="get">
<input type="submit" value="CHECK-COURSES"/>
</form>
<form th:action="@{/students/check/{id}(id=${id})}" th:method="get">
<input type="submit" value="CHECK-STUDENTS"/>
</form>
<form th:action="@{#}" th:method="get">
<input type="submit" value="POST-AS-EDUCATIONS"/>
</form>
<h2>DASHBOARD:</h2>
<table rules="all">
<thead>
<th><span>Параметр</span></th>
<th>В файле: <span th:text="${filename}"></span></th>
<th>В базе данных</th>
<th><span>отсутствующие в базе</span></th>
</thead>
<tbody>
<tr>
<td>
<a th:href="@{/program-cretareas/check/{id}(id=${id})}">Критерии:</a>
</td>
<td><span th:text="${xlsxReview.programCretareaCount}"></span></td>
<td><span th:text="${baseReview.programCretareaCount}"></span></td>
<td><span th:text="${absentReview.programCretareaCount}"></span></td>
</tr>
<tr>
<td>
<a th:href="@{/programs/check/{id}(id=${id})}">Программы:</a>
</td>
<td><span th:text="${xlsxReview.programsCount}"></span></td>
<td><span th:text="${baseReview.programsCount}"></span></td>
<td><span th:text="${absentReview.programsCount}"></span></td>
</tr>
<tr>
<td>
<a th:href="@{/teachers/check/{id}(id=${id})}">Преподаватели:</a>
</td>
<td><span th:text="${xlsxReview.teachersCount}"></span></td>
<td><span th:text="${baseReview.teachersCount}"></span></td>
<td><span th:text="${absentReview.teachersCount}"></span></td>
</tr>
<tr>
<td>
<a th:href="@{/buildings/check/{id}(id=${id})}">Объекты строительства:</a>
</td>
<td><span th:text="${xlsxReview.buildingsCount}"></span></td>
<td><span th:text="${baseReview.buildingsCount}"></span></td>
<td><span th:text="${absentReview.buildingsCount}"></span></td>
</tr>
<tr>
<td>
<a th:href="@{/organizations/check/{id}(id=${id})}">Организации:</a>
</td>
<td><span th:text="${xlsxReview.organizationsCount}"></span></td>
<td><span th:text="${baseReview.organizationsCount}"></span></td>
<td><span th:text="${absentReview.organizationsCount}"></span></td>
</tr>
<tr>
<td>
<a th:href="@{/courses/check/{id}(id=${id})}">Курсы:</a>
</td>
<td><span th:text="${xlsxReview.coursesCount}"></span></td>
<td><span th:text="${baseReview.coursesCount}"></span></td>
<td><span th:text="${absentReview.coursesCount}"></span></td>
</tr>
<tr>
<td>
<a th:href="@{/students/check/{id}(id=${id})}">Студенты:</a>
</td>
<td><span th:text="${xlsxReview.studentsCount}"></span></td>
<td><span th:text="${baseReview.studentsCount}"></span></td>
<td><span th:text="${absentReview.studentsCount}"></span></td>
</tr>
<tr>
<td>
<a th:href="@{/document/educations/view/{id}(id=${id})}">Обучения:</a>
</td>
<td><span th:text="${xlsxReview.educationsCount}"></span></td>
<td><span th:text="${baseReview.educationsCount}"></span></td>
<td><span th:text="${absentReview.educationsCount}"></span></td>
</tr>
</tbody>
</table>
</div>
<div class="errors"></div>
<hr>
@ -106,28 +141,8 @@ xmlns:th="http://www.thymeleaf.org"> @@ -106,28 +141,8 @@ xmlns:th="http://www.thymeleaf.org">
</table>
</form>
</div>
<!-- <hr>
<div class="main-wraper">
<table rules="all">
<caption th:text="${filename}"></caption>
<thead>
<tr>
<th th:each="header : ${headers}">
<span th:text="${header.content}"></span>
</th>
</tr>
</thead>
<tbody>
<tr th:each="row: ${xlsx.values()}">
<td th:if="${rowStat.count} &gt; 1" th:each="cell : ${row}">
<span th:text="${cell.content}"></span>
</td>
</tr>
</tbody>
</table>
</div> -->
<hr>
<!-- Пометки -->
<h2>view-as-educations (предусмотреть): </h2>
<ol>
<li>Добавиь на страницу обработки ошибок и результатов отработки проверок</li>

32
gates/src/test/java/ru/mlokoin/gates/model/fs/xlsx/XlsxCellTest.java

@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
package ru.mlokoin.gates.model.fs.xlsx;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
public class XlsxCellTest {
@Test
public void testConstructorWithEmptyContent() {
XlsxCell cell = new XlsxCell("");
assertEquals("", cell.getContent());
}
@Test
public void testConstructorWithNonEmptyContent() {
XlsxCell cell = new XlsxCell("Безопасные методы и приемы выполнения работ");
assertEquals("Безопасные методы и приемы выполнения работ", cell.getContent());
}
@Test
public void testConstructorWithNullContent() {
XlsxCell cell = new XlsxCell(null);
assertEquals("", cell.getContent());
}
@Test
public void testConstructorWithDertyContent(){
XlsxCell cell = new XlsxCell(" Безопасные методы и \t приемы выполнения \n работ в ограниченных и замкнутых пространствах для работников 3 группы ");
assertEquals("Безопасные методы и приемы выполнения работ в ограниченных и замкнутых пространствах для работников 3 группы", cell.getContent());
}
}

64
gates/src/test/java/ru/mlokoin/gates/model/fs/xlsx/XlsxDocumentReestrTest.java

@ -0,0 +1,64 @@ @@ -0,0 +1,64 @@
package ru.mlokoin.gates.model.fs.xlsx;
import org.junit.jupiter.api.Test;
import ru.mlokoin.gates.model.cretarea.ProgramCretarea;
import ru.mlokoin.gates.model.fs.xlsx.XlsxDocumentReestr;
import ru.mlokoin.gates.model.fs.xlsx.XlsxDocument;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class XlsxDocumentReestrTest {
// @Test
// public void testGetCretareasAsIs_EmptyDataMap() {
// XlsxCell c1 = new XlsxCell("");
// XlsxDocument xlsx = new XlsxDocument();
// xlsx.setData(null);
// xlsx.set
// XlsxDocumentReestr reestr = new XlsxDocumentReestr(xlsx);
// reestr.setData(new HashMap<>());
// List<ProgramCretarea> result = reestr.getCretareasAsIs();
// assertTrue(result.isEmpty());
// }
// @Test
// public void testGetCretareasAsIs_DataMapWithOnlyOneEntry() {
// XlsxDocumentReestr reestr = new XlsxDocumentReestr();
// Map<Integer, List<XlsxCell>> data = new HashMap<>();
// data.put(0, new ArrayList<>());
// reestr.setData(data);
// List<ProgramCretarea> result = reestr.getCretareasAsIs();
// assertTrue(result.isEmpty());
// }
// @Test
// public void testGetCretareasAsIs_DataMapWithMultipleEntries() {
// XlsxDocumentReestr reestr = new XlsxDocumentReestr();
// Map<Integer, List<XlsxCell>> data = new HashMap<>();
// data.put(1, new ArrayList<>());
// data.put(2, new ArrayList<>());
// reestr.setData(data);
// List<ProgramCretarea> result = reestr.getCretareasAsIs();
// assertEquals(2, result.size());
// }
// @Test
// public void testGetCretareasAsIs_DataMapWithNullValues() {
// XlsxDocumentReestr reestr = new XlsxDocumentReestr();
// Map<Integer, List<XlsxCell>> data = new HashMap<>();
// data.put(1, null);
// reestr.setData(data);
// List<ProgramCretarea> result = reestr.getCretareasAsIs();
// assertTrue(result.isEmpty());
// }
}
Loading…
Cancel
Save