diff --git a/src/main/java/com/biutag/supervisiondata/event/ApplicationEvent.java b/src/main/java/com/biutag/supervisiondata/event/ApplicationEvent.java index 0002cbf..534cc24 100644 --- a/src/main/java/com/biutag/supervisiondata/event/ApplicationEvent.java +++ b/src/main/java/com/biutag/supervisiondata/event/ApplicationEvent.java @@ -137,6 +137,7 @@ public class ApplicationEvent { // pointService.syncFatherEducation(initDomain(List.of(102))); // pointService.syncMotherEducation(initDomain(List.of(103))); // pointService.syncDomicileType(initDomain(List.of(104))); + pointService.syncDomicileType(initDomain(List.of(105))); }); } diff --git a/src/main/java/com/biutag/supervisiondata/service/impl/PointServiceImpl.java b/src/main/java/com/biutag/supervisiondata/service/impl/PointServiceImpl.java index 1072141..8e9eddb 100644 --- a/src/main/java/com/biutag/supervisiondata/service/impl/PointServiceImpl.java +++ b/src/main/java/com/biutag/supervisiondata/service/impl/PointServiceImpl.java @@ -301,7 +301,7 @@ public class PointServiceImpl implements PointService { if (oldMap.get(fatherEducation.getGmsfhm()) != null) continue; idCode.put(fatherEducation.getGmsfhm(), 1); - int eduScore = getEduScore(fatherEducation); + int eduScore = getEduScore(fatherEducation, 1); ClueData data = ClueData.builder() .name(personal.getName()) .id(personal.getId().toString()) @@ -342,7 +342,7 @@ public class PointServiceImpl implements PointService { if (oldMap.get(motherEducation.getGmsfhm()) != null) continue; idCode.put(motherEducation.getGmsfhm(), 1); - int eduScore = getEduScore(motherEducation); + int eduScore = getEduScore(motherEducation, 2); ClueData data = ClueData.builder() .name(personal.getName()) .id(personal.getId().toString()) @@ -365,8 +365,14 @@ public class PointServiceImpl implements PointService { taskRepository.updateById(updateTask); } - private static int getEduScore(GBaseCSCZRK fatherEducation) { - return switch (fatherEducation.getFatherEducation()) { + private static int getEduScore(GBaseCSCZRK educations, int type) { + String education = ""; + if (type == 1) { + education = educations.getFatherEducation(); + } else if (type == 2) { + education = educations.getMotherEducation(); + } + return switch (education) { case "研究生", "研究生肄业", "研究生毕业", "大学毕业", "大学本科", "大学肄业", "相当大学毕业" -> 1;// 本科 case "大学专科和专科学校", "相当专科毕业", "专科毕业", "专科肄业" -> 2;// 大专 case "相当高中毕业", "相当中专或中技毕业", "中专中技肄业", "职业高中毕业", "中专毕业", "高中肄业",