Browse Source

fix: 完善单位问题画像、个人问题画像

main
wxc 1 year ago
parent
commit
5ba913bad8
  1. 2
      src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java
  2. 2
      src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java
  3. 2
      src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfilePoliceController.java
  4. 3
      src/main/java/com/biutag/supervision/pojo/model/PoliceNegativeModel.java
  5. 3
      src/main/resources/mapper/ProfilePoliceMapper.xml

2
src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java

@ -41,6 +41,6 @@ public enum ProblemSourcesEnum {
return problemSourcesEnum;
}
}
throw new RuntimeException("无此问题来源");
return null;
}
}

2
src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java

@ -105,7 +105,7 @@ public class ProfileDepartController {
profileDepart.getNegativeInfo().setJcjSize(jcjSize).setJcjBusinessSize(jcjBusinessSize).setZfbaBusinessSize(zfbaBusinessSize).setZfbaSize(zfbaSize);
// 问题来源占比
Map<String, List<Negative>> problemSourcesGroup = list.stream().collect(Collectors.groupingBy(Negative::getProblemSourcesCode));
List<PieItem> problemSourcesList = problemSourcesGroup.keySet().stream().map(key -> new PieItem(ProblemSourcesEnum.get(key).getLabel(), problemSourcesGroup.get(key).size())).toList();
List<PieItem> problemSourcesList = problemSourcesGroup.keySet().stream().map(key -> new PieItem(Optional.ofNullable(ProblemSourcesEnum.get(key)).map(ProblemSourcesEnum::getLabel).orElse(key), problemSourcesGroup.get(key).size())).toList();
profileDepart.setProblemSourcesList(problemSourcesList);
// 业务类型占比
Map<String, List<Negative>> businessTypeGroup = list.stream().collect(Collectors.groupingBy(Negative::getBusinessTypeCode));

2
src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfilePoliceController.java

@ -104,7 +104,7 @@ public class ProfilePoliceController {
.in(Negative::getCheckStatus, List.of(InspectCaseEnum.TRUE.getValue(), InspectCaseEnum.PARTIALLY_TRUE.getValue())));
// 问题来源占比
Map<String, List<Negative>> problemSourcesGroup = list.stream().collect(Collectors.groupingBy(Negative::getProblemSourcesCode));
List<PieItem> problemSourcesList = problemSourcesGroup.keySet().stream().map(key -> new PieItem(ProblemSourcesEnum.get(key).getLabel(), problemSourcesGroup.get(key).size())).toList();
List<PieItem> problemSourcesList = problemSourcesGroup.keySet().stream().map(key -> new PieItem(Optional.ofNullable(ProblemSourcesEnum.get(key)).map(ProblemSourcesEnum::getLabel).orElse(key), problemSourcesGroup.get(key).size())).toList();
profilePolice.setProblemSourcesList(problemSourcesList);
// 业务类型占比
Map<String, List<Negative>> businessTypeGroup = list.stream().collect(Collectors.groupingBy(Negative::getBusinessTypeCode));

3
src/main/java/com/biutag/supervision/pojo/model/PoliceNegativeModel.java

@ -18,6 +18,9 @@ public class PoliceNegativeModel {
private String empNo;
private String IdCode;
private String position;
// 人员属性
private String personType;
// 入职日期
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
private LocalDate employmentDate;

3
src/main/resources/mapper/ProfilePoliceMapper.xml

@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
p.emp_no,
p.position,
p.employment_date,
p.person_type,
d.short_name depart_name,
d1.short_name parent_depart_name,
count( DISTINCT n.id ) verify_size
@ -38,6 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
p.NAME,
p.emp_no,
p.employment_date,
p.position,
p.person_type,
d.short_name,
d1.short_name
ORDER BY

Loading…
Cancel
Save