Browse Source

修复母亲文化程度报错问题

master
sjh 1 year ago
parent
commit
c83429f446
  1. 1
      src/main/java/com/biutag/supervisiondata/event/ApplicationEvent.java
  2. 14
      src/main/java/com/biutag/supervisiondata/service/impl/PointServiceImpl.java

1
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)));
});
}

14
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 "相当高中毕业", "相当中专或中技毕业", "中专中技肄业", "职业高中毕业", "中专毕业", "高中肄业",

Loading…
Cancel
Save