Your Name
2023-03-17 e20c58a63d3827d9c55cd5f387568fb0916b9590
service-common/src/main/java/com/java110/common/cmd/chargeMachine/SaveChargeMachineCmd.java
@@ -23,6 +23,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.chargeMachine.ChargeMachineDto;
import com.java110.dto.chargeMachinePort.ChargeMachinePortDto;
import com.java110.intf.common.IChargeMachinePortV1InnerServiceSMO;
import com.java110.intf.common.IChargeMachineSpecV1InnerServiceSMO;
@@ -76,6 +77,14 @@
        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
        Assert.hasKeyAndValue(reqJson, "portCount", "请求报文中未包含portCount");
        ChargeMachineDto chargeMachineDto = new ChargeMachineDto();
        chargeMachineDto.setMachineCode(reqJson.getString("machineCode"));
        int count = chargeMachineV1InnerServiceSMOImpl.queryChargeMachinesCount(chargeMachineDto);
        if (count > 0) {
            throw new CmdException("充电桩编号已存在");
        }
        JSONArray specs = reqJson.getJSONArray("specs");
        if (specs == null || specs.size() < 1) {