2021与蓝度共同重构项目,服务端
zhanzhiqin
2022-03-30 4cf57b750ba4e43e6b354fb5b2eabe5fb0b951d6
充电桩
已修改6个文件
164 ■■■■ 文件已修改
dao/src/main/java/com/sandu/ximon/dao/domain/C3mCharging.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
dao/src/main/resources/mapper/C3mChargingMapper.xml 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/java/com/sandu/ximon/admin/manager/iot/amqp/AmqpMessageListener.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/java/com/sandu/ximon/admin/manager/iot/amqp/processor/c3ChargingProcessor.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/java/com/sandu/ximon/admin/manager/iot/frame/inner/report/A5C3CommonReportInnerFrame.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/java/com/sandu/ximon/admin/service/C3ChargingService.java 105 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
dao/src/main/java/com/sandu/ximon/dao/domain/C3mCharging.java
@@ -49,6 +49,11 @@
    /**
     * 
     */
    private String poleDevicesCode;
    /**
     *
     */
    private LocalDateTime updateTime;
    @TableField(exist = false)
dao/src/main/resources/mapper/C3mChargingMapper.xml
@@ -5,21 +5,22 @@
<mapper namespace="com.sandu.ximon.dao.mapper.C3mChargingMapper">
    <resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.C3mCharging">
        <id property="c3Id" column="c3_id" jdbcType="BIGINT"/>
        <result property="mcuUdid" column="mcu_udid" jdbcType="VARCHAR"/>
        <result property="c3Name" column="c3_name" jdbcType="VARCHAR"/>
        <result property="c3Mac" column="c3_mac" jdbcType="VARCHAR"/>
        <result property="statusBit" column="status_bit" jdbcType="INTEGER"/>
        <result property="deviceTemperature" column="device_temperature" jdbcType="VARCHAR"/>
        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
            <id property="c3Id" column="c3_id" jdbcType="BIGINT"/>
            <result property="mcuUdid" column="mcu_udid" jdbcType="VARCHAR"/>
            <result property="c3Name" column="c3_name" jdbcType="VARCHAR"/>
            <result property="c3Mac" column="c3_mac" jdbcType="VARCHAR"/>
            <result property="statusBit" column="status_bit" jdbcType="INTEGER"/>
            <result property="deviceTemperature" column="device_temperature" jdbcType="VARCHAR"/>
            <result property="poleDevicesCode" column="pole_devices_code" jdbcType="VARCHAR"/>
            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
    </resultMap>
    <sql id="Base_Column_List">
        c3_id
        ,mcu_udid,c3_name,
        c3_id,mcu_udid,c3_name,
        c3_mac,status_bit,device_temperature,
        update_time
        pole_devices_code,update_time
    </sql>
    <select id="getAllByC3Mac" resultType="com.sandu.ximon.dao.domain.C3mCharging">
        select *
        from c3m_charging
