From 930007ae95e3b276eef45cb4b8c1f7e171070a2c Mon Sep 17 00:00:00 2001 From: Administrator <zhubaomin> Date: 星期四, 11 七月 2024 14:50:53 +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 | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 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..7a7f9c4 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,9 +70,23 @@ } Long intakeId = valve.getIntakeId(); + String intakeName = valve.getIntakeName(); Long vcId = valve.getVcId(); + Boolean forceOpen = valve.getForceOpen(); 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()); + } + } /** * 濡傛灉鍐滄埛閫夋嫨浜嗚櫄鎷熷崱锛屽垯浣跨敤璇ヨ櫄鎷熷崱 @@ -96,7 +110,9 @@ if (vc == null) { return BaseResponseUtils.buildErrorMsg(WechatResultCode.PLEASE_SELECT_A_VC.getMessage()); } - if (vc.getInUse() == 1) { + + // 铏氭嫙鍗$姸鎬佷负浣跨敤涓紝涓斾笉鏄己鍒跺紑闃�鏃舵彁绀� + if (vc.getInUse() == 1 && !forceOpen) { return BaseResponseUtils.buildErrorMsg(WechatResultCode.IN_USE_VC_CANNOT_OPEN_VALVE.getMessage()); } -- Gitblit v1.8.0