From a15a8cfd7b01ce4bba6fe9fd876f6704ca23a12d Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 07 一月 2025 16:40:32 +0800
Subject: [PATCH] 1、取水口用水日统计表中增加金额、次数字段; 2、优化或重写“累计流量超过指定值的取水口”、“累计流量低于指定值的取水口”、“指定时间段内用水量超过指定值的取水口”、“指定时间段内消费金额超过指定值的取水口”几个统计查询; 3、改“指定时间段内用水时长超过指定值的取水口”为“指定时间段内用水次数超过指定值的取水口”

---
 pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V202404test/ComSupportP206V202404.java |   26 +++++++++++++++++++++-----
 1 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V202404test/ComSupportP206V202404.java b/pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V202404test/ComSupportP206V202404.java
index 2496adb..64b94fa 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V202404test/ComSupportP206V202404.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-mwTest-web/src/main/java/com/dy/pipIrrMwTestWeb/p206V202404test/ComSupportP206V202404.java
@@ -5,6 +5,7 @@
 import com.dy.common.mw.protocol.p206V202404.ProtocolConstantV206V202404;
 import com.dy.common.mw.protocol.p206V202404.downVos.ComCdXyVo;
 import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpEntity;
 import org.springframework.http.HttpHeaders;
@@ -19,10 +20,15 @@
  * @Description
  */
 public class ComSupportP206V202404 {
-    protected static String mwUrlTest = "http://127.0.0.1:8070/rtuMw/com/test" ;
-    protected static String mwUrlSendCom = "http://127.0.0.1:8070/rtuMw/com/send" ;
+    //protected static final String mwIp = "romq9311819.vicp.fun" ; //http://romq9311819.vicp.fun:16583
+    //protected static final String mwPort = "16583" ;
+    protected static final String mwIp = "127.0.0.1" ;
+    protected static final String mwPort = "8071" ;
 
-    protected static String rtuAddr = "37142501020100215" ;
+    protected static String mwUrlTest = "http://" + mwIp + ":" + mwPort + "/rtuMw/com/test" ;
+    protected static String mwUrlSendCom = "http://" + mwIp + ":" + mwPort + "/rtuMw/com/send" ;
+
+    protected static String rtuAddr = "41162810400100001" ;
     protected static String rtuResultSendWebUrl = "http://127.0.0.1:65535/test/comRes/receive" ;
 
     protected static String controllerType = "57" ;//鎺у埗鍣ㄧ被鍨�
@@ -73,8 +79,13 @@
             response = restTemplate.exchange(url, HttpMethod.GET, httpEntity, BaseResponse.class);
         } catch (Exception e) {
             e.printStackTrace();
+            return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛屼腑闂翠欢璋冪敤寮傚父");
         }
-        return response.getBody();
+        if(response == null){
+            return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛屼腑闂翠欢璋冪敤寮傚父");
+        }else{
+            return response.getBody();
+        }
     }
 
     /**
@@ -93,8 +104,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();
+        }
     }
 
 }

--
Gitblit v1.8.0