2021与蓝度共同重构项目,服务端
liuhaonan
2022-10-24 7a00187d197548e23a38dcb87187ef6b2b7f8bfb
changes
已修改4个文件
28 ■■■■ 文件已修改
dao/src/main/resources/mapper/AirDataNongGengMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
dao/src/main/resources/mapper/AirEquipmentMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
dao/src/main/resources/mapper/AirEquipmentNongGengMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleBindingService.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
dao/src/main/resources/mapper/AirDataNongGengMapper.xml
@@ -55,8 +55,10 @@
        <where>
            1=1
            <if test="keyword != null and keyword != ''">
                AND t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                AND (
                t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                or t1.mac LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                )
            </if>
            <if test="type != null">
                AND t4.type = #{type}
dao/src/main/resources/mapper/AirEquipmentMapper.xml
@@ -44,7 +44,10 @@
        LEFT JOIN pole t3 ON t3.id = t2.pole_id
        <where>
            <if test="keyword != null and keyword != ''">
                AND t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                AND (
                t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                or t1.mac LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                )
            </if>
            <if test="userid != null">
                AND (t3.user_id = #{userid} OR t3.client_id = #{userid})
dao/src/main/resources/mapper/AirEquipmentNongGengMapper.xml
@@ -26,7 +26,10 @@
        LEFT JOIN pole t3 ON t3.id = t2.pole_id
        <where>
            <if test="keyword != null and keyword != ''">
                AND t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                AND (
                t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                    or t1.mac LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                )
            </if>
            <if test="userid != null">
                AND (t3.user_id = #{userid} OR t3.client_id = #{userid})
ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleBindingService.java
@@ -34,8 +34,6 @@
     */
    public boolean bindPole(Long poleId, PoleBindingParam param) {
        Integer deviceType = param.getDeviceType();
//        if (PoleBindingEnums.LIGHT.getCode().equals(deviceType)) {
//        }
        int size = 0;
        switch (deviceType.toString()) {
@@ -49,6 +47,18 @@
                size = SpringContextHolder.getBean(C3ChargingService.class).list(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getMcuUdid, param.getDeviceCode())).size();
                break;
            case PoleBindingEnums.ATMOSPHERIC:
                Pole byId = SpringContextHolder.getBean(PoleService.class).getById(poleId);
                if (byId == null) {
                    throw new BusinessException("未找到灯杆");
                }
                if (byId.getDeviceCode() != null || !byId.getDeviceCode().isEmpty()) {
                    if (!param.getDeviceCode().equals(byId.getDeviceCode())) {
                        throw new BusinessException("灯杆mac和大气mac不一致, 无法绑定");
                    }
                } else {
                    throw new BusinessException("灯杆mac为空,无法绑定大气设备");
                }
                size = SpringContextHolder.getBean(AirEquipmentService.class).list(Wrappers.lambdaQuery(AirEquipment.class).eq(AirEquipment::getMac, param.getDeviceCode())).size();
                break;
            case PoleBindingEnums.WATER: