认证-参数清单-项目详情中参数收集统计添加所有责任领域

This commit is contained in:
liyawei
2022-11-24 11:33:40 +08:00
parent cf54c4271b
commit fdaebc9fbc
@@ -706,6 +706,12 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
List<Map<String, Object>> collectingList = new LinkedList<>();
List<Map<String, Object>> submitList = new LinkedList<>();
List<Map<String, Object>> syncReportList = new LinkedList<>();
double totalAll = 0;
double notStartTotal = 0;
double collectingTotal = 0;
double submitTotal = 0;
double syncReportTotal = 0;
// 统计清单参数
ParamsCollectManifestEO paramsCollectManifestEO = new ParamsCollectManifestEO();
@@ -740,6 +746,14 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
String submitPercent = getRatio(submitNumber, total); // 已提交的参数项 百分比
String syncReportPercent = getRatio(syncReportNumber, total); // 已同步上报库的参数项 百分比
// 累加
totalAll += total;
notStartTotal += notStartNumber;
collectingTotal += collectingNumber;
submitTotal += submitNumber;
syncReportTotal += syncReportNumber;
// 组装数据 返回前端
if (notStartNumber == collectingNumber && collectingNumber == submitNumber && submitNumber == syncReportNumber && syncReportNumber == 0) {
continue;
@@ -758,6 +772,34 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
}
// 设置全部
if (CutEnum.EN.getValue().equals(cut)) {
dutyTerritoryNameList.add(0, "All");
} else {
dutyTerritoryNameList.add(0, "全部");
}
Map<String, Object> notStartMap = new HashMap<>();
notStartMap.put("quantity", notStartTotal);
notStartMap.put("percentage", getRatio(notStartTotal, totalAll));
notStartList.add(0, notStartMap);
Map<String, Object> collectinMap = new HashMap<>();
collectinMap.put("quantity", collectingTotal);
collectinMap.put("percentage", getRatio(collectingTotal, totalAll));
collectingList.add(0, collectinMap);
Map<String, Object> submitMap = new HashMap<>();
submitMap.put("quantity", submitTotal);
submitMap.put("percentage", getRatio(submitTotal, totalAll));
submitList.add(0, submitMap);
Map<String, Object> syncReportMap = new HashMap<>();
syncReportMap.put("quantity", syncReportTotal);
syncReportMap.put("percentage", getRatio(syncReportTotal, totalAll));
syncReportList.add(0, syncReportMap);
//
result.put("dutyTerritory", dutyTerritoryNameList);
result.put("notStart", notStartList);
result.put("collecting", collectingList);