From 06c1e69816f028c3108ce4e1e01db4251e481b06 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 05 七月 2024 08:41:21 +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 |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 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 59f32ed..7cc13da 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
@@ -70,10 +70,23 @@
         }
 
         Long intakeId = valve.getIntakeId();
+        String intakeName = valve.getIntakeName();
         Long vcId = valve.getVcId();
         Long operator = valve.getOperator();
         Long comId = idLongGenerator.generate();
 
+        if(intakeId == null && intakeName == null) {
+            return BaseResponseUtils.buildErrorMsg(WechatResultCode.PLEASE_SELECT_A_INTAKE.getMessage());
+        }
+
+        // intakeName鎹ntakeId
+        if(intakeId == null) {
+            intakeId = commandSv.getIntakeIdByName(intakeName);
+            if(intakeId == null) {
+                return BaseResponseUtils.buildErrorMsg(WechatResultCode.PLEASE_SELECT_A_INTAKE.getMessage());
+            }
+        }
+
         /**
          * 濡傛灉鍐滄埛閫夋嫨浜嗚櫄鎷熷崱锛屽垯浣跨敤璇ヨ櫄鎷熷崱
          * 濡傛灉鍐滄埛鏈�夋嫨铏氭嫙鍗★紝鍒欐牴鎹彇姘村彛ID鑾峰彇涓庝箣缁戝畾鐨勮櫄鎷熷崱

--
Gitblit v1.8.0