From f913e0bef379c480805046ae8cd09532f530cf31 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 28 十一月 2024 16:25:00 +0800
Subject: [PATCH] 升级任务结束后,更新数据库,update任务完成状态
---
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/ToRtuMwCom.java | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/ToRtuMwCom.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/ToRtuMwCom.java
index dbe7d40..ac71d4c 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/ToRtuMwCom.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/ToRtuMwCom.java
@@ -5,6 +5,7 @@
import com.dy.common.mw.protocol.CommandType;
import com.dy.common.softUpgrade.state.UpgradeTaskVo;
import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
@@ -90,8 +91,13 @@
response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, BaseResponse.class);
} catch (Exception e) {
e.printStackTrace();
+ return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛屼腑闂翠欢璋冪敤寮傚父");
}
- return response.getBody();
+ if(response == null){
+ return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛屼腑闂翠欢璋冪敤寮傚父");
+ }else{
+ return response.getBody();
+ }
}
@@ -114,7 +120,12 @@
response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, BaseResponse.class);
} catch (Exception e) {
e.printStackTrace();
+ return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛屼腑闂翠欢璋冪敤寮傚父");
}
- return response.getBody();
+ if(response == null){
+ return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛屼腑闂翠欢璋冪敤寮傚父");
+ }else{
+ return response.getBody();
+ }
}
}
--
Gitblit v1.8.0