From 79e481b7da2a83c769f9709eeec0e7130359be1b Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 05 七月 2024 16:59:12 +0800
Subject: [PATCH] 添加取水口和更改取水口时判断取水口是否重名 重新优化
---
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