From c82e2f69dfb8fbeb164f8b7892b4b5ed73483167 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 29 十一月 2024 15:51:34 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgResult.java                                  |    2 
 pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/workOrder/WorkOrderSv.java                   |   14 ++
 pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java         |   14 +
 pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigatePlan/IrrigatePlanCtrl.java |   44 +++++++
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java                                  |   44 ++++++-
 pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigatePlan/IrrigatePlanSv.java   |   32 +++++
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voIr/VoGroupSimple.java                               |   31 +++++
 pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/config/DataSourceFilterConfiguration.java    |   27 ++++
 pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/MonitorSv.java                 |    4 
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrGroupClientMapper.java                        |   12 ++
 pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/task/UgRtuResultCtrl.java       |    3 
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoBa/BaUserMapper.java                               |    7 +
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupClientMapper.xml                                       |   11 +
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voBa/VoRoleSimple.java                                |   31 +++++
 pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/web/com/CommandCtrl.java                           |    2 
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml                                              |   17 ++
 pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/config/DataSourceFilter.java                 |   41 ++++++
 pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/workOrder/WorkOrderCtrl.java                 |   17 ++
 18 files changed, 334 insertions(+), 19 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoBa/BaUserMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoBa/BaUserMapper.java
index ea2d81e..aee894c 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoBa/BaUserMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoBa/BaUserMapper.java
@@ -2,6 +2,7 @@
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.dy.pipIrrGlobal.pojoBa.BaUser;
+import com.dy.pipIrrGlobal.voBa.VoRoleSimple;
 import com.dy.pipIrrGlobal.voBa.VoSimpleUser;
 import com.dy.pipIrrGlobal.voBa.VoUserInfo;
 import org.apache.ibatis.annotations.Mapper;
@@ -145,4 +146,10 @@
      */
     List<VoSimpleUser> getSimpleUsers();
 
+    /**
+     * 鑾峰彇宸℃鍛樺垪琛�
+     * @param inspector
+     * @return
+     */
+    List<VoRoleSimple> getInspectors(@Param("inspector") String inspector);
 }
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrGroupClientMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrGroupClientMapper.java
index cd16d9d..fbe5f1c 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrGroupClientMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrGroupClientMapper.java
@@ -2,7 +2,10 @@
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.dy.pipIrrGlobal.pojoIr.IrGroupClient;
+import com.dy.pipIrrGlobal.voIr.VoGroupSimple;
 import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
 
 /**
  * @author ZhuBaoMin
@@ -24,4 +27,13 @@
     int updateByPrimaryKeySelective(IrGroupClient record);
 
     int updateByPrimaryKey(IrGroupClient record);
+
+    /**
+     * 鏍规嵁鍐滄埛缂栧彿鑾峰彇杞亴缁勫垪琛�
+     * @param clientId
+     * @return
+     */
+    List<VoGroupSimple> getGroupsByClientId(Long clientId);
+
+
 }
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java
index 86fc954..c4318f7 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java
@@ -57,20 +57,15 @@
      * 鍚戦�氫俊涓棿浠跺彂閫乺tu杩滅▼鍗囩骇浠诲姟
      * @param restTemplate SpringBoot鐨凴estTemplate
      * @param toMwUrl 鍒伴�氫俊涓棿浠剁殑web璇锋眰Url
-     * @param param 璇锋眰鍙傛暟
+     * @param body 璇锋眰鏁版嵁
      * @return
      */
