From d5dab07dc674de7edbbc1bd6ade0486f54fbdb26 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期二, 06 五月 2025 19:19:35 +0800 Subject: [PATCH] 1、实现万用token(0000-0000-1234-9876-5); 2、web端单独实现命令结果等待器,并修改相关部分; 3、web端实现透传命令; 4、修改一些不当注释; 5、优化一些代码。 --- pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/ComTransSv.java | 45 ++++++++++++++++++++++++++++++++++----------- 1 files changed, 34 insertions(+), 11 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/ComTransSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/ComTransSv.java index 2c49714..50898f8 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/ComTransSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/ComTransSv.java @@ -1,12 +1,14 @@ package com.dy.pipIrrRemote.monitor; -import com.dy.pipIrrGlobal.daoPr.PrIntakeMapper; -import com.dy.pipIrrGlobal.rtuMw.Web2RtuMw; +import com.dy.pipIrrGlobal.command.CommandSv; +import com.dy.pipIrrGlobal.daoPr.PrControllerMapper; +import com.dy.pipIrrGlobal.daoRm.RmCommandHistoryMapper; +import com.dy.pipIrrGlobal.pojoPr.PrController; +import com.dy.pipIrrGlobal.pojoRm.RmCommandHistory; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.env.Environment; import org.springframework.stereotype.Service; -import org.springframework.web.client.RestTemplate; +import org.springframework.transaction.annotation.Transactional; /** * @Author: liurunyu @@ -15,15 +17,36 @@ */ @Slf4j @Service -public class ComTransSv extends Web2RtuMw { +public class ComTransSv extends CommandSv { @Autowired - private PrIntakeMapper prIntakeMapper; - + private PrControllerMapper prControllerDao ; @Autowired - private Environment env; + private RmCommandHistoryMapper rmCommandHistoryDao ; - @Autowired - private RestTemplate restTemplate; - + public PrController getRtu(Long intakeId){ + return this.getRtu(prControllerDao, intakeId); + } + /** + * 鍒涘缓鍛戒护鏃ュ織瀵硅薄 + * + * @param comId 涓婚敭 + * @param commandCode 鍔熻兘鐮� + * @param rtuAddr 闃�鎺у櫒鍦板潃 + * @param protocol 閫氳鍗忚鍚嶇О + * @param param 鍙傛暟鏁版嵁 + * @param operator 鎿嶄綔鍛� + * @return + */ + @Transactional(rollbackFor = Exception.class) + public RmCommandHistory saveComHistoryPo(Long comId, + String protocol, + String commandCode, + String commandName, + Long intakeId, + String rtuAddr, + Object param, + Long operator) { + return this.saveComHistoryPo(rmCommandHistoryDao, comId, protocol, commandCode, commandName, intakeId, rtuAddr, param, operator) ; + } } -- Gitblit v1.8.0