From e20c58a63d3827d9c55cd5f387568fb0916b9590 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期五, 17 三月 2023 23:37:12 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity
---
service-common/src/main/java/com/java110/common/cmd/chargeMachine/SaveChargeMachinePortCmd.java | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/service-common/src/main/java/com/java110/common/cmd/chargeMachine/SaveChargeMachinePortCmd.java b/service-common/src/main/java/com/java110/common/cmd/chargeMachine/SaveChargeMachinePortCmd.java
index 998816e..311546a 100644
--- a/service-common/src/main/java/com/java110/common/cmd/chargeMachine/SaveChargeMachinePortCmd.java
+++ b/service-common/src/main/java/com/java110/common/cmd/chargeMachine/SaveChargeMachinePortCmd.java
@@ -22,6 +22,7 @@
import com.java110.core.event.cmd.Cmd;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.chargeMachinePort.ChargeMachinePortDto;
import com.java110.intf.common.IChargeMachinePortV1InnerServiceSMO;
import com.java110.po.chargeMachinePort.ChargeMachinePortPo;
import com.java110.utils.exception.CmdException;
@@ -60,6 +61,15 @@
Assert.hasKeyAndValue(reqJson, "state", "璇锋眰鎶ユ枃涓湭鍖呭惈state");
Assert.hasKeyAndValue(reqJson, "communityId", "璇锋眰鎶ユ枃涓湭鍖呭惈communityId");
+
+ ChargeMachinePortDto chargeMachinePortDto = new ChargeMachinePortDto();
+ chargeMachinePortDto.setMachineId(reqJson.getString("machineId"));
+ chargeMachinePortDto.setPortCode(reqJson.getString("portCode"));
+ chargeMachinePortDto.setCommunityId(reqJson.getString("communityId"));
+ int flag = chargeMachinePortV1InnerServiceSMOImpl.queryChargeMachinePortsCount(chargeMachinePortDto);
+ if (flag > 0) {
+ throw new CmdException("鎻掑骇宸茬粡瀛樺湪");
+ }
}
@Override
--
Gitblit v1.8.0