Compare commits

..

No commits in common. 'cb258b46682436c1d61dfb9020f400976a410846' and 'ef3679f266bfa8062a902bec758b4069a213caee' have entirely different histories.

  1. 2
      src/main/java/com/biutag/supervision/service/NegativeQueryService.java
  2. 35
      src/main/java/com/biutag/supervision/service/report/impl/ReportBusinessLineSectionServiceImpl.java

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

@ -215,7 +215,7 @@ public class NegativeQueryService {
NegativeQueryVo vo = new NegativeQueryVo(); NegativeQueryVo vo = new NegativeQueryVo();
BeanUtils.copyProperties(item, vo); BeanUtils.copyProperties(item, vo);
if (Objects.nonNull(item.getFirstDistributeTime()) && !ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())) { if (Objects.nonNull(item.getFirstDistributeTime()) && !ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())) {
vo.setRemainingDuration(TimeUtil.getRemainingDuration(item.getFirstDistributeTime(), item.getMaxSignDuration(), item.getMaxHandleDuration(), item.getExtensionDays(), item.getFlowKey())); // vo.setRemainingDuration(TimeUtil.getRemainingDuration(item.getFirstDistributeTime(), item.getMaxSignDuration(), item.getMaxHandleDuration(), item.getExtensionDays(), item.getFlowKey()));
} }
return vo; return vo;
}).toList(); }).toList();

35
src/main/java/com/biutag/supervision/service/report/impl/ReportBusinessLineSectionServiceImpl.java

