Compare commits

...

4 Commits

  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();
BeanUtils.copyProperties(item, vo);
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;
}).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());
businessLineOverviewText.append(i + 1)
.append("、")
.append(label)
.append(label.trim())
.append(",")
.append(cnt)
.append("条,占比")
@ -143,21 +143,21 @@ public class ReportBusinessLineSectionServiceImpl implements ReportBusinessLineS
// 本期按业务条线分组
Map<String, List<NegativeQueryVo>> currentGroup = currentList.stream()
.collect(Collectors.groupingBy(
vo -> parentLabel2Level(vo.getProblemSourcesCode(), idMap),
vo -> StrUtil.blankToDefault(vo.getProblemSourcesCode(), "UNKNOWN"),
LinkedHashMap::new,
Collectors.toList()
));
// 环比分组
Map<String, List<NegativeQueryVo>> momGroup = momList.stream()
.collect(Collectors.groupingBy(
vo -> parentLabel2Level(vo.getProblemSourcesCode(), idMap),
vo -> StrUtil.blankToDefault(vo.getProblemSourcesCode(), "UNKNOWN"),
LinkedHashMap::new,
Collectors.toList()
));
// 同比分组
Map<String, List<NegativeQueryVo>> yoyGroup = yoyList.stream()
.collect(Collectors.groupingBy(
vo -> parentLabel2Level(vo.getProblemSourcesCode(), idMap),
vo -> StrUtil.blankToDefault(vo.getProblemSourcesCode(), "UNKNOWN"),
LinkedHashMap::new,
Collectors.toList()
));
@ -171,15 +171,16 @@ public class ReportBusinessLineSectionServiceImpl implements ReportBusinessLineS
List<BusinessLineDetailSection> result = new ArrayList<>();
int index = 1;
for (Map.Entry<String, List<NegativeQueryVo>> entry : sortedEntries) {
String fatherBusinessLineName = entry.getKey();
String sourceCode = entry.getKey();
List<NegativeQueryVo> lineList = entry.getValue();
if (CollUtil.isEmpty(lineList)) {
continue;
}
BusinessLineDetailSection section = new BusinessLineDetailSection();
section.setOrderNo(toChineseOrderNo(index++));
section.setBusinessFatherLineName(fatherBusinessLineName);
section.setBusinessLineName(lineList.get(0).getProblemSources());
// 父级条线名
section.setBusinessFatherLineName(parentLabel2Level(sourceCode, idMap).trim());
section.setBusinessLineName(selfLabel(sourceCode, idMap).trim());
int totalIssued = lineList.size();
section.setTotalIssued(totalIssued);
@ -213,10 +214,10 @@ public class ReportBusinessLineSectionServiceImpl implements ReportBusinessLineS
section.setTopPersons(accountabilityStats.getTopPersons().stream().limit(3).toList());
BigDecimal currentVerifiedRate = closedStats.getVerifiedRate();
ClosedStatsCalcRequestDTO momRequestDTO = new ClosedStatsCalcRequestDTO();
momRequestDTO.setNegativeQueryVoList(momGroup.getOrDefault(fatherBusinessLineName, Collections.emptyList()));
momRequestDTO.setNegativeQueryVoList(momGroup.getOrDefault(sourceCode, Collections.emptyList()));
ClosedStatsCalcResponseDTO momClosedStats = reportClosedStatsService.calculateClosedStats(momRequestDTO);
ClosedStatsCalcRequestDTO yoyRequestDTO = new ClosedStatsCalcRequestDTO();
yoyRequestDTO.setNegativeQueryVoList(yoyGroup.getOrDefault(fatherBusinessLineName, Collections.emptyList()));
yoyRequestDTO.setNegativeQueryVoList(yoyGroup.getOrDefault(sourceCode, Collections.emptyList()));
ClosedStatsCalcResponseDTO yoyClosedStats = reportClosedStatsService.calculateClosedStats(yoyRequestDTO);
BigDecimal momVerifiedRate = momClosedStats.getVerifiedRate();
BigDecimal yoyVerifiedRate = yoyClosedStats.getVerifiedRate();
@ -247,6 +248,22 @@ public class ReportBusinessLineSectionServiceImpl implements ReportBusinessLineS
: 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