From 2117c8c5584451ecec7232db2f185c211a68acdf Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期一, 26 八月 2024 15:26:50 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java |   31 +++++++++++++++++++++----------
 1 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
index ca31d85..64acd6b 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
@@ -1,7 +1,6 @@
 package com.dy.pipIrrWechat.command;
 
 import com.alibaba.fastjson2.JSONObject;
-import com.dy.common.aop.SsoAop;
 import com.dy.common.mw.protocol.p206V1_0_0.CodeV1_0_1;
 import com.dy.common.mw.protocol.p206V1_0_0.downVos.*;
 import com.dy.common.mw.protocol.p206V202404.CodeV202404;
@@ -11,10 +10,12 @@
 import com.dy.common.util.IDLongGenerator;
 import com.dy.common.webUtil.BaseResponse;
 import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.QueryResultVo;
 import com.dy.pipIrrGlobal.command.ComSupport;
 import com.dy.pipIrrGlobal.command.dto.Param;
 import com.dy.pipIrrGlobal.daoSe.SeVirtualCardMapper;
 import com.dy.pipIrrGlobal.pojoSe.SeClientCard;
+import com.dy.pipIrrGlobal.voRm.VoIrrigaterProfile;
 import com.dy.pipIrrGlobal.voRm.VoUnclosedValve;
 import com.dy.pipIrrGlobal.voSe.VoVirtualCard;
 import com.dy.pipIrrWechat.command.dto.AutomaticClose;
@@ -127,7 +128,7 @@
         }
 
         // 铏氭嫙鍗$姸鎬佷负浣跨敤涓紝涓斾笉鏄己鍒跺紑闃�鏃舵彁绀�
-        if (vc.getInUse() == 1 && !forceOpen) {
+        if (vc.getInUse() && !forceOpen) {
             return BaseResponseUtils.buildCodeMsg(WechatResultCode.IN_USE_VC_CANNOT_OPEN_VALVE.getCode(), WechatResultCode.IN_USE_VC_CANNOT_OPEN_VALVE.getMessage());
         }
 
@@ -317,7 +318,6 @@
      */
     @PostMapping(path = "timed_close", consumes = MediaType.APPLICATION_JSON_VALUE)
     @Transactional(rollbackFor = Exception.class)
-    @SsoAop()
     public BaseResponse<Boolean> timedClose(@RequestBody @Valid AutomaticClose automaticClose, BindingResult bindingResult) {
         if(bindingResult != null && bindingResult.hasErrors()){
             return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
@@ -389,7 +389,7 @@
             myParam.setComId(comId);
             myParam.setComType((byte)2);
             myParam.setCommandCode(commandCode);
-            myParam.setCommandName(CodeV202404.getCodeName(commandCode));
+            myParam.setCommandName(CodeV1_0_1.getCodeName(commandCode));
             myParam.setIntakeId(intakeId);
             myParam.setRtuAddr(rtuAddr);
             myParam.setProtocol(protocol);
@@ -411,7 +411,6 @@
      */
     @PostMapping(path = "quantify_close", consumes = MediaType.APPLICATION_JSON_VALUE)
     @Transactional(rollbackFor = Exception.class)
-    @SsoAop()
     public BaseResponse<Boolean> quantifyClose(@RequestBody @Valid AutomaticClose automaticClose, BindingResult bindingResult) {
         if(bindingResult != null && bindingResult.hasErrors()){
             return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
@@ -482,7 +481,7 @@
             myParam.setComId(comId);
             myParam.setComType((byte)2);
             myParam.setCommandCode(commandCode);
-            myParam.setCommandName(CodeV202404.getCodeName(commandCode));
+            myParam.setCommandName(CodeV1_0_1.getCodeName(commandCode));
             myParam.setIntakeId(intakeId);
             myParam.setRtuAddr(rtuAddr);
             myParam.setProtocol(protocol);
@@ -504,7 +503,6 @@
      */
     @PostMapping(path = "planed_open_timed_close", consumes = MediaType.APPLICATION_JSON_VALUE)
     @Transactional(rollbackFor = Exception.class)
-    @SsoAop()
     public BaseResponse<Boolean> planedOpenTimedClose(@RequestBody @Valid AutomaticClose automaticClose, BindingResult bindingResult) {
         if(bindingResult != null && bindingResult.hasErrors()){
             return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
@@ -588,7 +586,7 @@
             myParam.setComId(comId);
             myParam.setComType((byte)2);
             myParam.setCommandCode(commandCode);
-            myParam.setCommandName(CodeV202404.getCodeName(commandCode));
+            myParam.setCommandName(CodeV1_0_1.getCodeName(commandCode));
             myParam.setIntakeId(intakeId);
             myParam.setRtuAddr(rtuAddr);
             myParam.setProtocol(protocol);
@@ -610,7 +608,6 @@
      */
     @PostMapping(path = "planed_open_quantify_close", consumes = MediaType.APPLICATION_JSON_VALUE)
     @Transactional(rollbackFor = Exception.class)
-    @SsoAop()
     public BaseResponse<Boolean> planedOpenQuantifyClose(@RequestBody @Valid AutomaticClose automaticClose, BindingResult bindingResult) {
         if(bindingResult != null && bindingResult.hasErrors()){
             return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
@@ -694,7 +691,7 @@
             myParam.setComId(comId);
             myParam.setComType((byte)2);
             myParam.setCommandCode(commandCode);
-            myParam.setCommandName(CodeV202404.getCodeName(commandCode));
+            myParam.setCommandName(CodeV1_0_1.getCodeName(commandCode));
             myParam.setIntakeId(intakeId);
             myParam.setRtuAddr(rtuAddr);
             myParam.setProtocol(protocol);
@@ -799,4 +796,18 @@
             return BaseResponseUtils.buildFail("绯荤粺鏆備笉鏀寔璇ュ崗璁�");
         }
     }
+
+    /**
+     * 鏍规嵁閰嶇疆绫诲瀷鑾峰彇閰嶇疆鍊�
+     * @param type
+     * @return
+     */
+    @GetMapping(path = "/irrigate_profile")
+    public BaseResponse<QueryResultVo<List<VoIrrigaterProfile>>> getIrrPro(Integer type){
+        try {
+            return BaseResponseUtils.buildSuccess(commandSv.getIrrPro(type));
+        } catch (Exception e) {
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
 }

--
Gitblit v1.8.0