bug修复
This commit is contained in:
parent
4a9fe0e4f6
commit
21e2d2d788
|
|
@ -22,6 +22,7 @@ import org.jeecg.common.iot.common.VOWaterSurvIntegrateParam;
|
|||
import org.jeecg.common.util.R;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.common.vo.*;
|
||||
import org.jeecg.common.vo.inner.TransZhiBiaoVo;
|
||||
import org.jeecg.common.vo.statistic.ScreenIndexSummaryDetailVo;
|
||||
import org.jeecg.common.vo.statistic.ScreenSummaryVo;
|
||||
import org.jeecg.modules.appmana.service.*;
|
||||
|
|
@ -816,7 +817,9 @@ public class BigScreenController {
|
|||
SurvStationInfo survStationInfo = stationList.get(0);
|
||||
List<String> deviceList = new ArrayList<>();
|
||||
List<String> deployList = new ArrayList<>();
|
||||
survStationInfo.setDeviceCount(survStationInfo.getDeviceList().size());
|
||||
Map<String, List<ScEquZhibiao>> zhibiaoMap = new HashMap<>();
|
||||
List<String> orientIds = new ArrayList<>();
|
||||
|
||||
if(survStationInfo.getDeviceList()!=null&&survStationInfo.getDeviceList().size()>0){
|
||||
//补充设备数量
|
||||
survStationInfo.setDeviceCount(survStationInfo.getDeviceList().size());
|
||||
|
|
@ -849,12 +852,14 @@ public class BigScreenController {
|
|||
}
|
||||
else if(PollutionConstants.WATER_ORIENT.equals(survDeviceDeploy.getDeployType())) {//面源
|
||||
SurvTransdataOrientwaterVo transdataOrientwaterVo=transdataOrientwaterService.getNewestData(survDeviceDeploy.getDeployCode());
|
||||
orientIds.add(survDeviceDeploy.getId());
|
||||
if(transdataOrientwaterVo!=null) {
|
||||
List<CommonDataTrans> orientData = commonP3Service.constructOrient(transdataOrientwaterVo,survStationInfo,survDeviceDeploy);
|
||||
returnArrs = JSONArray.parseArray(JSONObject.toJSONString(orientData));
|
||||
}
|
||||
}else if(PollutionConstants.WATER_LIVE.equals(survDeviceDeploy.getDeployType())) {//畜禽
|
||||
SurvTransdataLivestockwaterVo transdataLivestockwaterVo=transdataLivestockwaterService.getNewestData(survDeviceDeploy.getDeployCode());
|
||||
orientIds.add(survDeviceDeploy.getId());
|
||||
if(transdataLivestockwaterVo!=null) {
|
||||
List<CommonDataTrans> liveData = commonP3Service.constructLive(transdataLivestockwaterVo,survStationInfo,survDeviceDeploy);
|
||||
returnArrs = JSONArray.parseArray(JSONObject.toJSONString(liveData));
|
||||
|
|
@ -868,7 +873,25 @@ public class BigScreenController {
|
|||
survStationInfo.getDeviceList().retainAll(remainList);
|
||||
//补充在线状态
|
||||
survStationInfo.setDeviceList(iotutils.addOnlineStatus(survStationInfo.getDeviceList()));
|
||||
List<ScEquZhibiao> equList = zhibiaoService.getAllChemical(deployList);
|
||||
if(equList.size()>0){
|
||||
zhibiaoMap = equList.stream().collect(Collectors.groupingBy(ScEquZhibiao::getEquId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//重新计算设备数
|
||||
int counts = survStationInfo.getDeviceList().size();
|
||||
if(!orientIds.isEmpty()){
|
||||
//已配置的设备用指标数,未配置用1;
|
||||
for (String id : orientIds) {
|
||||
List<ScEquZhibiao> zhibiaos = zhibiaoMap.get(id);
|
||||
if(zhibiaos!=null){
|
||||
counts = counts + zhibiaos.size() -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
survStationInfo.setDeviceCount(survStationInfo.getDeviceList().size());
|
||||
survStationInfo.setLatestData(returnArrs);
|
||||
survStationInfo.setLatestSoilData(returnSoilArrs);
|
||||
survStationInfo.setLatestAirData(returnAirArrs);
|
||||
|
|
|
|||
|
|
@ -301,8 +301,7 @@ public class IotCommonP3ServiceImpl {
|
|||
}
|
||||
tempEnt.setSurvItem(pollutionEnum.getCode());
|
||||
String vals = EntityFieldUtil.getFieldValue(transdataOrientwaterVo,zhibiao.getEntityField(),String.class);
|
||||
log.warn(zhibiao.getEntityField()+"=============wtch==============="+vals);
|
||||
EntityFieldUtil.setFieldValue(tempEnt,zhibiao.getEntityField(),vals);
|
||||
tempEnt.setValue(vals);
|
||||
tempEnt.setDeployId(deploy.getId());
|
||||
listFinal.add(tempEnt);
|
||||
}
|
||||
|
|
@ -426,7 +425,7 @@ public class IotCommonP3ServiceImpl {
|
|||
tempEnt.setDataDateTime(transdataLivestockwaterVo.getDataDateTime());
|
||||
tempEnt.setSurvItem(pollutionEnum.getCode());
|
||||
String vals = EntityFieldUtil.getFieldValue(transdataLivestockwaterVo,zhibiao.getEntityField(),String.class);
|
||||
EntityFieldUtil.setFieldValue(tempEnt,zhibiao.getEntityField(),vals);
|
||||
tempEnt.setValue(vals);
|
||||
tempEnt.setDeployId(deploy.getId());
|
||||
listFinal.add(tempEnt);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -211,6 +211,8 @@ public class SurvStationInfoController {
|
|||
List<String> liveList = new ArrayList<>();
|
||||
List<String> stinkList = new ArrayList<>();
|
||||
List<String> waterList = new ArrayList<>();
|
||||
List<String> orientIds = new ArrayList<>();
|
||||
Map<String, List<ScEquZhibiao>> zhibiaoMap = new HashMap<>();
|
||||
if(curStation.getDeviceList()!=null&&curStation.getDeviceList().size()>0){
|
||||
for (SurvDeviceDeploy survDeviceDeploy : curStation.getDeviceList()) {
|
||||
deployList.add(survDeviceDeploy.getId());
|
||||
|
|
@ -222,8 +224,10 @@ public class SurvStationInfoController {
|
|||
waterList.add(survDeviceDeploy.getDeployCode());
|
||||
}else if(PollutionConstants.WATER_ORIENT.equals(survDeviceDeploy.getDeployType())) {//面源
|
||||
orientList.add(survDeviceDeploy.getDeployCode());
|
||||
orientIds.add(survDeviceDeploy.getId());
|
||||
}else if(PollutionConstants.WATER_LIVE.equals(survDeviceDeploy.getDeployType())) {//畜禽
|
||||
liveList.add(survDeviceDeploy.getDeployCode());
|
||||
orientIds.add(survDeviceDeploy.getId());
|
||||
}else if(PollutionConstants.STINK.equals(survDeviceDeploy.getDeployType())) {//恶臭
|
||||
stinkList.add(survDeviceDeploy.getDeployCode());
|
||||
}else if(PollutionConstants.CAMERA.equals(survDeviceDeploy.getDeployType())) {//摄像头
|
||||
|
|
@ -231,6 +235,7 @@ public class SurvStationInfoController {
|
|||
}
|
||||
List<ScEquZhibiao> equList = zhibiaoService.getShowedChemical(deployList);
|
||||
if(equList.size()>0){
|
||||
zhibiaoMap = equList.stream().collect(Collectors.groupingBy(ScEquZhibiao::getEquId));
|
||||
TransZhiBiaoVo transZhiBiaoVo = new TransZhiBiaoVo();
|
||||
transZhiBiaoVo.setZhibiaos(equList);
|
||||
allSurv = zhAdminFeignClient.translatePollution(transZhiBiaoVo);
|
||||
|
|
@ -295,7 +300,18 @@ public class SurvStationInfoController {
|
|||
}
|
||||
//获取数据量
|
||||
curStation.setSurvDataCount(finalDataCounts);
|
||||
curStation.setDeviceCount(curStation.getDeviceList().size());
|
||||
//重新计算设备数
|
||||
int counts = curStation.getDeviceList().size();
|
||||
if(!orientIds.isEmpty()){
|
||||
//已配置的设备用指标数,未配置用1;
|
||||
for (String id : orientIds) {
|
||||
List<ScEquZhibiao> zhibiaos = zhibiaoMap.get(id);
|
||||
if(zhibiaos!=null){
|
||||
counts = counts + zhibiaos.size() -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
curStation.setDeviceCount(counts);
|
||||
// curStation.setSurvItemCount(allSurv.size());
|
||||
curStation.setSurvItemCount(curStation.getSurvObj().length);
|
||||
List<PollutionSetVo> survList = new ArrayList<>();
|
||||
|
|
@ -305,6 +321,7 @@ public class SurvStationInfoController {
|
|||
survList = zhAdminFeignClient.translateArrPollution(transSurvObjVo);
|
||||
}
|
||||
curStation.setSurvColorItems(survList);
|
||||
|
||||
jsonObject.put("stationInfo",curStation);
|
||||
//TODO 实时监测数据
|
||||
jsonObject.put("liveSurvData",jsonArray);
|
||||
|
|
|
|||
Loading…
Reference in New Issue