Commit 0105484b authored by wuqinghua's avatar wuqinghua

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	gassafetyprogress-web/src/views/regulation/pipe/index.vue
parent c6426f6e
...@@ -156,14 +156,25 @@ public class PipeInterfaceController { ...@@ -156,14 +156,25 @@ public class PipeInterfaceController {
@RequestBody @RequestBody
@RequestMapping("/selectvalveData") @RequestMapping("/selectvalveData")
public DeviceDataList selectvalveData(){ public DeviceDataList selectvalveData(){
DeviceDataList deviceDataList=new DeviceDataList();
//查询阀门井数据 //查询阀门井数据
List<DeviceData> pipeDates = iPipeInterfaceService.selectvalveData(); List<DeviceData> pipeDates = iPipeInterfaceService.selectvalveData();
//查询下级数据
List<PressureFlow> pressureFlows1 = iPipeInterfaceService.selectPressureFlow("1");
//最后返回的封装类型
DeviceDataList deviceDataList=new DeviceDataList();
//调压箱数据循环
for (int i=0;i<pipeDates.size();i++){ for (int i=0;i<pipeDates.size();i++){
//查询下级设备数据 //临时存下级数据id
List<PressureFlow> pressureFlows = iPipeInterfaceService.selectPressureFlow(pipeDates.get(i).getDeviceId()); List<PressureFlow> pressList=new ArrayList<>();
for (int s=0;s<pressureFlows1.size();s++){
//判断调压箱id与下级数据调压箱id是否相等
if (pressureFlows1.get(s).getDeviceId()==pipeDates.get(i).getDeviceId()){
//下级数据添加进临时存储数据的数组中
pressList.add(pressureFlows1.get(s));
}
}
pipeDates.get(i).setPressureFlows(pressList);
pipeDates.get(i).setIconType(3); pipeDates.get(i).setIconType(3);
pipeDates.get(i).setPressureFlows(pressureFlows);
} }
deviceDataList.setData(pipeDates); deviceDataList.setData(pipeDates);
return deviceDataList; return deviceDataList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment