Commit ac07f6d8 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register_to_0715' of…

Merge branch 'develop_tzs_register_to_0715' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_tzs_register_to_0715
parents 1dd59fe5 c48596ad
...@@ -67,9 +67,8 @@ public class ZLDPStatisticsServiceImpl { ...@@ -67,9 +67,8 @@ public class ZLDPStatisticsServiceImpl {
Map<String, Integer> dataMap = new HashMap<>(); Map<String, Integer> dataMap = new HashMap<>();
for(Map<String,Object> map : list){ for(Map<String,Object> map : list){
if(null == map.get("equipCategory") || CollectionUtils.isEmpty((JSONArray) JSONArray.parse((String) map.get("equipCategory")))){ if(null == map.get("equipCategory") || CollectionUtils.isEmpty((JSONArray) JSONArray.parse((String) map.get("equipCategory")))){
String[] UnitTypeArray = ((String) map.get("unitType")).split("#"); String[] unitTypeArray = ((String) map.get("unitType")).split("#");
for (int i = 0; i < UnitTypeArray.length; i++) { for (String unitTypeName : unitTypeArray) {
String unitTypeName = UnitTypeArray[i];
if (dataMap.containsKey(unitTypeName + "null")) { if (dataMap.containsKey(unitTypeName + "null")) {
dataMap.put(unitTypeName + "null", dataMap.get(unitTypeName + "null") + 1); dataMap.put(unitTypeName + "null", dataMap.get(unitTypeName + "null") + 1);
} else { } else {
...@@ -78,14 +77,13 @@ public class ZLDPStatisticsServiceImpl { ...@@ -78,14 +77,13 @@ public class ZLDPStatisticsServiceImpl {
} }
}else { }else {
JSONArray equipCategoryArray = (JSONArray) JSONArray.parse((String) map.get("equipCategory")); JSONArray equipCategoryArray = (JSONArray) JSONArray.parse((String) map.get("equipCategory"));
String[] UnitTypeArray = ((String) map.get("unitType")).split("#"); String[] unitTypeArray = ((String) map.get("unitType")).split("#");
for (int i = 0; i < UnitTypeArray.length; i++) { for (String unitTypeName : unitTypeArray) {
String unitTypeName = UnitTypeArray[i]; for (Object o : equipCategoryArray) {
for (int j = 0; j < equipCategoryArray.size(); j++) { if (dataMap.containsKey(unitTypeName + o)) {
if (dataMap.containsKey(unitTypeName + equipCategoryArray.get(j))) { dataMap.put(unitTypeName + o, dataMap.get(unitTypeName + o) + 1);
dataMap.put(unitTypeName + equipCategoryArray.get(j), dataMap.get(unitTypeName + equipCategoryArray.get(j)) + 1);
} else { } else {
dataMap.put(unitTypeName + equipCategoryArray.get(j), 1); dataMap.put(unitTypeName + o, 1);
} }
} }
} }
...@@ -151,7 +149,7 @@ public class ZLDPStatisticsServiceImpl { ...@@ -151,7 +149,7 @@ public class ZLDPStatisticsServiceImpl {
Map<String,Object> angaiweiyaliguandaoMap = new HashMap<>(); Map<String,Object> angaiweiyaliguandaoMap = new HashMap<>();
angaiweiyaliguandaoMap.put("key","key05"); angaiweiyaliguandaoMap.put("key","key05");
angaiweiyaliguandaoMap.put("name","压力管道"); angaiweiyaliguandaoMap.put("name","压力管道");
angaiweiyaliguandaoMap.put("value",dataMap.getOrDefault("安装改造维修单位9000",0)); angaiweiyaliguandaoMap.put("value",dataMap.getOrDefault("安装改造维修单位8000",0));
angaiweiCompanyList.add(angaiweiyaliguandaoMap); angaiweiCompanyList.add(angaiweiyaliguandaoMap);
//安改维起重机械 //安改维起重机械
Map<String,Object> angaiweiqizhongjixieMap = new HashMap<>(); Map<String,Object> angaiweiqizhongjixieMap = new HashMap<>();
...@@ -198,6 +196,13 @@ public class ZLDPStatisticsServiceImpl { ...@@ -198,6 +196,13 @@ public class ZLDPStatisticsServiceImpl {
shejiyaliguandaoMap.put("value",dataMap.getOrDefault("设计单位8000",0)); shejiyaliguandaoMap.put("value",dataMap.getOrDefault("设计单位8000",0));
shejiCompanyList.add(shejiyaliguandaoMap); shejiCompanyList.add(shejiyaliguandaoMap);
shejiMap.put("data",shejiCompanyList); shejiMap.put("data",shejiCompanyList);
//无设备类型
Map<String,Object> shejiNullMap = new HashMap<>();
shejiNullMap.put("key","key09");
shejiNullMap.put("name","无设备类型");
shejiNullMap.put("value",dataMap.getOrDefault("设计单位null",0));
shejiCompanyList.add(shejiNullMap);
shejiMap.put("data",angaiweiCompanyList);
//制造Map //制造Map
Map<String,Object> zhizaoMap = new HashMap<>(); Map<String,Object> zhizaoMap = new HashMap<>();
...@@ -216,7 +221,7 @@ public class ZLDPStatisticsServiceImpl { ...@@ -216,7 +221,7 @@ public class ZLDPStatisticsServiceImpl {
zhizaoguoluMap.put("name","锅炉"); zhizaoguoluMap.put("name","锅炉");
zhizaoguoluMap.put("value",dataMap.getOrDefault("制造单位1000",0)); zhizaoguoluMap.put("value",dataMap.getOrDefault("制造单位1000",0));
zhizaoCompanyList.add(zhizaoguoluMap); zhizaoCompanyList.add(zhizaoguoluMap);
//制造锅炉 //制造场内机动车
Map<String,Object> zhizaojidongcheMap = new HashMap<>(); Map<String,Object> zhizaojidongcheMap = new HashMap<>();
zhizaojidongcheMap.put("key","key03"); zhizaojidongcheMap.put("key","key03");
zhizaojidongcheMap.put("name","场内机动车"); zhizaojidongcheMap.put("name","场内机动车");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment