From ac87f61568a68501aa50d5c3f0d083e8ea36ebb3 Mon Sep 17 00:00:00 2001 From: wuzeyu <1223318623@qq.com> Date: 星期五, 29 十一月 2024 14:33:07 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/web/com/CommandCtrl.java | 20 ++++++++++++++++++++ 1 files changed, 20 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..675f636 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,25 @@ } /** + * 鎺ユ敹web绯荤粺鍙戞潵寮哄埗缁撴潫鍗囩骇浠诲姟 + * @return + */ + @PostMapping(path = "ugForceOver", consumes = MediaType.APPLICATION_JSON_VALUE) + public BaseResponse<String> ugForceOver() { + log.info("鏀跺埌鍋滄RTU鍗囩骇浠诲姟鍛戒护") ; + try{ + String mes = UpgradeUnit.getInstance().forceOverUpgradeTask(); + 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