|
@@ -62,13 +62,9 @@ public class CrmProgressMonitorServiceImpl extends ServiceImpl<CrmProgressMonito
|
|
|
result.setTotal(crmProgressSopList.size());
|
|
|
resultList.add(result);
|
|
|
}
|
|
|
- //大区经理的sop数量从高到低排序
|
|
|
- List<CrmProgressResult> sopOrderList = resultList.stream()
|
|
|
- .sorted(Comparator.comparing(CrmProgressResult::getTotal).reversed())
|
|
|
- .collect(Collectors.toList());
|
|
|
|
|
|
//填充各阶段sop的数量
|
|
|
- for (CrmProgressResult result : sopOrderList) {
|
|
|
+ for (CrmProgressResult result : resultList) {
|
|
|
|
|
|
List<CrmProgressSopResult> filterSopList;
|
|
|
if (monitorEnum.equals(CrmProgressMonitorEnum.BY_LEAD)) {
|
|
@@ -89,6 +85,10 @@ public class CrmProgressMonitorServiceImpl extends ServiceImpl<CrmProgressMonito
|
|
|
setDisplayProcess(result, filterSopList);
|
|
|
}
|
|
|
|
|
|
+ //大区经理的sop数量从高到低排序
|
|
|
+ resultList = resultList.stream()
|
|
|
+ .sorted(Comparator.comparing(CrmProgressResult::getTotal).reversed())
|
|
|
+ .collect(Collectors.toList());
|
|
|
//合计
|
|
|
getSum(resultList);
|
|
|
|
|
@@ -127,7 +127,7 @@ public class CrmProgressMonitorServiceImpl extends ServiceImpl<CrmProgressMonito
|
|
|
}
|
|
|
|
|
|
private String getRatio(BigDecimal total, BigDecimal sopNum) {
|
|
|
- String ratio = "";
|
|
|
+ String ratio = "0.00%";
|
|
|
//计算占比
|
|
|
if (total.intValue() != 0) {
|
|
|
sopNum = sopNum.divide(total, 4, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100));
|
|
@@ -143,7 +143,7 @@ public class CrmProgressMonitorServiceImpl extends ServiceImpl<CrmProgressMonito
|
|
|
Map<CrmProcessEnum, Integer> summaryMap = getCrmProcessNum(map);
|
|
|
for (CrmProcessEnum process : CrmProcessEnum.values()) {
|
|
|
Integer sopNum = 0;
|
|
|
- String ratio = "";
|
|
|
+ String ratio = "0.00%";
|
|
|
//设置包含了某阶段的sop数量和占比
|
|
|
if (summaryMap.containsKey(process)) {
|
|
|
sopNum = summaryMap.get(process);
|