Browse Source

250108

main
wxc 11 months ago
parent
commit
3b425b0adc
  1. 24
      src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfileDepartController.java
  2. 12
      src/main/java/com/biutag/supervision/pojo/domain/ProfileDepart.java
  3. 1
      src/main/java/com/biutag/supervision/pojo/entity/DataCaseVerif.java
  4. 2
      src/main/java/com/biutag/supervision/service/NegativeWorkService.java

24
src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfileDepartController.java

@ -50,6 +50,7 @@ public class ProfileDepartController {
private final NegativeScoreService negativeScoreService;
private final NegativeScoreDepartService negativeScoreDepartService;
private final NegativeProblemRelationService negativeProblemRelationService;
@GetMapping
public Result<Page<DepartNegativeModel>> list(DepartNegativeQueryParam param) {
@ -87,9 +88,12 @@ public class ProfileDepartController {
.between(NegativeScoreDepart::getDiscoveryTime, beginTime, endTime));
List<String> negativeIds = list.stream().map(NegativeScoreDepart::getNegativeId).toList();
int negativePoliceSize = negativeIds.isEmpty() ? 0 : profileDepartMapper.countByNegativeIdsAndPersonTypes(negativeIds, List.of(PersonTypeEnum.police.getValue()));
if (negativeIds.isEmpty()) {
return Result.success(profileDepart);
}
int negativePoliceSize = profileDepartMapper.countByNegativeIdsAndPersonTypes(negativeIds, List.of(PersonTypeEnum.police.getValue()));
profileDepart.getDepartInfo().setNegativePoliceSize(negativePoliceSize);
int negativeAuxSize = negativeIds.isEmpty() ? 0 : profileDepartMapper.countByNegativeIdsAndPersonTypes(negativeIds, List.of(PersonTypeEnum.aux.getValue(), PersonTypeEnum.xj.getValue()));
int negativeAuxSize = profileDepartMapper.countByNegativeIdsAndPersonTypes(negativeIds, List.of(PersonTypeEnum.aux.getValue(), PersonTypeEnum.xj.getValue()));
profileDepart.getDepartInfo().setNegativeAuxSize(negativeAuxSize);
profileDepart.getNegativeInfo().setSize(list.size());
@ -132,18 +136,24 @@ public class ProfileDepartController {
List<BarItem> policeBarList = profileDepartMapper.selectPoliceNegativeCount(departId, beginTime, endTime);
profileDepart.setPoliceBarList(policeBarList);
// 风险问题构成 雷达图
List<BarItem> problemTypeBarList = profileDepartMapper.selectProblemType(departId, beginTime, endTime);
int max = problemTypeBarList.stream().mapToInt(BarItem::getValue).max().getAsInt();
List<ProfileDepart.RadarIndicatorItem> problemTypeRadarIndicator = problemTypeBarList.stream().map(item -> {
List<BarItem> problemTypeList = profileDepartMapper.selectProblemType(departId, beginTime, endTime);
int max = problemTypeList.stream().mapToInt(BarItem::getValue).max().getAsInt();
List<ProfileDepart.RadarIndicatorItem> problemTypeRadarIndicator = problemTypeList.stream().map(item -> {
ProfileDepart.RadarIndicatorItem radarIndicatorItem = new ProfileDepart.RadarIndicatorItem();
radarIndicatorItem.setMax(max);
radarIndicatorItem.setName(item.getLabel());
return radarIndicatorItem;
}).toList();
profileDepart.setProblemTypeRadarIndicator(problemTypeRadarIndicator);
// 突出问题排名
List<NegativeProblemRelation> negativeProblemRelations = negativeProblemRelationService.list(new LambdaQueryWrapper<NegativeProblemRelation>().in(NegativeProblemRelation::getNegativeId, negativeIds));
Map<String, List<NegativeProblemRelation>> collect = negativeProblemRelations.stream().collect(Collectors.groupingBy(item -> item.getOneLevelContent() + " / " + item.getTwoLevelContent() + " / " + item.getThreeLevelContent()));
List<BarItem> problemTypeBarList = collect.keySet().stream().map(key -> {
return new BarItem(key, collect.get(key).size());
}).toList();
profileDepart.setProblemTypeBarList(problemTypeBarList);
List<Object> result = negativeScoreService.calculateDepartScore(beginTime, endTime, departId);
profileDepart.setScore((BigDecimal) result.get(0));
profileDepart.setExpression(result.get(1).toString());

12
src/main/java/com/biutag/supervision/pojo/domain/ProfileDepart.java

@ -18,7 +18,7 @@ import java.util.List;
@Getter
public class ProfileDepart {
private BigDecimal score;
private BigDecimal score = new BigDecimal(0);
private String expression;
@ -26,14 +26,18 @@ public class ProfileDepart {
private DepartInfo departInfo = new DepartInfo();
private NegativeInfo negativeInfo = new NegativeInfo();
// 问题来源占比
private List<PieItem> problemSourcesList = new ArrayList<>();
// 业务类型占比
private List<PieItem> businessTypeList = new ArrayList<>();
private List<BarItem> policeBarList = new ArrayList<>();
// 雷达图
private List<RadarIndicatorItem> problemTypeRadarIndicator = new ArrayList<>();
private List<Integer> scoreRadarData = new ArrayList<>();
private List<BarItem> scoreTypeBarList = new ArrayList<>();
private List<BarItem> weightTypeBarList = new ArrayList<>();
// 个人问题排名
private List<BarItem> policeBarList = new ArrayList<>();
// 个人问题排名
private List<BarItem> problemTypeBarList = new ArrayList<>();
@Setter
@Getter

1
src/main/java/com/biutag/supervision/pojo/entity/DataCaseVerif.java

@ -66,6 +66,7 @@ public class DataCaseVerif {
//
@TableField("create_time")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm")
private LocalDateTime createTime;
// 分发状态

2
src/main/java/com/biutag/supervision/service/NegativeWorkService.java

@ -71,7 +71,7 @@ public class NegativeWorkService extends ServiceImpl<NegativeWorkMapper, Negativ
queryWrapper.between("n.discoveryTime", param.getDiscoveryTime().get(0), param.getDiscoveryTime().get(1));
}
if (param.getCrtTime().size() == 2) {
queryWrapper.between("b.crtTime", param.getCrtTime().get(0), param.getCrtTime().get(1));
queryWrapper.between("n.crtTime", param.getCrtTime().get(0), param.getCrtTime().get(1));
}
if (StrUtil.isNotBlank(param.getResponderKey()) && StrUtil.isNotBlank(param.getResponderValue())) {
switch (param.getResponderKey()) {

Loading…
Cancel
Save