|
|
|
@ -199,7 +199,9 @@ public class PsdcSceneServiceImpl implements IPsdcSceneService { |
|
|
|
|
DeviceVo deviceVo = new DeviceVo(); |
|
|
|
|
for (int i = 0; i < listByCode.size(); i++) { |
|
|
|
|
SceneVo sv = listByCode.get(i); |
|
|
|
|
// System.out.println("序号 = " + i + ", 元素" + sv + "\n");
|
|
|
|
|
if (deviceId == sv.getDeviceId()) { |
|
|
|
|
// System.out.println("上行: " + i + "\n");
|
|
|
|
|
deviceVo.setDeviceId(sv.getDeviceId()); |
|
|
|
|
deviceVo.setDeviceName(sv.getDeviceName()); |
|
|
|
|
deviceVo.setDeviceSn(sv.getDeviceSn()); |
|
|
|
@ -214,10 +216,12 @@ public class PsdcSceneServiceImpl implements IPsdcSceneService { |
|
|
|
|
deviceVo.setTemp(sv.getSceneValue()); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
if (1 == listByCode.size()){ |
|
|
|
|
if (1 == listByCode.size() || i == listByCode.size() - 1){ |
|
|
|
|
ary.add(deviceVo); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
// System.out.println("下发: " + i + "\n");
|
|
|
|
|
ary.add(deviceVo); |
|
|
|
|
deviceId = sv.getDeviceId(); |
|
|
|
|
deviceVo = new DeviceVo(); |
|
|
|
@ -248,9 +252,11 @@ public class PsdcSceneServiceImpl implements IPsdcSceneService { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// System.out.println("终端元素 = " + ary + "\n");
|
|
|
|
|
} |
|
|
|
|
psr.setDeviceVos(ary); |
|
|
|
|
} |
|
|
|
|
// System.out.println("集合:" + sceneRes + "\n");
|
|
|
|
|
return sceneRes; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|