From af76a4336bfa9320cc9d5d1057519d334058acae Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期三, 14 五月 2025 15:48:18 +0800 Subject: [PATCH] 配置springboot不热部署 --- pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/common/ComSv.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/common/ComSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/common/ComSv.java index 8fc35f5..c9fc53e 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/common/ComSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/common/ComSv.java @@ -1,12 +1,19 @@ package com.dy.pipIrrRemote.monitor.common; +import com.alibaba.fastjson2.JSONArray; +import com.alibaba.fastjson2.JSONObject; import com.dy.pipIrrGlobal.command.CommandSv; +import com.dy.pipIrrGlobal.daoPr.PrCommonIntakesMapper; import com.dy.pipIrrGlobal.daoPr.PrControllerMapper; import com.dy.pipIrrGlobal.daoRm.RmCommandHistoryMapper; +import com.dy.pipIrrGlobal.pojoPr.PrCommonIntakes; import com.dy.pipIrrGlobal.pojoPr.PrController; import com.dy.pipIrrGlobal.pojoRm.RmCommandHistory; +import com.dy.pipIrrGlobal.voRm.VoUnclosedParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; + +import java.util.Date; /** * @Author: liurunyu @@ -19,6 +26,8 @@ protected PrControllerMapper prControllerDao ; @Autowired protected RmCommandHistoryMapper rmCommandHistoryDao ; + @Autowired + private PrCommonIntakesMapper prCommonIntakesDao; public PrController getRtu(Long intakeId){ return this.getRtu(prControllerDao, intakeId); @@ -45,4 +54,43 @@ Long operator) { return this.saveComHistoryPo(rmCommandHistoryDao, comId, protocol, commandCode, commandName, intakeId, rtuAddr, param, operator) ; } + + + /** + * 娣诲姞甯哥敤鍙栨按鍙f垨鏇存柊浣跨敤淇℃伅 + * @param operatorId + * @param intakeId + * @return + */ + public PrCommonIntakes addOrUpdateOftenUseIntake(Long operatorId, Long intakeId) { + PrCommonIntakes po = prCommonIntakesDao.selectByOperatorAndIntake(operatorId, intakeId); + if(po == null) { + po = new PrCommonIntakes(); + po.setOperatorId(operatorId); + po.setIntakeId(intakeId); + po.setLastUsedTime(new Date()); + po.setUsageCount(1); + prCommonIntakesDao.insert(po); + }else{ + po.setLastUsedTime(new Date()); + po.setUsageCount(po.getUsageCount() + 1); + prCommonIntakesDao.updateByPrimaryKeySelective(po); + } + return po ; + } + + + /** + * 鏍规嵁鍙栨按鍙D鑾峰彇璇ュ彇姘村彛鏈叧闃�鍙傛暟锛屽钩鍙伴�夋嫨鍙栨按鍙e叧闃�浣跨敤 + * @param intakeId + * @return + */ + public VoUnclosedParam selectUncloseParam(Long intakeId, String rtuAddr) { + JSONArray jsonArr = new JSONArray(); + JSONObject jsonObj = new JSONObject(); + jsonObj.put("rtuAddr", rtuAddr); + jsonObj.put("isOnLine", true); + jsonArr.add(jsonObj); + return rmCommandHistoryDao.getUncloseParam(jsonArr.toJSONString(), intakeId); + } } -- Gitblit v1.8.0