From b17449e66cc31e5eeb3202605e837001ef2f4b6d Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 29 十一月 2024 11:58:19 +0800
Subject: [PATCH] 与通信中间件通信配置内容优化及修改,相应有备份配置文件也做了修改
---
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/web/com/CommandCtrl.java | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/web/com/CommandCtrl.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/web/com/CommandCtrl.java
index 46ad9d1..142a879 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/web/com/CommandCtrl.java
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/web/com/CommandCtrl.java
@@ -1,6 +1,7 @@
package com.dy.rtuMw.web.com;
import com.dy.common.softUpgrade.state.UpgradeTaskVo;
+import com.dy.common.webUtil.ResultCodeMsg;
import com.dy.rtuMw.resource.ResourceUnit;
import com.dy.rtuMw.server.ServerProperties;
import com.dy.rtuMw.server.forTcp.TcpSessionCache;
@@ -161,6 +162,26 @@
}
/**
+ * 鎺ユ敹web绯荤粺鍙戞潵鍋滄鍗囩骇浠诲姟
+ * @return
+ */
+ @PostMapping(path = "ugForceStop", consumes = MediaType.APPLICATION_JSON_VALUE)
+ public BaseResponse<String> ugForceStop() {
+ log.info("鏀跺埌鍋滄RTU鍗囩骇浠诲姟鍛戒护") ;
+ try{
+ String mes = UpgradeUnit.getInstance().overUpgradeTask();
+ if(mes == null){
+ mes = "鍋滄鍗囩骇浠诲姟鎴愬姛" ;
+ }
+ return BaseResponseUtils.buildResult(ResultCodeMsg.RsCode.SUCCESS_CODE, mes, mes);
+ }catch (Exception e){
+ log.error("鍋滄RTU鍗囩骇浠诲姟鏃跺彂鐢熷紓甯�", e);
+ return BaseResponseUtils.buildError("鍋滄RTU鍗囩骇浠诲姟鏃跺彂鐢熷紓甯�" + (e.getMessage() == null?"":("锛�" + e.getMessage())));
+ }
+ }
+
+
+ /**
* 鎺ユ敹web绯荤粺鍙戞潵鐨勫懡浠�
* @param com
* @return
--
Gitblit v1.8.0