|
|
|
@ -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(), "未归类"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 阿拉伯数字序号转中文序号 |
|
|
|
* 阿拉伯数字序号转中文序号 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|