From c5e77ee9b181293146ec14c7d7b1c927eb3d179b Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Wed, 15 Apr 2026 09:45:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=90=E5=8F=97=E7=BB=93=E6=9E=9C=E3=80=81?= =?UTF-8?q?=E5=8F=98=E9=A2=91=E5=99=A8=E9=87=8D=E6=96=B0=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?Socket=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PreDetectionController.java | 8 ++--- .../SocketFreqConverterDevService.java | 33 +++++++++++-------- .../handler/SocketFreqConverterService.java | 31 ++++++++--------- .../service/PreDetectionService.java | 2 +- .../service/impl/PreDetectionServiceImpl.java | 18 +++++----- .../detection/util/socket/SocketManager.java | 11 ------- .../NettyFreqConverterClientHandler.java | 6 ++-- .../NettyFreqConverterDevClientHandler.java | 2 +- .../mapper/PqFreqConverterTestResMapper.java | 11 +++++++ .../pojo/po/PqFreqConverterTestRes.java | 32 ++++++++++++++++++ .../IPqFreqConverterTestResService.java | 18 ++++++++++ .../PqFreqConverterConfigServiceImpl.java | 13 +++++++- .../PqFreqConverterTestResServiceImpl.java | 22 +++++++++++++ entrance/src/main/resources/application.yml | 2 +- 14 files changed, 147 insertions(+), 62 deletions(-) create mode 100644 detection/src/main/java/com/njcn/gather/freqConverter/mapper/PqFreqConverterTestResMapper.java create mode 100644 detection/src/main/java/com/njcn/gather/freqConverter/pojo/po/PqFreqConverterTestRes.java create mode 100644 detection/src/main/java/com/njcn/gather/freqConverter/service/IPqFreqConverterTestResService.java create mode 100644 detection/src/main/java/com/njcn/gather/freqConverter/service/impl/PqFreqConverterTestResServiceImpl.java diff --git a/detection/src/main/java/com/njcn/gather/detection/controller/PreDetectionController.java b/detection/src/main/java/com/njcn/gather/detection/controller/PreDetectionController.java index 4cd63a77..4cc915c3 100644 --- a/detection/src/main/java/com/njcn/gather/detection/controller/PreDetectionController.java +++ b/detection/src/main/java/com/njcn/gather/detection/controller/PreDetectionController.java @@ -181,22 +181,22 @@ public class PreDetectionController extends BaseController { @OperateInfo(info = LogEnum.SYSTEM_COMMON) @GetMapping("/startFreqConverter") @ApiOperation("开启变频器测试") - public HttpResult startFreqConverter(@RequestParam("loginName") String loginName, @RequestParam("converterId") String converterId, @RequestParam("monitorId") String monitorId) { + public HttpResult startFreqConverter(@RequestParam("userId") String userId, @RequestParam("converterId") String converterId, @RequestParam("monitorId") String monitorId) { String methodDescribe = getMethodDescribe("startFreqConverter"); LogUtil.njcnDebug(log, "{}", methodDescribe); - preDetectionService.startFreqConverter(loginName, converterId, monitorId); + preDetectionService.startFreqConverter(userId, converterId, monitorId); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); } @OperateInfo(info = LogEnum.SYSTEM_COMMON) @GetMapping("/stopFreqConverter") @ApiOperation("关闭变频器测试") - public HttpResult stopFreqConverter(@RequestParam("loginName") String loginName) { + public HttpResult stopFreqConverter(@RequestParam("userId") String userId) { String methodDescribe = getMethodDescribe("stopFreqConverter"); LogUtil.njcnDebug(log, "{}", methodDescribe); - preDetectionService.stopFreqConverter(loginName + CnSocketUtil.FREQ_CONVERTER_TAG, loginName + CnSocketUtil.DEV_TAG); + preDetectionService.stopFreqConverter(userId + CnSocketUtil.FREQ_CONVERTER_TAG, userId + CnSocketUtil.DEV_TAG); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); } } diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java index 244cc325..1f3bb241 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java @@ -19,11 +19,12 @@ import com.njcn.gather.detection.util.socket.SocketManager; import com.njcn.gather.detection.util.socket.cilent.NettyClient; import com.njcn.gather.detection.util.socket.cilent.NettyFreqConverterDevClientHandler; import com.njcn.gather.detection.util.socket.config.SocketConnectionConfig; +import com.njcn.gather.detection.util.socket.websocket.WebServiceManager; import com.njcn.gather.device.pojo.vo.PreDetection; import com.njcn.gather.device.service.IPqDevService; import com.njcn.gather.dip.pojo.po.PqDipData; import com.njcn.gather.dip.service.IPqDipDataService; -import com.njcn.gather.freqConverter.service.IPqFreqConverterConfigService; +import com.njcn.gather.freqConverter.service.IPqFreqConverterTestResService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -41,8 +42,9 @@ public class SocketFreqConverterDevService { private final SocketConnectionConfig socketConnectionConfig; private final IPqDevService pqDevService; private final IPqDipDataService pqDipDataService; - private final IPqFreqConverterConfigService pqFreqConverterConfigService; + private final IPqFreqConverterTestResService pqFreqConverterTestResService; private String monitorId; + private String userId; /** * 连接设备Socket @@ -62,18 +64,21 @@ public class SocketFreqConverterDevService { }); } - private void init(String converterId, String monitorId) { + private void init(String userId, String converterId, String monitorId) { FormalTestManager.freqConverterDevStep = null; FormalTestManager.stopFlag = false; + FormalTestManager.isRemoveSocket = false; pqDipDataService.clearAllData(FormalTestManager.freqConverterTableSuffix); + pqFreqConverterTestResService.clearAllData(FormalTestManager.freqConverterTableSuffix); + this.userId = userId; this.monitorId = monitorId; } /** * 连接设备 */ - public void connectionDev(String devTag, String converterId, String monitorId) { - this.init(converterId, monitorId); + public void connectionDev(String userId, String devTag, String converterId, String monitorId) { + this.init(userId, converterId, monitorId); String payload = buildSingleMonitorPayload(monitorId); if (StrUtil.isBlank(payload)) { @@ -107,6 +112,11 @@ public class SocketFreqConverterDevService { private void handleYjcSbtxjy(String devTag, SocketDataMsg socketDataMsg) { SourceResponseCodeEnum responseCodeEnum = SourceResponseCodeEnum.getDictDataEnumByCode(socketDataMsg.getCode()); switch (Objects.requireNonNull(responseCodeEnum)) { + case UNPROCESSED_BUSINESS: + break; + case RE_OPERATE: + WebServiceManager.sendMsg(this.userId, JSON.toJSONString(socketDataMsg)); + break; case SUCCESS: this.sendGetDipDataMsg(devTag); FormalTestManager.freqConverterDevStep = SourceOperateCodeEnum.FORMAL_REAL; @@ -147,7 +157,7 @@ public class SocketFreqConverterDevService { switch (responseCodeEnum) { case SUCCESS: - cleanup(devTag, true); + cleanup(devTag); break; default: log.warn("设备关闭响应失败,devTag={}, operateCode={}, code={}, data={}", devTag, socketDataMsg.getOperateCode(), socketDataMsg.getCode(), socketDataMsg.getData()); @@ -179,7 +189,7 @@ public class SocketFreqConverterDevService { } List matchedMonitorList = monitorList.stream() - .filter(item -> split[1].equals(item.getLineId())) + .filter(item -> split[1].equals(StrUtil.EMPTY + item.getLine())) .collect(Collectors.toList()); if (CollUtil.isEmpty(matchedMonitorList)) { return null; @@ -264,12 +274,9 @@ public class SocketFreqConverterDevService { return listDTO.getT(); } - public void cleanup(String devTag, boolean removeSocket) { + public void cleanup(String devTag) { FormalTestManager.freqConverterDevStep = null; - if (removeSocket) { - SocketManager.removeUser(devTag); - } else { - SocketManager.clearUser(devTag); - } + FormalTestManager.isRemoveSocket = true; + SocketManager.removeUser(devTag); } } diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java index fbcab947..8f1afaab 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java @@ -5,7 +5,6 @@ import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSON; -import com.njcn.db.mybatisplus.handler.DynamicTableNameHandler; import com.njcn.gather.detection.pojo.dto.FreqConverterRespDTO; import com.njcn.gather.detection.pojo.enums.SourceOperateCodeEnum; import com.njcn.gather.detection.pojo.vo.SocketMsg; @@ -42,6 +41,7 @@ public class SocketFreqConverterService { private final SocketConnectionConfig socketConnectionConfig; private final IPqFreqConverterConfigService pqFreqConverterConfigService; + private String userId; /** * 连接变频器Socket @@ -98,19 +98,21 @@ public class SocketFreqConverterService { } } - private void init(String converterId, String monitorId) { + private void init(String userId, String converterId, String monitorId) { + this.userId = userId; FormalTestManager.freqConverterStep = null; Integer suffix = pqFreqConverterConfigService.getSuffix(converterId); freqConverterService.clearAllData(suffix); FormalTestManager.freqConverterTableSuffix = suffix; + FormalTestManager.isRemoveSocket = false; clearScheduleTask(); } /** * 连接变频器 */ - public void connectionFreqConverter(String freqConverterTag, String converterId, String monitorId) { - this.init(converterId, monitorId); + public void connectionFreqConverter(String userId, String freqConverterTag, String converterId, String monitorId) { + this.init(userId, converterId, monitorId); SocketMsg> socketMsg = new SocketMsg<>(); socketMsg.setOperateCode(SourceOperateCodeEnum.CMD_INIT_SERIAL.getValue()); @@ -154,19 +156,12 @@ public class SocketFreqConverterService { this.sendClose(converterTag); } - public void cleanup(String converterChannelTag, boolean removeSocket) { + public void cleanup(String converterChannelTag) { clearScheduleTask(); FormalTestManager.freqConverterStep = null; - if (!removeSocket) { - FormalTestManager.stopFlag = true; - } else { - FormalTestManager.stopFlag = false; - } - if (removeSocket) { - SocketManager.removeUser(converterChannelTag); - } else { - SocketManager.clearUser(converterChannelTag); - } + FormalTestManager.stopFlag = false; + FormalTestManager.isRemoveSocket = true; + SocketManager.removeUser(converterChannelTag); } private void handleInitSerial(String converterChannelTag, FreqConverterRespDTO respDTO) { @@ -177,7 +172,7 @@ public class SocketFreqConverterService { FormalTestManager.scheduler = Executors.newScheduledThreadPool(1); FormalTestManager.scheduledFuture = FormalTestManager.scheduler.scheduleAtFixedRate(() -> { this.sendGetDeviceStatusMsg(converterChannelTag); - }, 0l, 200l, TimeUnit.MILLISECONDS); + }, 0l, 200l, TimeUnit.SECONDS); } } else { log.error("变频器初始化串口失败,converterChannelTag={}, converterId={}, converterTag={}, msg={}", converterChannelTag, converterChannelTag, converterChannelTag, respDTO.getMessage()); @@ -197,12 +192,12 @@ public class SocketFreqConverterService { } else { FormalTestManager.stopFlag = false; } - freqConverterService.saveFreqConverterStatus(FormalTestManager.freqConverterTableSuffix,freqConverterStatus); + freqConverterService.saveFreqConverterStatus(FormalTestManager.freqConverterTableSuffix, freqConverterStatus); } private void handleCloseSerial(String converterChannelTag, FreqConverterRespDTO respDTO) { if (respDTO.getCode() == 0 && respDTO.getSuccess()) { - cleanup(converterChannelTag, true); + cleanup(converterChannelTag); } else { this.sendClose(converterChannelTag); } diff --git a/detection/src/main/java/com/njcn/gather/detection/service/PreDetectionService.java b/detection/src/main/java/com/njcn/gather/detection/service/PreDetectionService.java index e37bed66..1cd5f6ba 100644 --- a/detection/src/main/java/com/njcn/gather/detection/service/PreDetectionService.java +++ b/detection/src/main/java/com/njcn/gather/detection/service/PreDetectionService.java @@ -65,7 +65,7 @@ public interface PreDetectionService { void startCoefficient(); - void startFreqConverter(String name, String converterId, String monitorId); + void startFreqConverter(String userId, String converterId, String monitorId); void stopFreqConverter(String converterId, String monitorId); } 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 5f0b26d0..c39737e5 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 @@ -394,19 +394,19 @@ public class PreDetectionServiceImpl implements PreDetectionService { } @Override - public void startFreqConverter(String loginName, String converterId, String monitorId) { - String freqConverterTag = loginName + CnSocketUtil.FREQ_CONVERTER_TAG; - String devTag = loginName + CnSocketUtil.DEV_TAG; + public void startFreqConverter(String userId, String converterId, String monitorId) { + String freqConverterTag = userId + CnSocketUtil.FREQ_CONVERTER_TAG; + String devTag = userId + CnSocketUtil.DEV_TAG; socketFreqConverterService.connectSocket(freqConverterTag); - //socketFreqConverterDevService.connectSocket(devTag); + socketFreqConverterDevService.connectSocket(devTag); long startTime = System.currentTimeMillis(); long timeout = 3000; // 3秒超时时间 while (true) { -// if (SocketManager.isChannelActive(freqConverterTag) && SocketManager.isChannelActive(devTag)) { - if (SocketManager.isChannelActive(freqConverterTag)) { - socketFreqConverterService.connectionFreqConverter(freqConverterTag, converterId, monitorId); - //socketFreqConverterDevService.connectionDev(devTag, converterId, monitorId); + if (SocketManager.isChannelActive(freqConverterTag) && SocketManager.isChannelActive(devTag)) { +// if (SocketManager.isChannelActive(freqConverterTag)) { + socketFreqConverterService.connectionFreqConverter(userId, freqConverterTag, converterId, monitorId); + socketFreqConverterDevService.connectionDev(userId, devTag, converterId, monitorId); break; } @@ -421,7 +421,7 @@ public class PreDetectionServiceImpl implements PreDetectionService { @Override public void stopFreqConverter(String converterTag, String devTag) { socketFreqConverterService.stopTest(converterTag, devTag); - socketFreqConverterDevService.stopTest(converterTag, converterTag); + socketFreqConverterDevService.stopTest(converterTag, devTag); } /** diff --git a/detection/src/main/java/com/njcn/gather/detection/util/socket/SocketManager.java b/detection/src/main/java/com/njcn/gather/detection/util/socket/SocketManager.java index c2ecaf62..d358e3d5 100644 --- a/detection/src/main/java/com/njcn/gather/detection/util/socket/SocketManager.java +++ b/detection/src/main/java/com/njcn/gather/detection/util/socket/SocketManager.java @@ -81,17 +81,6 @@ public class SocketManager { socketGroup.remove(userId); } - public static void clearUser(String userId) { - Channel channel = socketSessions.remove(userId); - NioEventLoopGroup eventExecutors = socketGroup.remove(userId); - if (ObjectUtil.isNotNull(eventExecutors)) { - eventExecutors.shutdownGracefully(); - } - if (ObjectUtil.isNotNull(channel)) { - log.info("{}__{}已清理客户端会话", userId, channel.id()); - } - } - public static Channel getChannelByUserId(String userId) { return socketSessions.get(userId); } diff --git a/detection/src/main/java/com/njcn/gather/detection/util/socket/cilent/NettyFreqConverterClientHandler.java b/detection/src/main/java/com/njcn/gather/detection/util/socket/cilent/NettyFreqConverterClientHandler.java index d2a8b727..f8d44b4f 100644 --- a/detection/src/main/java/com/njcn/gather/detection/util/socket/cilent/NettyFreqConverterClientHandler.java +++ b/detection/src/main/java/com/njcn/gather/detection/util/socket/cilent/NettyFreqConverterClientHandler.java @@ -50,7 +50,7 @@ public class NettyFreqConverterClientHandler extends SimpleChannelInboundHandler /** * 构造方法 * - * @param converterChannelTag 变频器Chanel唯一标识符 + * @param converterChannelTag 变频器Chanel唯一标识符 * @param socketFreqConverterService 变频器Socket响应服务 */ public NettyFreqConverterClientHandler(String converterChannelTag, SocketFreqConverterService socketFreqConverterService) { @@ -93,9 +93,9 @@ public class NettyFreqConverterClientHandler extends SimpleChannelInboundHandler public void channelInactive(ChannelHandlerContext ctx) throws Exception { log.warn("变频器连接已断开,converterChannelTag={}", converterChannelTag); - socketFreqConverterService.cleanup(converterChannelTag, false); + socketFreqConverterService.cleanup(converterChannelTag); - if (!isReconnecting && reconnectAttempts < MAX_RECONNECT_ATTEMPTS) { + if (!isReconnecting && reconnectAttempts < MAX_RECONNECT_ATTEMPTS && !FormalTestManager.isRemoveSocket) { attemptReconnect(ctx); } else if (reconnectAttempts >= MAX_RECONNECT_ATTEMPTS) { log.error("变频器重连失败,已达到最大重连次数{}次,converterChannelTag={}", MAX_RECONNECT_ATTEMPTS, converterChannelTag); diff --git a/detection/src/main/java/com/njcn/gather/detection/util/socket/cilent/NettyFreqConverterDevClientHandler.java b/detection/src/main/java/com/njcn/gather/detection/util/socket/cilent/NettyFreqConverterDevClientHandler.java index ab33cb96..defd39d4 100644 --- a/detection/src/main/java/com/njcn/gather/detection/util/socket/cilent/NettyFreqConverterDevClientHandler.java +++ b/detection/src/main/java/com/njcn/gather/detection/util/socket/cilent/NettyFreqConverterDevClientHandler.java @@ -44,7 +44,7 @@ public class NettyFreqConverterDevClientHandler extends SimpleChannelInboundHand @Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { log.warn("设备连接已断开,devChannelTag={}", devChannelTag); - socketFreqConverterDevService.cleanup(devChannelTag, false); + socketFreqConverterDevService.cleanup(devChannelTag); super.channelInactive(ctx); } diff --git a/detection/src/main/java/com/njcn/gather/freqConverter/mapper/PqFreqConverterTestResMapper.java b/detection/src/main/java/com/njcn/gather/freqConverter/mapper/PqFreqConverterTestResMapper.java new file mode 100644 index 00000000..fef3d60a --- /dev/null +++ b/detection/src/main/java/com/njcn/gather/freqConverter/mapper/PqFreqConverterTestResMapper.java @@ -0,0 +1,11 @@ +package com.njcn.gather.freqConverter.mapper; + +import com.github.yulichang.base.MPJBaseMapper; +import com.njcn.gather.freqConverter.pojo.po.PqFreqConverterTestRes; + +/** + * @author caozehui + * @data 2026-04-14 + */ +public interface PqFreqConverterTestResMapper extends MPJBaseMapper { +} diff --git a/detection/src/main/java/com/njcn/gather/freqConverter/pojo/po/PqFreqConverterTestRes.java b/detection/src/main/java/com/njcn/gather/freqConverter/pojo/po/PqFreqConverterTestRes.java new file mode 100644 index 00000000..b4942547 --- /dev/null +++ b/detection/src/main/java/com/njcn/gather/freqConverter/pojo/po/PqFreqConverterTestRes.java @@ -0,0 +1,32 @@ +package com.njcn.gather.freqConverter.pojo.po; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +/** + * @author caozehui + * @data 2026-04-14 + */ +@Data +@TableName(value = "ad_harmonic_xx") +public class PqFreqConverterTestRes { + /** + * 主键ID + */ + private String id; + + /** + * 装置暂降数据id + */ + private String dipId; + + /** + * 变频器状态数据id + */ + private String statusId; + + /** + * 0为不耐受,1为耐受 + */ + private Boolean tolerant; +} diff --git a/detection/src/main/java/com/njcn/gather/freqConverter/service/IPqFreqConverterTestResService.java b/detection/src/main/java/com/njcn/gather/freqConverter/service/IPqFreqConverterTestResService.java new file mode 100644 index 00000000..f704f2bf --- /dev/null +++ b/detection/src/main/java/com/njcn/gather/freqConverter/service/IPqFreqConverterTestResService.java @@ -0,0 +1,18 @@ +package com.njcn.gather.freqConverter.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.njcn.gather.freqConverter.pojo.po.PqFreqConverterTestRes; + +/** + * @author caozehui + * @data 2026-04-14 + */ +public interface IPqFreqConverterTestResService extends IService { + /** + * 清空所有数据 + * + * @param suffix 表后缀 + * @return + */ + void clearAllData(Integer suffix); +} diff --git a/detection/src/main/java/com/njcn/gather/freqConverter/service/impl/PqFreqConverterConfigServiceImpl.java b/detection/src/main/java/com/njcn/gather/freqConverter/service/impl/PqFreqConverterConfigServiceImpl.java index eab9ee2e..ecb179da 100644 --- a/detection/src/main/java/com/njcn/gather/freqConverter/service/impl/PqFreqConverterConfigServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/freqConverter/service/impl/PqFreqConverterConfigServiceImpl.java @@ -72,6 +72,15 @@ public class PqFreqConverterConfigServiceImpl extends ServiceImpl pqFreqConverterConfigs = this.listByIds(ids); for (PqFreqConverterConfig pqFreqConverterConfig : pqFreqConverterConfigs) { Integer suffix = pqFreqConverterConfig.getSuffix(); - sql.append("pq_freq_converter_status_" + suffix + ",").append("pq_dip_data_" + suffix + ","); + sql.append("pq_freq_converter_status_" + suffix + ",") + .append("pq_dip_data_" + suffix + ",") + .append("pq_freq_converter_test_res_" + suffix + ","); } sql.deleteCharAt(sql.length() - 1); diff --git a/detection/src/main/java/com/njcn/gather/freqConverter/service/impl/PqFreqConverterTestResServiceImpl.java b/detection/src/main/java/com/njcn/gather/freqConverter/service/impl/PqFreqConverterTestResServiceImpl.java new file mode 100644 index 00000000..84217470 --- /dev/null +++ b/detection/src/main/java/com/njcn/gather/freqConverter/service/impl/PqFreqConverterTestResServiceImpl.java @@ -0,0 +1,22 @@ +package com.njcn.gather.freqConverter.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njcn.db.mybatisplus.handler.DynamicTableNameHandler; +import com.njcn.gather.freqConverter.mapper.PqFreqConverterTestResMapper; +import com.njcn.gather.freqConverter.pojo.po.PqFreqConverterTestRes; +import com.njcn.gather.freqConverter.service.IPqFreqConverterTestResService; +import org.springframework.stereotype.Service; + +/** + * @author caozehui + * @data 2026-04-14 + */ +@Service +public class PqFreqConverterTestResServiceImpl extends ServiceImpl implements IPqFreqConverterTestResService { + @Override + public void clearAllData(Integer suffix) { + DynamicTableNameHandler.setTableName("pq_freq_converter_test_res_" + suffix); + this.remove(null); + DynamicTableNameHandler.remove(); + } +} diff --git a/entrance/src/main/resources/application.yml b/entrance/src/main/resources/application.yml index 78e870f3..a5e44e07 100644 --- a/entrance/src/main/resources/application.yml +++ b/entrance/src/main/resources/application.yml @@ -63,7 +63,7 @@ socket: # port: 61000 webSocket: - port: 7777 + port: 7778 #源参数下发,暂态数据默认值 Dip: