增加监测项目单个设备最近数据
This commit is contained in:
parent
cc23e0c2e3
commit
ab64c802fc
|
|
@ -584,7 +584,9 @@ public class BigScreenController {
|
||||||
List<String> deployTypes = new ArrayList<>();
|
List<String> deployTypes = new ArrayList<>();
|
||||||
deployTypes.add(PollutionConstants.SOIL_SURV);
|
deployTypes.add(PollutionConstants.SOIL_SURV);
|
||||||
deployTypes.add(PollutionConstants.AIR_SURV);
|
deployTypes.add(PollutionConstants.AIR_SURV);
|
||||||
List<SurvDeviceDeploy> deploys = deployService.getDeviceListByStation(null,deployTypes);
|
deployTypes.add(PollutionConstants.WATER_QULITY);
|
||||||
|
List<SurvDeviceDeploy> deploys = deployService.getDeviceListByStation(stationCode,deployTypes);
|
||||||
|
List<String> waterIds = new ArrayList<>();
|
||||||
List<String> soilIds = new ArrayList<>();
|
List<String> soilIds = new ArrayList<>();
|
||||||
List<String> airIds = new ArrayList<>();
|
List<String> airIds = new ArrayList<>();
|
||||||
if(!deploys.isEmpty()){
|
if(!deploys.isEmpty()){
|
||||||
|
|
@ -593,6 +595,8 @@ public class BigScreenController {
|
||||||
soilIds.add(deploy.getId());
|
soilIds.add(deploy.getId());
|
||||||
}else if(PollutionConstants.AIR_SURV.equals(deploy.getDeployType())){//气象设备
|
}else if(PollutionConstants.AIR_SURV.equals(deploy.getDeployType())){//气象设备
|
||||||
airIds.add(deploy.getId());
|
airIds.add(deploy.getId());
|
||||||
|
}else if(PollutionConstants.WATER_QULITY.equals(deploy.getDeployType())){//水设备
|
||||||
|
waterIds.add(deploy.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -621,6 +625,18 @@ public class BigScreenController {
|
||||||
}
|
}
|
||||||
jsonObject.put("airHisSurvData", airDataTrans);
|
jsonObject.put("airHisSurvData", airDataTrans);
|
||||||
|
|
||||||
|
List<CommonDataTrans> waterDataTrans = new ArrayList<>();
|
||||||
|
if(!waterIds.isEmpty()){
|
||||||
|
List<SurvTransdataSoil> waterData = transdataSoilService.lambdaQuery()
|
||||||
|
.in(SurvTransdataSoil::getDeployId,waterIds)
|
||||||
|
.list();
|
||||||
|
|
||||||
|
for (SurvTransdataSoil datas : waterData) {
|
||||||
|
List<CommonDataTrans> trans = CommonUtils.constructSoil(datas);
|
||||||
|
waterDataTrans.addAll(trans);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jsonObject.put("waterHisSurvData", waterDataTrans);
|
||||||
return Result.ok(jsonObject);
|
return Result.ok(jsonObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue