监测数据为空不返回
This commit is contained in:
parent
19393e0825
commit
313c06003b
|
|
@ -871,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.WriteMapNullValue)));
|
||||
returnSoilArrs.add(JSONObject.parseObject(JSONObject.toJSONString(transdataSoil)));
|
||||
}
|
||||
}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.WriteMapNullValue)));
|
||||
returnAirArrs.add(JSONObject.parseObject(JSONObject.toJSONString(transdataAir)));
|
||||
}
|
||||
|
||||
}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.WriteMapNullValue)));
|
||||
returnWaterArrs.add(JSONObject.parseObject(JSONObject.toJSONString(transdataSoil)));
|
||||
}
|
||||
}else if(PollutionConstants.STINK.equals(survDeviceDeploy.getDeployType())) {//恶臭
|
||||
SurvTransdataStinkVo survTransdataAirVo = transdataVocsService.getNewestData(survDeviceDeploy.getDeployCode());
|
||||
|
|
|
|||
|
|
@ -248,14 +248,14 @@ public class SurvStationInfoController {
|
|||
//水实时
|
||||
if(orientList.size()>0) {
|
||||
SurvTransdataOrientwaterVo survTransdataOrientwaterVo = orientwaterService.getNewestDataWithStation(orientList);
|
||||
jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataOrientwaterVo, SerializerFeature.WriteMapNullValue)));
|
||||
jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataOrientwaterVo)));
|
||||
//计算历史数据量
|
||||
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.WriteMapNullValue)));
|
||||
jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataLivestockwaterVo)));
|
||||
//计算历史数据量
|
||||
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.WriteMapNullValue)));
|
||||
jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataAirVo)));
|
||||
//计算历史数据量
|
||||
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.WriteMapNullValue)));
|
||||
jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataSoilVo)));
|
||||
//计算历史数据量
|
||||
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.WriteMapNullValue)));
|
||||
jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataSoilVo)));
|
||||
//计算历史数据量
|
||||
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.WriteMapNullValue)));
|
||||
jsonArray.add(JSONObject.parseObject(JSONObject.toJSONString(survTransdataStinkVo)));
|
||||
//计算历史数据量
|
||||
Integer dataCounts = survHisdataVocsService.getHisDataCount(stinkList);
|
||||
finalDataCounts=finalDataCounts+dataCounts;
|
||||
|
|
|
|||
Loading…
Reference in New Issue