@ -94,7 +94,7 @@ public class ReportBusinessLineSectionServiceImpl implements ReportBusinessLineS
int cnt = Math.toIntExact(sorted.get(i).getValue()); int cnt = Math.toIntExact(sorted.get(i).getValue());
businessLineOverviewText.append(i + 1) businessLineOverviewText.append(i + 1)
.append("、") .append("、")
.append(label.trim()) .append(label)
.append(",") .append(",")
.append(cnt) .append(cnt)
.append("条,占比") .append("条,占比")
@ -143,21 +143,21 @@ public class ReportBusinessLineSectionServiceImpl implements ReportBusinessLineS
// 本期按业务条线分组 // 本期按业务条线分组
Map<String, List<NegativeQueryVo>> currentGroup = currentList.stream() Map<String, List<NegativeQueryVo>> currentGroup = currentList.stream()
.collect(Collectors.groupingBy( .collect(Collectors.groupingBy(
vo -> StrUtil.blankToDefault(vo.getProblemSourcesCode(), "UNKNOWN"), vo -> parentLabel2Level(vo.getProblemSourcesCode(), idMap),
LinkedHashMap::new, LinkedHashMap::new,
Collectors.toList() Collectors.toList()
)); ));
// 环比分组 // 环比分组
Map<String, List<NegativeQueryVo>> momGroup = momList.stream() Map<String, List<NegativeQueryVo>> momGroup = momList.stream()
.collect(Collectors.groupingBy( .collect(Collectors.groupingBy(
vo -> StrUtil.blankToDefault(vo.getProblemSourcesCode(), "UNKNOWN"), vo -> parentLabel2Level(vo.getProblemSourcesCode(), idMap),
LinkedHashMap::new, LinkedHashMap::new,
Collectors.toList() Collectors.toList()
)); ));
// 同比分组 // 同比分组
Map<String, List<NegativeQueryVo>> yoyGroup = yoyList.stream() Map<String, List<NegativeQueryVo>> yoyGroup = yoyList.stream()
.collect(Collectors.groupingBy( .collect(Collectors.groupingBy(
vo -> StrUtil.blankToDefault(vo.getProblemSourcesCode(), "UNKNOWN"), vo -> parentLabel2Level(vo.getProblemSourcesCode(), idMap),
LinkedHashMap::new, LinkedHashMap::new,
Collectors.toList() Collectors.toList()
)); ));
@ -171,16 +171,15 @@ public class ReportBusinessLineSectionServiceImpl implements ReportBusinessLineS
List<BusinessLineDetailSection> result = new ArrayList<>(); List<BusinessLineDetailSection> result = new ArrayList<>();
int index = 1; int index = 1;
for (Map.Entry<String, List<NegativeQueryVo>> entry : sortedEntries) { for (Map.Entry<String, List<NegativeQueryVo>> entry : sortedEntries) {
String sourceCode = entry.getKey(); String fatherBusinessLineName = entry.getKey();
List<NegativeQueryVo> lineList = entry.getValue(); List<NegativeQueryVo> lineList = entry.getValue();
if (CollUtil.isEmpty(lineList)) { if (CollUtil.isEmpty(lineList)) {
continue; continue;
} }
BusinessLineDetailSection section = new BusinessLineDetailSection(); BusinessLineDetailSection section = new BusinessLineDetailSection();
section.setOrderNo(toChineseOrderNo(index++)); section.setOrderNo(toChineseOrderNo(index++));
// 父级条线名 section.setBusinessFatherLineName(fatherBusinessLineName);
section.setBusinessFatherLineName(parentLabel2Level(sourceCode, idMap).trim()); section.setBusinessLineName(lineList.get(0).getProblemSources());
section.setBusinessLineName(selfLabel(sourceCode, idMap).trim());
int totalIssued = lineList.size(); int totalIssued = lineList.size();
section.setTotalIssued(totalIssued); section.setTotalIssued(totalIssued);
@ -214,10 +213,10 @@ public class ReportBusinessLineSectionServiceImpl implements ReportBusinessLineS
section.setTopPersons(accountabilityStats.getTopPersons().stream().limit(3).toList()); section.setTopPersons(accountabilityStats.getTopPersons().stream().limit(3).toList());
BigDecimal currentVerifiedRate = closedStats.getVerifiedRate(); BigDecimal currentVerifiedRate = closedStats.getVerifiedRate();
ClosedStatsCalcRequestDTO momRequestDTO = new ClosedStatsCalcRequestDTO(); ClosedStatsCalcRequestDTO momRequestDTO = new ClosedStatsCalcRequestDTO();
momRequestDTO.setNegativeQueryVoList(momGroup.getOrDefault(sourceCode, Collections.emptyList())); momRequestDTO.setNegativeQueryVoList(momGroup.getOrDefault(fatherBusinessLineName, Collections.emptyList()));
ClosedStatsCalcResponseDTO momClosedStats = reportClosedStatsService.calculateClosedStats(momRequestDTO); ClosedStatsCalcResponseDTO momClosedStats = reportClosedStatsService.calculateClosedStats(momRequestDTO);
ClosedStatsCalcRequestDTO yoyRequestDTO = new ClosedStatsCalcRequestDTO(); ClosedStatsCalcRequestDTO yoyRequestDTO = new ClosedStatsCalcRequestDTO();
yoyRequestDTO.setNegativeQueryVoList(yoyGroup.getOrDefault(sourceCode, Collections.emptyList())); yoyRequestDTO.setNegativeQueryVoList(yoyGroup.getOrDefault(fatherBusinessLineName, Collections.emptyList()));
ClosedStatsCalcResponseDTO yoyClosedStats = reportClosedStatsService.calculateClosedStats(yoyRequestDTO); ClosedStatsCalcResponseDTO yoyClosedStats = reportClosedStatsService.calculateClosedStats(yoyRequestDTO);
BigDecimal momVerifiedRate = momClosedStats.getVerifiedRate(); BigDecimal momVerifiedRate = momClosedStats.getVerifiedRate();
BigDecimal yoyVerifiedRate = yoyClosedStats.getVerifiedRate(); BigDecimal yoyVerifiedRate = yoyClosedStats.getVerifiedRate();
@ -248,22 +247,6 @@ public class ReportBusinessLineSectionServiceImpl implements ReportBusinessLineS
: StrUtil.blankToDefault(child.getLabel(), "未归类"); : StrUtil.blankToDefault(child.getLabel(), "未归类");
} }
/**
* 根据问题来源ID解析当前节点名称自己的 name
*/
private String selfLabel(String sourceCode, Map<String, DictProblemSourceTree> idMap) {
if (StrUtil.isBlank(sourceCode)) {
return "未归类";
}
DictProblemSourceTree current = idMap.get(sourceCode);
if (current == null) {
return "未归类";
}
return StrUtil.blankToDefault(current.getLabel(), "未归类");
}
/** /**
* 阿拉伯数字序号转中文序号 * 阿拉伯数字序号转中文序号
*/ */

Loading…
Cancel
Save