From a0f6846f53c4418b318c16a9ad759e96e0427df9 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Thu, 31 Jul 2025 13:26:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../handler/SocketDevResponseService.java | 15 +++++---------- .../handler/SocketSourceResponseService.java | 6 +----- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java index f96bf12c..2f9ebd86 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java @@ -736,11 +736,7 @@ public class SocketDevResponseService { successComm.clear(); failComm.clear(); Map> map = new HashMap<>(1); - List preDetections = BeanUtil.copyToList(FormalTestManager.devList, PreDetection.class); - preDetections.forEach(x -> { - x.setDevType(x.getIcdType()); - }); - map.put("deviceList", preDetections); + map.put("deviceList", FormalTestManager.devList); String jsonString = JSON.toJSONString(map); socketMsg.setRequestId(SourceOperateCodeEnum.YJC_XYJY.getValue()); socketMsg.setOperateCode(SourceOperateCodeEnum.DEV_INIT_GATHER_02.getValue()); @@ -824,11 +820,7 @@ public class SocketDevResponseService { successComm.clear(); failComm.clear(); Map> map = new HashMap<>(1); - List preDetections = BeanUtil.copyToList(FormalTestManager.devList, PreDetection.class); - preDetections.forEach(x -> { - x.setDevType(x.getIcdType()); - }); - map.put("deviceList", preDetections); + map.put("deviceList", FormalTestManager.devList); String jsonString = JSON.toJSONString(map); socketMsg.setRequestId(SourceOperateCodeEnum.YJC_XYJY.getValue()); socketMsg.setOperateCode(SourceOperateCodeEnum.DEV_INIT_GATHER_03.getValue()); @@ -1734,6 +1726,9 @@ public class SocketDevResponseService { List pqDevList = iPqDevService.getDevInfo(param.getDevIds()); 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.monitorIdListComm = pqDevList.stream().flatMap(x -> x.getMonitorList().stream()).map(PreDetection.MonitorListDTO::getLineId).collect(Collectors.toList()); diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketSourceResponseService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketSourceResponseService.java index 6707c9a1..f6b90485 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketSourceResponseService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketSourceResponseService.java @@ -237,11 +237,7 @@ public class SocketSourceResponseService { //开始设备通讯检测(发送设备初始化) //List devList = iPqDevService.getDevInfo(param.getDevIds()); Map> map = new HashMap<>(1); - List preDetections = BeanUtil.copyToList(FormalTestManager.devList, PreDetection.class); - preDetections.forEach(x -> { - x.setDevType(x.getIcdType()); - }); - map.put("deviceList", preDetections); + map.put("deviceList", FormalTestManager.devList); String jsonString = JSON.toJSONString(map); socketMsg.setRequestId(SourceOperateCodeEnum.YJC_SBTXJY.getValue()); socketMsg.setOperateCode(SourceOperateCodeEnum.DEV_INIT_GATHER_01.getValue());