-    protected BaseResponse sendRequest2Mw(RestTemplate restTemplate, String toMwUrl, Object param) {
+    protected BaseResponse sendPostRequest2Mw(RestTemplate restTemplate, String toMwUrl, Object body) {
         String url = UriComponentsBuilder.fromUriString(toMwUrl)
                 .build()
                 .toUriString();
         HttpHeaders headers = new HttpHeaders();
-        HttpEntity<?> httpEntity ;
-        if(param != null){
-            httpEntity = new HttpEntity<>(param, headers);
-        }else{
-            httpEntity = new HttpEntity<>(headers);
-        }
+        HttpEntity<?> httpEntity = new HttpEntity<>(body, headers);
         ResponseEntity<BaseResponse> response = null;
         try {
             // 閫氳繃Post鏂瑰紡璋冪敤鎺ュ彛
@@ -87,6 +82,39 @@
     }
 
     /**
+     * 鍚戦�氫俊涓棿浠跺彂閫乺tu杩滅▼鍗囩骇浠诲姟
+     * @param restTemplate SpringBoot鐨凴estTemplate
+     * @param toMwUrl 鍒伴�氫俊涓棿浠剁殑web璇锋眰Url
+     * @return
+     */
+    protected BaseResponse sendGetRequest2Mw(RestTemplate restTemplate, String toMwUrl) {
+        String url = UriComponentsBuilder.fromUriString(toMwUrl)
+                .build()
+                .toUriString();
+
+        //UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url)
+        //        .queryParam("test", test);
+        UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url) ;
+
+        ResponseEntity<BaseResponse> response = null;
+        try {
+            // 閫氳繃Get鏂瑰紡璋冪敤鎺ュ彛
+            response = restTemplate.exchange(builder.toUriString(),
+                    HttpMethod.GET,
+                    new HttpEntity<>(new HttpHeaders()),
+                    BaseResponse.class);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛屼腑闂翠欢璋冪敤寮傚父");
+        }
+        if(response == null){
+            return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛屼腑闂翠欢璋冪敤寮傚父");
+        }else{
+            return response.getBody();
+        }
+    }
+
+    /**
      * 鍒涘缓澶栭儴鍛戒护锛堝彂缁欐帶鍒跺櫒锛�
      * @param code 鍛戒护code
      * @return
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voBa/VoRoleSimple.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voBa/VoRoleSimple.java
new file mode 100644
index 0000000..f33c316
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voBa/VoRoleSimple.java
@@ -0,0 +1,31 @@
+package com.dy.pipIrrGlobal.voBa;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.dy.common.po.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import lombok.Data;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-11-29 15:02
+ * @LastEditTime 2024-11-29 15:02
+ * @Description 瑙掕壊绠�鍗曡鍥惧璞★紝鑾峰彇宸℃鍛樹娇鐢�
+ */
+
+@Data
+@JsonPropertyOrder({"inspectorId", "inspector"})
+public class VoRoleSimple implements BaseEntity {
+    public static final long serialVersionUID = 202411291506001L;
+
+    /**
+     * 宸℃鍛業D
+     */
+    @JSONField(serializeUsing= ObjectWriterImplToString.class)
+    private Long inspectorId;
+
+    /**
+     * 宸℃鍛樺鍚�
+     */
+    private String inspector;
+}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voIr/VoGroupSimple.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voIr/VoGroupSimple.java
new file mode 100644
index 0000000..c643c0b
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voIr/VoGroupSimple.java
@@ -0,0 +1,31 @@
+package com.dy.pipIrrGlobal.voIr;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.dy.common.po.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import lombok.Data;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-11-28 17:11
+ * @LastEditTime 2024-11-28 17:11
+ * @Description 杞亴缁勭畝鍗曡鍥惧璞�
+ */
+
+@Data
+@JsonPropertyOrder({"groupId", "groupCode"})
+public class VoGroupSimple implements BaseEntity {
+    public static final long serialVersionUID = 202411281712001L;
+
+    /**
+     * 杞亴缁処D
+     */
+    @JSONField(serializeUsing= ObjectWriterImplToString.class)
+    private Long groupId;
+
+    /**
+     * 杞亴缁勭紪鐮�
+     */
+    private String groupCode;
+}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgResult.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgResult.java
index 3b23cda..971f711 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgResult.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgResult.java
@@ -67,7 +67,7 @@
      */
     @Schema(description = "鍗囩骇鏄惁缁撴潫" )
     @ExcelProperty("鍗囩骇缁撴潫")
-    @ColumnWidth(10)
+    @ColumnWidth(14)
     @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
     public String isOverStr;
 
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml
index b8f7e0d..0e5f33e 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml
@@ -380,4 +380,21 @@
         WHERE disabled = 0 AND deleted = 0
     </select>
 
+    <!--鑾峰彇宸℃鍛樺垪琛�-->
+    <select id="getInspectors" resultType="com.dy.pipIrrGlobal.voBa.VoRoleSimple">
+        SELECT
+            us.id AS inspectorId,
+            us.name AS inspector
+        FROM ba_user us
+            INNER JOIN ba_user_role ur ON ur.userId = us.id
+            INNER JOIN ba_role rol ON rol.id = ur.roleId
+        <where>
+            AND us.disabled = 0
+            AND us.deleted = 0
+            AND rol.`name` = '宸℃鍛�'
+            <if test = "inspector != null and inspector !=''">
+                AND us.name LIKE CONCAT('%',#{inspector},'%')
+            </if>
+        </where>
+    </select>
 </mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupClientMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupClientMapper.xml
index 6a2a9a7..ea0fe18 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupClientMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupClientMapper.xml
@@ -99,4 +99,15 @@
       operate_time = #{operateTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
   </update>
+
+  <!--鏍规嵁鍐滄埛缂栧彿鑾峰彇杞亴缁勫垪琛�-->
+  <select id="getGroupsByClientId" resultType="com.dy.pipIrrGlobal.voIr.VoGroupSimple">
+    SELECT
+      grp.id AS groupId,
+      grp.group_code AS groupCode
+    FROM ir_group_client gc
+           INNER JOIN ir_irrigate_group grp ON grp.id = gc.group_id
+    WHERE grp.deleted = 0 AND client_id = #{clientId}
+    ORDER BY grp.group_code
+  </select>
 </mapper>
\ No newline at end of file
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 675f636..775888b 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
@@ -165,7 +165,7 @@
      * 鎺ユ敹web绯荤粺鍙戞潵寮哄埗缁撴潫鍗囩骇浠诲姟
      * @return
      */
-    @PostMapping(path = "ugForceOver", consumes = MediaType.APPLICATION_JSON_VALUE)
+    @GetMapping(path = "ugForceOver")
     public BaseResponse<String> ugForceOver() {
         log.info("鏀跺埌鍋滄RTU鍗囩骇浠诲姟鍛戒护") ;
         try{
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/config/DataSourceFilter.java b/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/config/DataSourceFilter.java
new file mode 100644
index 0000000..9c18f2c
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/config/DataSourceFilter.java
@@ -0,0 +1,41 @@
+package com.dy.pipIrrApp.config;
+
+import com.dy.common.multiDataSource.DataSourceContext;
+import jakarta.servlet.*;
+import jakarta.servlet.http.HttpServletRequest;
+import lombok.extern.slf4j.Slf4j;
+
+import java.io.IOException;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-11-29 14:24
+ * @LastEditTime 2024-11-29 14:24
+ * @Description
+ */
+
+@Slf4j
+public class DataSourceFilter implements Filter {
+
+    @Override
+    public void init(FilterConfig filterConfig) throws ServletException  {
+    }
+
+    @Override
+    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws ServletException, IOException {
+        HttpServletRequest httpRequest = (HttpServletRequest) servletRequest;
+        String wxDataSourceName = httpRequest.getHeader("tag");
+        if (wxDataSourceName != null && wxDataSourceName.trim().length() > 0) {
+            log.info("APP寮�鍙戯紝璁剧疆鏁版嵁婧愬悕绉颁负:" + wxDataSourceName);
+            //鎶婄粍缁囧崟浣嶆爣绛句綔涓烘暟鎹簮鍚嶇О
+            DataSourceContext.set(wxDataSourceName);
+        } else {
+            log.info("鐢ㄦ埛鏈�夋嫨鏁版嵁婧�");
+        }
+        filterChain.doFilter(servletRequest, servletResponse);
+    }
+
+    @Override
+    public void destroy() {
+    }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/config/DataSourceFilterConfiguration.java b/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/config/DataSourceFilterConfiguration.java
new file mode 100644
index 0000000..1e6ebd1
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/config/DataSourceFilterConfiguration.java
@@ -0,0 +1,27 @@
+package com.dy.pipIrrApp.config;
+
+import jakarta.servlet.Filter;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-11-29 14:29
+ * @LastEditTime 2024-11-29 14:29
+ * @Description
+ */
+
+@Configuration
+public class DataSourceFilterConfiguration {
+    @Bean
+    public FilterRegistrationBean<? extends Filter> DataSourceFilter() {
+        FilterRegistrationBean<Filter> filterRegistrationBean = new FilterRegistrationBean<>();
+        filterRegistrationBean.setFilter(new DataSourceFilter());
+        filterRegistrationBean.addUrlPatterns("/*");//閰嶇疆杩囨护瑙勫垯
+        filterRegistrationBean.setName("DataSourceFilter");//璁剧疆杩囨护鍣ㄥ悕绉�
+        filterRegistrationBean.setOrder(1);//鎵ц娆″簭
+
+        return filterRegistrationBean;
+    }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/workOrder/WorkOrderCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/workOrder/WorkOrderCtrl.java
index c3d3eba..a7ae909 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/workOrder/WorkOrderCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/workOrder/WorkOrderCtrl.java
@@ -14,6 +14,7 @@
 import com.dy.pipIrrGlobal.pojoOp.OpeApproveResult;
 import com.dy.pipIrrGlobal.pojoOp.OpeProcessingResult;
 import com.dy.pipIrrGlobal.pojoOp.OpeWorkOrder;
+import com.dy.pipIrrGlobal.voBa.VoRoleSimple;
 import com.dy.pipIrrGlobal.voOp.VoProcessingResult;
 import com.dy.pipIrrGlobal.voOp.VoTaskType;
 import com.dy.pipIrrGlobal.voOp.VoWorkOrder;
@@ -281,4 +282,20 @@
             return BaseResponseUtils.buildException(e.getMessage());
         }
     }
+
+    /**
+     * 鑾峰彇宸℃鍛樺垪琛�
+     * @param inspector
+     * @return
+     */
+    @GetMapping(path = "/getInspectors")
+    @SsoAop()
+    public BaseResponse<List<VoRoleSimple>> getInspectors(@RequestParam("inspector") String inspector) {
+        try {
+            return BaseResponseUtils.buildSuccess(workOrderSv.getInspectors(inspector));
+        } catch (Exception e) {
+            log.error("鑾峰彇浠诲姟绫诲瀷寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage());
+        }
+    }
 }
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/workOrder/WorkOrderSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/workOrder/WorkOrderSv.java
index 1375549..b09f6c8 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/workOrder/WorkOrderSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/workOrder/WorkOrderSv.java
@@ -2,6 +2,7 @@
 
 import com.dy.common.webUtil.QueryResultVo;
 import com.dy.pipIrrApp.workOrder.qo.QoWorkOrder;
+import com.dy.pipIrrGlobal.daoBa.BaUserMapper;
 import com.dy.pipIrrGlobal.daoOp.OpeApproveResultMapper;
 import com.dy.pipIrrGlobal.daoOp.OpeProcessingResultMapper;
 import com.dy.pipIrrGlobal.daoOp.OpeTaskTypeMapper;
@@ -9,6 +10,7 @@
 import com.dy.pipIrrGlobal.pojoOp.OpeApproveResult;
 import com.dy.pipIrrGlobal.pojoOp.OpeProcessingResult;
 import com.dy.pipIrrGlobal.pojoOp.OpeWorkOrder;
+import com.dy.pipIrrGlobal.voBa.VoRoleSimple;
 import com.dy.pipIrrGlobal.voOp.VoProcessingResult;
 import com.dy.pipIrrGlobal.voOp.VoTaskType;
 import com.dy.pipIrrGlobal.voOp.VoWorkOrder;
@@ -42,6 +44,9 @@
 
     @Autowired
     private OpeTaskTypeMapper opeTaskTypeMapper;
+
+    @Autowired
+    private BaUserMapper baUserMapper;
 
     /**
      * 娣诲姞宸ュ崟璁板綍
@@ -240,4 +245,13 @@
     public List<VoTaskType> getTaskTypes() {
         return opeTaskTypeMapper.getTaskTypes();
     }
+
+    /**
+     * 鑾峰彇宸℃鍛樺垪琛�
+     * @param inspector
+     * @return
+     */
+    public List<VoRoleSimple> getInspectors(String inspector) {
+        return baUserMapper.getInspectors(inspector);
+    }
 }
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/task/UgRtuResultCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/task/UgRtuResultCtrl.java
index b17914d..8115374 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/task/UgRtuResultCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/task/UgRtuResultCtrl.java
@@ -9,7 +9,6 @@
 import com.dy.common.webUtil.ResultCodeMsg;
 import com.dy.pipIrrGlobal.pojoUg.UgRtuTask;
 import com.dy.pipIrrGlobal.voUg.VoUgResult;
-import com.dy.pipIrrGlobal.voUg.VoUgRtuResult;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.media.Content;
 import io.swagger.v3.oas.annotations.media.Schema;
@@ -96,7 +95,7 @@
         setExcelRespProp(response, "鍗囩骇缁撴灉鍒楄〃");
         List<VoUgResult> rsList = this.sv.selectAll(vo);
         EasyExcel.write(response.getOutputStream())
-                .head(VoUgRtuResult.class)
+                .head(VoUgResult.class)
                 .excelType(ExcelTypeEnum.XLSX)
                 .sheet("鍗囩骇缁撴灉鍒楄〃")
                 .doWrite(rsList);
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigatePlan/IrrigatePlanCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigatePlan/IrrigatePlanCtrl.java
new file mode 100644
index 0000000..0f22e38
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigatePlan/IrrigatePlanCtrl.java
@@ -0,0 +1,44 @@
+package com.dy.pipIrrIrrigate.irrigatePlan;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.pipIrrGlobal.voIr.VoGroupSimple;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-11-28 17:20
+ * @LastEditTime 2024-11-28 17:20
+ * @Description 鐏屾簤璁″垝鎺у埗绫�
+ */
+
+@Slf4j
+@RestController
+@RequestMapping(path = "irrigatePlan")
+@RequiredArgsConstructor
+public class IrrigatePlanCtrl {
+    private final IrrigatePlanSv irrigatePlanSv;
+
+    /**
+     * 鏍规嵁鍐滄埛缂栧彿鑾峰彇杞亴缁勫垪琛�
+     * @return
+     */
+    @GetMapping(path = "/getGroups")
+    @SsoAop()
+    public BaseResponse<List<VoGroupSimple>> getGroups(@RequestParam("clientId") Long clientId) {
+        try {
+            return BaseResponseUtils.buildSuccess(irrigatePlanSv.getGroups(clientId));
+        } catch (Exception e) {
+            log.error("鑾峰彇浠诲姟绫诲瀷寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage());
+        }
+    }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigatePlan/IrrigatePlanSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigatePlan/IrrigatePlanSv.java
new file mode 100644
index 0000000..6350b50
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigatePlan/IrrigatePlanSv.java
@@ -0,0 +1,32 @@
+package com.dy.pipIrrIrrigate.irrigatePlan;
+
+import com.dy.pipIrrGlobal.daoIr.IrGroupClientMapper;
+import com.dy.pipIrrGlobal.voIr.VoGroupSimple;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-11-28 17:20
+ * @LastEditTime 2024-11-28 17:20
+ * @Description 鐏屾簤璁″垝鏈嶅姟绫�
+ */
+
+@Slf4j
+@Service
+public class IrrigatePlanSv {
+    @Autowired
+    private IrGroupClientMapper irGroupClientMapper;
+
+    /**
+     * 鏍规嵁鍐滄埛缂栧彿鑾峰彇杞亴缁勫垪琛�
+     * @param clientId
+     * @return
+     */
+    public List<VoGroupSimple> getGroups(Long clientId) {
+        return irGroupClientMapper.getGroupsByClientId(clientId);
+    }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/MonitorSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/MonitorSv.java
index a4f1e1f..803cf39 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/MonitorSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/MonitorSv.java
@@ -77,7 +77,7 @@
             Command com = this.createInnerCommand(CodeLocal.onLinePart);
             com.setParam(rtuAddrs) ;
             String rqUrl = this.get2MwRequestUrl(this.env, ContextComSend) ;
-            BaseResponse res = sendRequest2Mw(restTemplate, rqUrl, com) ;
+            BaseResponse res = sendPostRequest2Mw(restTemplate, rqUrl, com) ;
             if(res != null){
                 if(res.isSuccess()){
                     Command reCom = JSON.parseObject(res.getContent() == null ? null : JSON.toJSONString(res.getContent()), Command.class) ;
@@ -115,7 +115,7 @@
         //鍚戦�氫俊涓棿浠跺彂鍏冲懡浠わ紝鏌ヨ閮ㄥ垎RTU鍦ㄧ嚎鎯呭喌
         Command com = this.createInnerCommand(CodeLocal.onLineAll);
         String rqUrl = this.get2MwRequestUrl(this.env, ContextComSend) ;
-        BaseResponse res = sendRequest2Mw(restTemplate, rqUrl, com) ;
+        BaseResponse res = sendPostRequest2Mw(restTemplate, rqUrl, com) ;
         if(res != null){
             if(res.isSuccess()){
                 Command reCom = JSON.parseObject(res.getContent() == null ? null : JSON.toJSONString(res.getContent()), Command.class) ;
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java
index 63053ca..bd975f9 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java
@@ -106,7 +106,7 @@
         vo.callbackWebUrl = ugCallbackUrl_rm ;
 
         String rqUrl = this.get2MwRequestUrl(this.env, ContextUgTaskSend) ;
-        BaseResponse res = sendRequest2Mw(restTemplate, rqUrl, vo) ;
+        BaseResponse res = sendPostRequest2Mw(restTemplate, rqUrl, vo) ;
         if(res != null){
             if(res.isSuccess()){
                 this.sv.setUpgradeTaskExecuted(id);
@@ -116,8 +116,8 @@
                 if(msg == null){
                     msg = res.getMsg() ;
                 }
-                log.error("閫氫俊涓棿浠舵墽琛屼笅鍙戝崌绾т换鍔″け璐�" + msg) ;
-                return BaseResponseUtils.buildErrorMsg("閫氫俊涓棿浠舵墽琛屽け璐�" + msg) ;
+                log.error("閫氫俊涓棿浠舵墽琛屼笅鍙戝崌绾т换鍔″け璐ワ紝" + msg) ;
+                return BaseResponseUtils.buildErrorMsg("閫氫俊涓棿浠舵墽琛屽け璐ワ紝" + msg) ;
             }
         }else{
             log.error("閫氫俊涓棿浠惰繑鍥炵粨鏋滀负null") ;
@@ -141,10 +141,14 @@
     @SsoAop()
     public BaseResponse<String> forceOver() {
         String rqUrl = this.get2MwRequestUrl(this.env, ContextUgForceOver) ;
-        BaseResponse res = sendRequest2Mw(restTemplate, rqUrl, null) ;
+        BaseResponse res = sendGetRequest2Mw(restTemplate, rqUrl) ;
         if(res != null){
             if(res.isSuccess()){
-                return BaseResponseUtils.buildSuccess(true) ;
+                String msg = res.getContent()==null?null:(String)res.getContent() ;
+                if(msg == null){
+                    msg = res.getMsg() ;
+                }
+                return BaseResponseUtils.buildResult(ResultCodeMsg.RsCode.SUCCESS_CODE, msg, msg) ;
             }else{
                 String msg = res.getContent()==null?null:(String)res.getContent() ;
                 if(msg == null){

--
Gitblit v1.8.0