This commit is contained in:
caozehui
2025-07-31 13:26:01 +08:00
parent a177d7991c
commit a0f6846f53
2 changed files with 6 additions and 15 deletions

View File

@@ -736,11 +736,7 @@ public class SocketDevResponseService {
successComm.clear(); successComm.clear();
failComm.clear(); failComm.clear();
Map<String, List<PreDetection>> map = new HashMap<>(1); Map<String, List<PreDetection>> map = new HashMap<>(1);
List<PreDetection> preDetections = BeanUtil.copyToList(FormalTestManager.devList, PreDetection.class); map.put("deviceList", FormalTestManager.devList);
preDetections.forEach(x -> {
x.setDevType(x.getIcdType());
});
map.put("deviceList", preDetections);
String jsonString = JSON.toJSONString(map); String jsonString = JSON.toJSONString(map);
socketMsg.setRequestId(SourceOperateCodeEnum.YJC_XYJY.getValue()); socketMsg.setRequestId(SourceOperateCodeEnum.YJC_XYJY.getValue());
socketMsg.setOperateCode(SourceOperateCodeEnum.DEV_INIT_GATHER_02.getValue()); socketMsg.setOperateCode(SourceOperateCodeEnum.DEV_INIT_GATHER_02.getValue());
@@ -824,11 +820,7 @@ public class SocketDevResponseService {
successComm.clear(); successComm.clear();
failComm.clear(); failComm.clear();
Map<String, List<PreDetection>> map = new HashMap<>(1); Map<String, List<PreDetection>> map = new HashMap<>(1);
List<PreDetection> preDetections = BeanUtil.copyToList(FormalTestManager.devList, PreDetection.class); map.put("deviceList", FormalTestManager.devList);
preDetections.forEach(x -> {
x.setDevType(x.getIcdType());
});
map.put("deviceList", preDetections);
String jsonString = JSON.toJSONString(map); String jsonString = JSON.toJSONString(map);
socketMsg.setRequestId(SourceOperateCodeEnum.YJC_XYJY.getValue()); socketMsg.setRequestId(SourceOperateCodeEnum.YJC_XYJY.getValue());
socketMsg.setOperateCode(SourceOperateCodeEnum.DEV_INIT_GATHER_03.getValue()); socketMsg.setOperateCode(SourceOperateCodeEnum.DEV_INIT_GATHER_03.getValue());
@@ -1734,6 +1726,9 @@ public class SocketDevResponseService {
List<PreDetection> pqDevList = iPqDevService.getDevInfo(param.getDevIds()); List<PreDetection> pqDevList = iPqDevService.getDevInfo(param.getDevIds());
FormalTestManager.devList = pqDevList; FormalTestManager.devList = pqDevList;
FormalTestManager.devList.forEach(x -> {
x.setDevType(x.getIcdType());
});
FormalTestManager.devMapMonitorNum = pqDevList.stream().collect(Collectors.toMap(PreDetection::getDevIP, it -> it.getMonitorList().stream().map(PreDetection.MonitorListDTO::getLineId).collect(Collectors.toList()))); FormalTestManager.devMapMonitorNum = pqDevList.stream().collect(Collectors.toMap(PreDetection::getDevIP, it -> it.getMonitorList().stream().map(PreDetection.MonitorListDTO::getLineId).collect(Collectors.toList())));
FormalTestManager.monitorIdListComm = pqDevList.stream().flatMap(x -> x.getMonitorList().stream()).map(PreDetection.MonitorListDTO::getLineId).collect(Collectors.toList()); FormalTestManager.monitorIdListComm = pqDevList.stream().flatMap(x -> x.getMonitorList().stream()).map(PreDetection.MonitorListDTO::getLineId).collect(Collectors.toList());

View File

@@ -237,11 +237,7 @@ public class SocketSourceResponseService {
//开始设备通讯检测(发送设备初始化) //开始设备通讯检测(发送设备初始化)
//List<PreDetection> devList = iPqDevService.getDevInfo(param.getDevIds()); //List<PreDetection> devList = iPqDevService.getDevInfo(param.getDevIds());
Map<String, List<PreDetection>> map = new HashMap<>(1); Map<String, List<PreDetection>> map = new HashMap<>(1);
List<PreDetection> preDetections = BeanUtil.copyToList(FormalTestManager.devList, PreDetection.class); map.put("deviceList", FormalTestManager.devList);
preDetections.forEach(x -> {
x.setDevType(x.getIcdType());
});
map.put("deviceList", preDetections);
String jsonString = JSON.toJSONString(map); String jsonString = JSON.toJSONString(map);
socketMsg.setRequestId(SourceOperateCodeEnum.YJC_SBTXJY.getValue()); socketMsg.setRequestId(SourceOperateCodeEnum.YJC_SBTXJY.getValue());
socketMsg.setOperateCode(SourceOperateCodeEnum.DEV_INIT_GATHER_01.getValue()); socketMsg.setOperateCode(SourceOperateCodeEnum.DEV_INIT_GATHER_01.getValue());