ximon-admin/src/main/java/com/sandu/ximon/admin/manager/iot/amqp/AmqpMessageListener.java
@@ -115,14 +115,18 @@
    private void c3ChargingReportAnalysis(String productKey, String deviceName, CommonFrame frame) {
        String functionCode = frame.getPayload().substring(2, 4);
        if (A5C3ReportEnum.NETWORK_REQUEST.getCode().equals(functionCode)) {
            A5C3CommonReportInnerFrame netRequestFrame = new A5C3CommonReportInnerFrame().transformFrame(frame.getPayload());
            log.info("C3充电桩上报处理_netRequestFrame");
            log.info(netRequestFrame.toString());
//            A5C3CommonReportInnerFrame netRequestFrame = new A5C3CommonReportInnerFrame().transformFrame(frame.getPayload());
//            log.info("C3充电桩上报处理_netRequestFrame");
//            log.info(netRequestFrame.toString());
            //网络请求
            c3ChargingProcessor.c3ChargingProcessorgetInstance().process(productKey, deviceName, frame);
        } else if (A5C3ReportEnum.QR_CODE_REQUEST.getCode().equals(functionCode)) {
            A5C3CommonReportInnerFrame codeRequestFrame = new A5C3CommonReportInnerFrame().transformFrame(frame.getPayload());
            log.info("C3充电桩上报处理_codeRequestFrame");
            log.info(codeRequestFrame.toString());
        } else if (A5C3ReportEnum.HEART_BEAT.getCode().equals(functionCode)) {
            //心跳包
            c3ChargingProcessor.c3ChargingProcessorgetInstance().process(productKey, deviceName, frame);
        } else if (A5C3ReportEnum.CHARGE_COMPLETE.getCode().equals(functionCode)) {
            A5C3CommonReportInnerFrame completeRequestFrame = new A5C3CommonReportInnerFrame().transformFrame(frame.getPayload());
ximon-admin/src/main/java/com/sandu/ximon/admin/manager/iot/amqp/processor/c3ChargingProcessor.java
@@ -1,9 +1,11 @@
package com.sandu.ximon.admin.manager.iot.amqp.processor;
import com.sandu.common.util.SpringContextHolder;
import com.sandu.ximon.admin.manager.iot.frame.inner.report.A5C3CommonReportInnerFrame;
import com.sandu.ximon.admin.manager.iot.frame.inner.report.A5C3HeartbeatReportInnerFrame;
import com.sandu.ximon.admin.manager.iot.frame.inner.report.A5C3OperationReportInnerFrame;
import com.sandu.ximon.admin.manager.iot.rrpc.dto.CommonFrame;
import com.sandu.ximon.admin.manager.iot.rrpc.enums.A5C3ReportEnum;
import com.sandu.ximon.admin.manager.iot.rrpc.enums.C3ChargingEnum;
import com.sandu.ximon.admin.manager.iot.rrpc.enums.C3ChargingReportEnum;
import com.sandu.ximon.admin.service.C3ChargingService;
@@ -37,7 +39,10 @@
            log.info(heartbeatReportInnerFrame.toString());
            if (heartbeatReportInnerFrame.isValidate()) {
                SpringContextHolder.getBean(C3ChargingService.class).saveReportData(deviceName, heartbeatReportInnerFrame.getHeartBeatDataPackage());
                SpringContextHolder.getBean(C3ChargingService.class).updateReportState(deviceName
                        , heartbeatReportInnerFrame.getHeartBeatDataPackage().getC3Mac()
                        , heartbeatReportInnerFrame.getHeartBeatDataPackage().getStatusBit()
                        , heartbeatReportInnerFrame.getHeartBeatDataPackage().getDeviceTemperature());
            }
        } else if (C3ChargingEnum.StartCharging.getCode().equals(functionCode)) {
            log.info("心跳响应——C3充电桩开始充电");
@@ -48,6 +53,14 @@
//            if (operationReportInnerFrame.isValidate()) {
//                SpringContextHolder.getBean(C3ChargingService.class).saveReportData(deviceName, operationReportInnerFrame.getHeartBeatDataPackage());
//            }
        } else if (A5C3ReportEnum.NETWORK_REQUEST.getCode().equals(functionCode)) {
            A5C3CommonReportInnerFrame netRequestFrame = new A5C3CommonReportInnerFrame().transformFrame(frame.getPayload());
            log.info("C3充电桩上报处理_netRequestFrame");
            log.info(netRequestFrame.toString());
            if (netRequestFrame.isValidate()) {
                SpringContextHolder.getBean(C3ChargingService.class).saveReporEquipment(deviceName, netRequestFrame.getMcuUdid(), netRequestFrame.getDestinationAddress());
            }
        }
    }
}
ximon-admin/src/main/java/com/sandu/ximon/admin/manager/iot/frame/inner/report/A5C3CommonReportInnerFrame.java
@@ -18,6 +18,7 @@
    //  目标地址    4
    private String destinationAddress;
    private String mcuUdid;
    @Override
    public A5C3CommonReportInnerFrame transformFrame(String hex) {
@@ -34,6 +35,13 @@
        setDestinationAddress(hex.substring(8, 16));
        /**
         * 设置mcu_udid
         */
        if(getFunctionCode().equals("40")){
            setMcuUdid(hex.substring(16, hex.length() - 8));
        }
        setCrc32(hex.substring(hex.length() - 8));
        //  校验CRC32
        String frame = hex.substring(2, hex.length() - 8);
ximon-admin/src/main/java/com/sandu/ximon/admin/service/C3ChargingService.java
@@ -17,6 +17,7 @@
import com.sandu.ximon.admin.param.C3ChargingParam;
import com.sandu.ximon.dao.domain.C3mCharging;
import com.sandu.ximon.dao.domain.C3mChargingCharge;
import com.sandu.ximon.dao.domain.Pole;
import com.sandu.ximon.dao.domain.PoleBinding;
import com.sandu.ximon.dao.mapper.C3mChargingMapper;
import lombok.AllArgsConstructor;
@@ -37,24 +38,47 @@
    private final C3mChargingChargeService c3mChargingChargeService;
    private final PoleBindingService bindingService;
    private final PoleService poleService;
    /**
     * 保存上报C3充电设备心跳数据
     *
     * @return 是否成功
     */
    public boolean saveReportData(String deviceName, A5C3HeartbeatReportInnerFrame.HeartBeatDataPackage heartBeatDataPackage) {
        C3mCharging one = getOne(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getMcuUdid, deviceName));
    public boolean updateReportState(String deviceName, String c3Mac, String statusBit, String deviceTemperature) {
        C3mCharging one = getOne(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getPoleDevicesCode, deviceName));
        if (one != null) {
            one.setStatusBit(Integer.valueOf(statusBit));
            one.setDeviceTemperature(deviceTemperature);
            one.setPoleDevicesCode(deviceName);
            one.setC3Mac(c3Mac);
//            List<C3mChargingCharge> list = c3mChargingChargeService.list(Wrappers.lambdaQuery(C3mChargingCharge.class).eq(C3mChargingCharge::getC3Id, one.getC3Id()));
//            if (list.size() == 0) {//费率表中没有此充电桩数据时  添加默认费率
//                c3mChargingChargeService.initCharge((one.getC3Id()).intValue());
//            }
            return updateById(one);
        } else {
            return false;
        }
    }
    /**
     * 保存上报C3充电设备心跳数据
     *
     * @return 是否成功
     */
    public boolean saveReporEquipment(String deviceName, String mcuUdid, String c3Mac) {
        C3mCharging one = getOne(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getMcuUdid, mcuUdid));
        if (one == null) {
            //将设备信息添加到充电桩设备表
            C3mCharging c3mCharging = new C3mCharging();
            c3mCharging.setMcuUdid(deviceName);
            c3mCharging.setC3Mac(heartBeatDataPackage.getC3Mac());
            c3mCharging.setStatusBit(Integer.valueOf(heartBeatDataPackage.getStatusBit()));
            c3mCharging.setDeviceTemperature(heartBeatDataPackage.getDeviceTemperature());
            c3mCharging.setMcuUdid(mcuUdid);
            c3mCharging.setPoleDevicesCode(deviceName);
            c3mCharging.setC3Mac(c3Mac);
            boolean flag = save(c3mCharging);
            //设置费率
            C3mCharging c3mCharging1 = getOne(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getMcuUdid, deviceName));
            C3mCharging c3mCharging1 = getOne(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getMcuUdid, mcuUdid));
            List<C3mChargingCharge> list = c3mChargingChargeService.list(Wrappers.lambdaQuery(C3mChargingCharge.class).eq(C3mChargingCharge::getC3Id, c3mCharging1.getC3Id()));
            if (list.size() == 0) {//费率表中没有此充电桩数据时  添加默认费率
                c3mChargingChargeService.initCharge((c3mCharging1.getC3Id()).intValue());
@@ -62,13 +86,18 @@
            return flag;
        } else {
            one.setStatusBit(Integer.valueOf(heartBeatDataPackage.getStatusBit()));
            one.setDeviceTemperature(heartBeatDataPackage.getDeviceTemperature());
            List<C3mChargingCharge> list = c3mChargingChargeService.list(Wrappers.lambdaQuery(C3mChargingCharge.class).eq(C3mChargingCharge::getC3Id, one.getC3Id()));
            //将设备信息添加到充电桩设备表
            one.setPoleDevicesCode(deviceName);
            one.setC3Mac(c3Mac);
            boolean flag = updateById(one);
            //设置费率
            C3mCharging c3mCharging1 = getOne(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getMcuUdid, mcuUdid));
            List<C3mChargingCharge> list = c3mChargingChargeService.list(Wrappers.lambdaQuery(C3mChargingCharge.class).eq(C3mChargingCharge::getC3Id, c3mCharging1.getC3Id()));
            if (list.size() == 0) {//费率表中没有此充电桩数据时  添加默认费率
                c3mChargingChargeService.initCharge((one.getC3Id()).intValue());
                c3mChargingChargeService.initCharge((c3mCharging1.getC3Id()).intValue());
            }
            return updateById(one);
            return flag;
        }
    }
