增加字段STATION_SHORT_NAME

This commit is contained in:
wgx 2026-01-10 11:36:09 +08:00
parent 653505dd4a
commit 5aa40eb13d
1 changed files with 55 additions and 44 deletions

View File

@ -122,6 +122,7 @@ public class SurvStationInfoController {
List<String> orientList = new ArrayList<>();
List<String> liveList = new ArrayList<>();
List<String> orientIds = new ArrayList<>();
List<String> waterList = new ArrayList<>();
if(record.getDeviceList()!=null&&record.getDeviceList().size()>0){
List<String> deployList = new ArrayList<>();
for (SurvDeviceDeploy survDeviceDeploy : record.getDeviceList()) {
@ -130,6 +131,8 @@ public class SurvStationInfoController {
soilList.add(survDeviceDeploy.getDeployCode());
}else if(PollutionConstants.AIR_SURV.equals(survDeviceDeploy.getDeployType())){//气象设备
airList.add(survDeviceDeploy.getDeployCode());
}else if(PollutionConstants.WATER_QULITY.equals(survDeviceDeploy.getDeployType())){//水质设备
waterList.add(survDeviceDeploy.getDeployCode());
}else if(PollutionConstants.WATER_ORIENT.equals(survDeviceDeploy.getDeployType())) {//面源
orientList.add(survDeviceDeploy.getDeployCode());
orientIds.add(survDeviceDeploy.getId());
@ -154,24 +157,31 @@ public class SurvStationInfoController {
Integer dataCounts = hisdataOrientwaterService.getHisDataCount(orientList);
finalDataCounts=finalDataCounts+dataCounts;
}
if(!liveList.isEmpty()) {
//计算历史数据量
Integer dataCounts = hisdataLivestockwaterService.getHisDataCount(liveList);
finalDataCounts=finalDataCounts+dataCounts;
}
// //畜禽
// if(!liveList.isEmpty()) {
// //计算历史数据量
// Integer dataCounts = hisdataLivestockwaterService.getHisDataCount(liveList);
// finalDataCounts=finalDataCounts+dataCounts;
// }
//气实时
if(!airList.isEmpty()) {
//计算历史数据量
Integer dataCounts = hisdataAirService.getHisDataCount(airList);
finalDataCounts=finalDataCounts+dataCounts;
}
// if(!airList.isEmpty()) {
//
// //计算历史数据量
// Integer dataCounts = hisdataAirService.getHisDataCount(airList);
// finalDataCounts=finalDataCounts+dataCounts;
// }
//土壤实时
if(!soilList.isEmpty()){
//计算历史数据量
Integer dataCounts = hisdataSoilService.getHisDataCount(soilList);
finalDataCounts=finalDataCounts+dataCounts;
}
//水质实时
if(!waterList.isEmpty()){
//计算历史数据量
Integer dataCounts = hisdataSoilService.getHisDataCount(waterList);
finalDataCounts=finalDataCounts+dataCounts;
}
//获取数据量
record.setSurvDataCount(finalDataCounts);
//补充设备在线状态
@ -294,29 +304,30 @@ public class SurvStationInfoController {
Integer dataCounts = hisdataOrientwaterService.getHisDataCount(orientList);
finalDataCounts=finalDataCounts+dataCounts;
}
if(!liveList.isEmpty()) {
SurvTransdataLivestockwaterVo survTransdataLivestockwaterVo = livestockwaterService.getNewestDataWithStation(liveList);
ConstructLive constructLive = new ConstructLive();
constructLive.setDeploy(deployMap.get(survTransdataLivestockwaterVo.getDeployCode()));
constructLive.setTransdataLivestockwaterVo(survTransdataLivestockwaterVo);
LiveData.addAll(zhAdminFeignClient.constructLive(constructLive));
//计算历史数据量
Integer dataCounts = hisdataLivestockwaterService.getHisDataCount(liveList);
finalDataCounts=finalDataCounts+dataCounts;
}
//气实时
if(!airList.isEmpty()) {
SurvTransdataAirVo survTransdataAirVo=transdataAirService.getNewestDataWithStation(airList);
ConstructAir constructAir = new ConstructAir();
SurvTransdataAir survTransdataAir = new SurvTransdataAir();
BeanUtil.copyProperties(survTransdataAirVo,survTransdataAir);
constructAir.setTransdataAir(survTransdataAir);
constructAir.setDeploy(deployMap.get(survTransdataAirVo.getDeployCode()));
airData.addAll(zhAdminFeignClient.constructAir(constructAir));
//计算历史数据量
Integer dataCounts = hisdataAirService.getHisDataCount(airList);
finalDataCounts=finalDataCounts+dataCounts;
}
// //畜禽
// if(!liveList.isEmpty()) {
// SurvTransdataLivestockwaterVo survTransdataLivestockwaterVo = livestockwaterService.getNewestDataWithStation(liveList);
// ConstructLive constructLive = new ConstructLive();
// constructLive.setDeploy(deployMap.get(survTransdataLivestockwaterVo.getDeployCode()));
// constructLive.setTransdataLivestockwaterVo(survTransdataLivestockwaterVo);
// LiveData.addAll(zhAdminFeignClient.constructLive(constructLive));
// //计算历史数据量
// Integer dataCounts = hisdataLivestockwaterService.getHisDataCount(liveList);
// finalDataCounts=finalDataCounts+dataCounts;
// }
// //气实时
// if(!airList.isEmpty()) {
// SurvTransdataAirVo survTransdataAirVo=transdataAirService.getNewestDataWithStation(airList);
// ConstructAir constructAir = new ConstructAir();
// SurvTransdataAir survTransdataAir = new SurvTransdataAir();
// BeanUtil.copyProperties(survTransdataAirVo,survTransdataAir);
// constructAir.setTransdataAir(survTransdataAir);
// constructAir.setDeploy(deployMap.get(survTransdataAirVo.getDeployCode()));
// airData.addAll(zhAdminFeignClient.constructAir(constructAir));
// //计算历史数据量
// Integer dataCounts = hisdataAirService.getHisDataCount(airList);
// finalDataCounts=finalDataCounts+dataCounts;
// }
//土壤实时
if(!soilList.isEmpty()){
SurvTransdataSoilVo survTransdataSoilVo = transdataSoilService.getNewestDataWithStation(soilList);
@ -343,16 +354,16 @@ public class SurvStationInfoController {
Integer dataCounts = hisdataSoilService.getHisDataCount(waterList);
finalDataCounts=finalDataCounts+dataCounts;
}
//恶臭实时
if(!stinkList.isEmpty()){
SurvTransdataStinkVo survTransdataStinkVo = survTransdataVocsService.getNewestDataWithStation(stinkList);
ConstructStink constructStink = new ConstructStink();
constructStink.setTransdataStinkVo(survTransdataStinkVo);
stinkData.addAll(zhAdminFeignClient.constructStink(constructStink));
//计算历史数据量
Integer dataCounts = survHisdataVocsService.getHisDataCount(stinkList);
finalDataCounts=finalDataCounts+dataCounts;
}
// //恶臭实时
// if(!stinkList.isEmpty()){
// SurvTransdataStinkVo survTransdataStinkVo = survTransdataVocsService.getNewestDataWithStation(stinkList);
// ConstructStink constructStink = new ConstructStink();
// constructStink.setTransdataStinkVo(survTransdataStinkVo);
// stinkData.addAll(zhAdminFeignClient.constructStink(constructStink));
// //计算历史数据量
// Integer dataCounts = survHisdataVocsService.getHisDataCount(stinkList);
//// finalDataCounts=finalDataCounts+dataCounts;
// }
//获取数据量
curStation.setSurvDataCount(finalDataCounts);
//重新计算设备数