|
@@ -74,7 +74,7 @@ public class ZdszBigscreenServiceImpl implements IZdszBigscreenService {
|
|
|
spiral_welded_pipe += numbers.get(3);
|
|
|
seamless_steel_tube += numbers.get(4);
|
|
|
galvanized_steel_pipe += numbers.get(5);
|
|
|
- iron += numbers.get(6);
|
|
|
+ polyethylene_pipe += numbers.get(6);
|
|
|
}
|
|
|
Map map = new HashMap();
|
|
|
map.put("time", time); // 创建时间
|
|
@@ -214,12 +214,25 @@ public class ZdszBigscreenServiceImpl implements IZdszBigscreenService {
|
|
|
String[] times = month.split("-");
|
|
|
zdszBigscreenBo.setInfo("z_engineering_info_" + times[0] + "_" + times[1]); // z_engineering_info_2024_03
|
|
|
zdszBigscreenBo.setNode("z_engineering_node_" + times[0] + "_" + times[1]); // z_engineering_node_2024_03
|
|
|
- civi.add(bigscreenMapper.civiNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
- gy.add(bigscreenMapper.gyNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
- industry.add(bigscreenMapper.industryNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
- touch.add(bigscreenMapper.touchNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
- infrastructure.add(bigscreenMapper.infrastructureNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
- civi.add(bigscreenMapper.pipeNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
+ setMergeList(civi, bigscreenMapper.civiNumEng(zdszBigscreenBo));
|
|
|
+ setMergeList(gy, bigscreenMapper.gyNumEng(zdszBigscreenBo));
|
|
|
+ setMergeList(industry, bigscreenMapper.industryNumEng(zdszBigscreenBo));
|
|
|
+ setMergeList(touch, bigscreenMapper.touchNumEng(zdszBigscreenBo));
|
|
|
+ setMergeList(infrastructure, bigscreenMapper.infrastructureNumEng(zdszBigscreenBo));
|
|
|
+ setMergeList(pipe, bigscreenMapper.pipeNumEng(zdszBigscreenBo));
|
|
|
+// civi.add(bigscreenMapper.civiNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
+// gy.add(bigscreenMapper.gyNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
+// industry.add(bigscreenMapper.industryNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
+// touch.add(bigscreenMapper.touchNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
+// infrastructure.add(bigscreenMapper.infrastructureNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
+// pipe.add(bigscreenMapper.pipeNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
+
|
|
|
+// civi.add(bigscreenMapper.civiNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
+// gy.add(bigscreenMapper.gyNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
+// industry.add(bigscreenMapper.industryNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
+// touch.add(bigscreenMapper.touchNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
+// infrastructure.add(bigscreenMapper.infrastructureNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
+// pipe.add(bigscreenMapper.pipeNumEng(zdszBigscreenBo).stream().collect(Collectors.toSet()));
|
|
|
// pipe += bigscreenMapper.gyNumEng(zdszBigscreenBo);
|
|
|
// industry += bigscreenMapper.industryNumEng(zdszBigscreenBo);
|
|
|
// touch += bigscreenMapper.touchNumEng(zdszBigscreenBo);
|
|
@@ -234,6 +247,13 @@ public class ZdszBigscreenServiceImpl implements IZdszBigscreenService {
|
|
|
map.put("pipe", pipe.size()); // 顶管工程
|
|
|
bigscreenMapper.setCountEngineering(map);
|
|
|
}
|
|
|
+ private void setMergeList(Set set, List<String> list){
|
|
|
+ for (String string: list) {
|
|
|
+ if(string != null){
|
|
|
+ set.add(string);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
@Override
|
|
|
public Map getCountEngineering(ZdszBigscreenBo zdszBigscreenBo){
|
|
|
clearTime(zdszBigscreenBo);
|
|
@@ -341,25 +361,30 @@ public class ZdszBigscreenServiceImpl implements IZdszBigscreenService {
|
|
|
}
|
|
|
// time = "2024-03-10";
|
|
|
zdszBigscreenBo.setTime(time);
|
|
|
- String[] times = time.split("-");
|
|
|
- zdszBigscreenBo.setInfo("z_engineering_info_" + times[0] + "_" + times[1]); // z_engineering_info_2024_03
|
|
|
- zdszBigscreenBo.setNode("z_engineering_node_" + times[0] + "_" + times[1]); // z_engineering_node_2024_03
|
|
|
Map map = new HashMap();
|
|
|
map.put("time", time); // 创建时间
|
|
|
- List<Map> civiOldMaps = bigscreenMapper.civiNumNew(zdszBigscreenBo); // 民用工程 旧改
|
|
|
- List<Map> civiMaps = bigscreenMapper.civiNumNew(zdszBigscreenBo); // 民用工程 新建
|
|
|
- List<Map> gyMaps = bigscreenMapper.gyNumNew(zdszBigscreenBo); // 工业工程
|
|
|
- List<Map> industryMaps = bigscreenMapper.industryNumNew(zdszBigscreenBo); // 市政工程
|
|
|
- List<Map> touchMaps = bigscreenMapper.touchNumNew(zdszBigscreenBo); // 碰口工程
|
|
|
- List<Map> infrastructureMaps = bigscreenMapper.infrastructureNumNew(zdszBigscreenBo); // 基建工程
|
|
|
- List<Map> pipeMaps = bigscreenMapper.pipeNumNew(zdszBigscreenBo); // 顶管工程
|
|
|
- civiMaps = mapMergeMap(civiMaps, gyMaps);
|
|
|
- civiMaps = mapMergeMap(civiMaps, industryMaps);
|
|
|
- civiMaps = mapMergeMap(civiMaps, touchMaps);
|
|
|
- civiMaps = mapMergeMap(civiMaps, infrastructureMaps);
|
|
|
- civiMaps = mapMergeMap(civiMaps, pipeMaps);
|
|
|
- civiMaps = mapMergeMap(civiMaps, civiOldMaps);
|
|
|
- map.put("json", mapToJson(civiMaps)); // JSON数据
|
|
|
+ List<Map> initMaps = new ArrayList<>();
|
|
|
+ List<String> monthList = batchInitMonthList(null);
|
|
|
+ for (String month: monthList) {
|
|
|
+ String[] times = month.split("-");
|
|
|
+ zdszBigscreenBo.setInfo("z_engineering_info_" + times[0] + "_" + times[1]); // z_engineering_info_2024_03
|
|
|
+ zdszBigscreenBo.setNode("z_engineering_node_" + times[0] + "_" + times[1]); // z_engineering_node_2024_03
|
|
|
+ List<Map> civiOldMaps = bigscreenMapper.civiNumNew(zdszBigscreenBo); // 民用工程 旧改
|
|
|
+ List<Map> civiMaps = bigscreenMapper.civiNumNew(zdszBigscreenBo); // 民用工程 新建
|
|
|
+ List<Map> gyMaps = bigscreenMapper.gyNumNew(zdszBigscreenBo); // 工业工程
|
|
|
+ List<Map> industryMaps = bigscreenMapper.industryNumNew(zdszBigscreenBo); // 市政工程
|
|
|
+ List<Map> touchMaps = bigscreenMapper.touchNumNew(zdszBigscreenBo); // 碰口工程
|
|
|
+ List<Map> infrastructureMaps = bigscreenMapper.infrastructureNumNew(zdszBigscreenBo); // 基建工程
|
|
|
+ List<Map> pipeMaps = bigscreenMapper.pipeNumNew(zdszBigscreenBo); // 顶管工程
|
|
|
+ initMaps = mapMergeMap(initMaps, civiMaps);
|
|
|
+ initMaps = mapMergeMap(initMaps, gyMaps);
|
|
|
+ initMaps = mapMergeMap(initMaps, industryMaps);
|
|
|
+ initMaps = mapMergeMap(initMaps, touchMaps);
|
|
|
+ initMaps = mapMergeMap(initMaps, infrastructureMaps);
|
|
|
+ initMaps = mapMergeMap(initMaps, pipeMaps);
|
|
|
+ initMaps = mapMergeMap(initMaps, civiOldMaps);
|
|
|
+ }
|
|
|
+ map.put("json", mapToJson(initMaps)); // JSON数据
|
|
|
bigscreenMapper.setConstructionMap(map);
|
|
|
}
|
|
|
@Override
|
|
@@ -652,11 +677,15 @@ public class ZdszBigscreenServiceImpl implements IZdszBigscreenService {
|
|
|
String start = "{";
|
|
|
for (int i = 0; i < maps.size(); i++) {
|
|
|
Map data = maps.get(i);
|
|
|
- String key = data.get("key").toString();
|
|
|
+ Object keyObj = data.get("key");
|
|
|
+ if(keyObj == null){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String key = keyObj.toString();
|
|
|
Long value = Long.valueOf(data.get("value").toString());
|
|
|
start = start + "\"" + key + "\":"+value+",";
|
|
|
}
|
|
|
- if(maps.size() > 0){
|
|
|
+ if(maps.size() > 0 && start.length() > 1){
|
|
|
start = start.substring(0, start.length() - 1);
|
|
|
}
|
|
|
String end= "}";
|
|
@@ -669,7 +698,11 @@ public class ZdszBigscreenServiceImpl implements IZdszBigscreenService {
|
|
|
for (int j = 0; j < destinations.size(); j++) {
|
|
|
Map destination = destinations.get(j);
|
|
|
Map map = maps.get(i);
|
|
|
- if(map.get("key").equals(destination.get("key"))){
|
|
|
+ Object keyObj = map.get("key");
|
|
|
+ if(keyObj == null){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if(keyObj.equals(destination.get("key"))){
|
|
|
isExist = true;
|
|
|
Long value = Long.valueOf(destination.get("value").toString()) + Long.valueOf(map.get("value").toString());
|
|
|
destination.put("value", value);
|