From 34d4321290bf47200d4f4e6619b4bc8e6572ac3c Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Sat, 8 Mar 2025 14: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 --- .../gather/detection/handler/SocketSourceResponseService.java | 4 +++- .../njcn/gather/detection/pojo/param/PreDetectionParam.java | 1 + .../detection/service/impl/PreDetectionServiceImpl.java | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) 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 c607c925..eb5acdf5 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 @@ -100,7 +100,9 @@ public class SocketSourceResponseService { if (ObjectUtil.isNotNull(dictDataEnumByCode)) { switch (dictDataEnumByCode) { case SUCCESS: - WebServiceManager.sendMsg(param.getUserPageId(), JSON.toJSONString(socketDataMsg)); + if(param.getSendWebMsg()){ + WebServiceManager.sendMsg(param.getUserPageId(), JSON.toJSONString(socketDataMsg)); + } System.out.println("模拟检测-源初始化成功"); break; case UNPROCESSED_BUSINESS: diff --git a/detection/src/main/java/com/njcn/gather/detection/pojo/param/PreDetectionParam.java b/detection/src/main/java/com/njcn/gather/detection/pojo/param/PreDetectionParam.java index fb5df3a1..00f9b7b3 100644 --- a/detection/src/main/java/com/njcn/gather/detection/pojo/param/PreDetectionParam.java +++ b/detection/src/main/java/com/njcn/gather/detection/pojo/param/PreDetectionParam.java @@ -62,4 +62,5 @@ public class PreDetectionParam { */ private String code; + private Boolean sendWebMsg; } diff --git a/detection/src/main/java/com/njcn/gather/detection/service/impl/PreDetectionServiceImpl.java b/detection/src/main/java/com/njcn/gather/detection/service/impl/PreDetectionServiceImpl.java index 97b9231a..24aaf0d1 100644 --- a/detection/src/main/java/com/njcn/gather/detection/service/impl/PreDetectionServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/detection/service/impl/PreDetectionServiceImpl.java @@ -224,6 +224,7 @@ public class PreDetectionServiceImpl implements PreDetectionService { PreDetectionParam preDetectionParam = new PreDetectionParam(); preDetectionParam.setSourceId(param.getSourceId()); preDetectionParam.setUserPageId(param.getUserPageId()); + preDetectionParam.setSendWebMsg(true); specialDealSimulate(preDetectionParam); @@ -250,6 +251,7 @@ public class PreDetectionServiceImpl implements PreDetectionService { PreDetectionParam preDetectionParam = new PreDetectionParam(); preDetectionParam.setSourceId(param.getSourceId()); preDetectionParam.setUserPageId(param.getUserPageId()); + preDetectionParam.setSendWebMsg(false); this.sendYtxSocketSimulate(preDetectionParam); } //组装源控制脚本