diff --git a/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/controller/BigScreenController.java b/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/controller/BigScreenController.java index 793befa..0a70434 100644 --- a/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/controller/BigScreenController.java +++ b/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/controller/BigScreenController.java @@ -278,6 +278,9 @@ public class BigScreenController { transdataSoil.setDataSoilDdl("0"); transdataSoil.setDataSoilDdl2("0"); transdataSoil.setDataSoilDdl3("0"); + transdataSoil.setDataSoilPh("0"); + transdataSoil.setDataSoilDo("0"); + transdataSoil.setDataSoilNtu("0"); jsonObject.putAll(JSONObject.parseObject(JSON.toJSONString(transdataSoil))); } }else if(PollutionConstants.AIR_SURV.equals(survDeviceDeploy.getDeployType())){//气象设备 @@ -868,20 +871,20 @@ public class BigScreenController { SurvTransdataSoilVo transdataSoil = transdataSoilService.getNewestData(survDeviceDeploy.getDeployCode()); if(transdataSoil!=null) { transdataSoil.setStationName(survStationInfo.getStationName()); - returnSoilArrs.add(JSONObject.parseObject(JSONObject.toJSONString(transdataSoil, SerializerFeature.WriteNullStringAsEmpty))); + returnSoilArrs.add(JSONObject.parseObject(JSONObject.toJSONString(transdataSoil, SerializerFeature.WriteMapNullValue))); } }else if(PollutionConstants.AIR_SURV.equals(survDeviceDeploy.getDeployType())){//气象设备 SurvTransdataAirVo transdataAir= transdataAirService.getNewestData(survDeviceDeploy.getDeployCode()); if(transdataAir!=null) { transdataAir.setStationName(survStationInfo.getStationName()); - returnAirArrs.add(JSONObject.parseObject(JSONObject.toJSONString(transdataAir, SerializerFeature.WriteNullStringAsEmpty))); + returnAirArrs.add(JSONObject.parseObject(JSONObject.toJSONString(transdataAir, SerializerFeature.WriteMapNullValue))); } }else if(PollutionConstants.WATER_QULITY.equals(survDeviceDeploy.getDeployType())){//水质设备 SurvTransdataSoilVo transdataSoil = transdataSoilService.getNewestData(survDeviceDeploy.getDeployCode()); if(transdataSoil!=null) { transdataSoil.setStationName(survStationInfo.getStationName()); - returnWaterArrs.add(JSONObject.parseObject(JSONObject.toJSONString(transdataSoil, SerializerFeature.WriteNullStringAsEmpty))); + returnWaterArrs.add(JSONObject.parseObject(JSONObject.toJSONString(transdataSoil, SerializerFeature.WriteMapNullValue))); } }else if(PollutionConstants.STINK.equals(survDeviceDeploy.getDeployType())) {//恶臭 SurvTransdataStinkVo survTransdataAirVo = transdataVocsService.getNewestData(survDeviceDeploy.getDeployCode()); diff --git a/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/controller/SurvStationInfoController.java b/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/controller/SurvStationInfoController.java index ffd4469..04891a8 100644 --- a/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/controller/SurvStationInfoController.java +++ b/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/controller/SurvStationInfoController.java @@ -248,14 +248,14 @@ public class SurvStationInfoController { //水实时 if(orientList.size()>0) { SurvTransdataOrientwaterVo survTransdataOrientwaterVo = orientwaterService.getNewestDataWithStation(orientList); - jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataOrientwaterVo, SerializerFeature.WriteNullStringAsEmpty))); + jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataOrientwaterVo, SerializerFeature.WriteMapNullValue))); //计算历史数据量 Integer dataCounts = hisdataOrientwaterService.getHisDataCount(orientList); finalDataCounts=finalDataCounts+dataCounts; } if(liveList.size()>0) { SurvTransdataLivestockwaterVo survTransdataLivestockwaterVo = livestockwaterService.getNewestDataWithStation(liveList); - jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataLivestockwaterVo, SerializerFeature.WriteNullStringAsEmpty))); + jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataLivestockwaterVo, SerializerFeature.WriteMapNullValue))); //计算历史数据量 Integer dataCounts = hisdataLivestockwaterService.getHisDataCount(liveList); finalDataCounts=finalDataCounts+dataCounts; @@ -263,7 +263,7 @@ public class SurvStationInfoController { //气实时 if(airList.size()>0) { SurvTransdataAirVo survTransdataAirVo=transdataAirService.getNewestDataWithStation(airList); - jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataAirVo, SerializerFeature.WriteNullStringAsEmpty))); + jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataAirVo, SerializerFeature.WriteMapNullValue))); //计算历史数据量 Integer dataCounts = hisdataAirService.getHisDataCount(airList); finalDataCounts=finalDataCounts+dataCounts; @@ -271,7 +271,7 @@ public class SurvStationInfoController { //土壤实时 if(soilList.size()>0){ SurvTransdataSoilVo survTransdataSoilVo = transdataSoilService.getNewestDataWithStation(soilList); - jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataSoilVo, SerializerFeature.WriteNullStringAsEmpty))); + jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataSoilVo, SerializerFeature.WriteMapNullValue))); //计算历史数据量 Integer dataCounts = hisdataSoilService.getHisDataCount(soilList); finalDataCounts=finalDataCounts+dataCounts; @@ -279,7 +279,7 @@ public class SurvStationInfoController { //水质实时 if(waterList.size()>0){ SurvTransdataSoilVo survTransdataSoilVo = transdataSoilService.getNewestDataWithStation(waterList); - jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataSoilVo, SerializerFeature.WriteNullStringAsEmpty))); + jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataSoilVo, SerializerFeature.WriteMapNullValue))); //计算历史数据量 Integer dataCounts = hisdataSoilService.getHisDataCount(waterList); finalDataCounts=finalDataCounts+dataCounts; @@ -287,7 +287,7 @@ public class SurvStationInfoController { //恶臭实时 if(stinkList.size()>0){ SurvTransdataStinkVo survTransdataStinkVo = survTransdataVocsService.getNewestDataWithStation(stinkList); - jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataStinkVo, SerializerFeature.WriteNullStringAsEmpty))); + jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataStinkVo, SerializerFeature.WriteMapNullValue))); //计算历史数据量 Integer dataCounts = survHisdataVocsService.getHisDataCount(stinkList); finalDataCounts=finalDataCounts+dataCounts;