@@ -100,7 +129,7 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
@@ -133,7 +162,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3OperationReportInnerFrame operationReportInnerFrame = new A5C3OperationReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -162,7 +192,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3OperationReportInnerFrame operationReportInnerFrame = new A5C3OperationReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -190,7 +221,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3QueryReportInnerFrame a5C3QueryReportInnerFrame = new A5C3QueryReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -218,7 +250,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3QueryReportInnerFrame queryReportInnerFrame = new A5C3QueryReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -246,7 +279,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3QueryReportInnerFrame queryReportInnerFrame = new A5C3QueryReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -274,7 +308,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3QueryReportInnerFrame queryReportInnerFrame = new A5C3QueryReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -302,7 +337,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3QueryReportInnerFrame queryReportInnerFrame = new A5C3QueryReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -330,7 +366,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3HeartbeatReportInnerFrame heartbeatReportInnerFrame = new A5C3HeartbeatReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -362,7 +399,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3OperationReportInnerFrame operationReportInnerFrame = new A5C3OperationReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -392,7 +430,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3OperationReportInnerFrame operationReportInnerFrame = new A5C3OperationReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -425,7 +464,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3OperationReportInnerFrame operationReportInnerFrame = new A5C3OperationReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -455,7 +495,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3OperationReportInnerFrame operationReportInnerFrame = new A5C3OperationReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -485,7 +526,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3OperationReportInnerFrame operationReportInnerFrame = new A5C3OperationReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -515,7 +557,8 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3OperationReportInnerFrame operationReportInnerFrame = new A5C3OperationReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -542,7 +585,9 @@
        if (c3mCharging == null) {
            throw new BusinessException("C3充电桩硬件mcu_udid不存在");
        }
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getMcuUdid(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
//        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC("32313243305008ff1a06ffff", a5Frame);
        System.out.println(commonFrame + "            -----commonFrame");
        A5C3OperationReportInnerFrame operationReportInnerFrame = new A5C3OperationReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -556,7 +601,7 @@
    public boolean addC3Charging(C3ChargingAddParam c3ChargingAddParam) {
        C3mCharging one = getOne(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getMcuUdid, c3ChargingAddParam.getMcuUdid()));
        if(one != null){
        if (one != null) {
            throw new BusinessException("硬件设备已存在!");
        }
@@ -574,7 +619,7 @@
    public boolean updateC3ChargingName(C3ChargingAddParam c3ChargingAddParam) {
        C3mCharging one = getOne(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getC3Id, c3ChargingAddParam.getC3Id()));
        if(one == null){
        if (one == null) {
            throw new BusinessException("硬件设备不存在!");
        }