2021与蓝度共同重构项目,服务端
fix
zhanzhiqin
2022-04-22 2dd5433edfc33ac48ffd31455820883c305a6ab8
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java
@@ -8,6 +8,7 @@
import com.sandu.common.domain.ResponseVO;
import com.sandu.common.object.BaseConditionVO;
import com.sandu.common.util.ResponseUtil;
import com.sandu.common.util.SpringContextHolder;
import com.sandu.ximon.admin.dto.DeviceStatus;
import com.sandu.ximon.admin.param.PoleBindParam;
import com.sandu.ximon.admin.param.PoleBindingParam;
@@ -124,8 +125,7 @@
            switch (param.getDeviceType()) {
                case 0:
                    Pole pole = poleService.getById(poleId);
                    if (!param.getDeviceCode().equals(pole.getDeviceCode())) {
//                    if (!pole.getDeviceCode().equals(param.getDeviceCode())) {
                    if (pole != null) {
                        pole.setPoleName(param.getDeviceName());
                        pole.setDeviceCode(param.getDeviceCode());
                        poleService.updateById(pole);
@@ -173,6 +173,11 @@
            //设备类型,0路灯,1led屏幕,2充电桩,3大气监测,4水质监测,5ip音柱,6lcd广告机,7摄像头,8杆体倾测,9一键救助, 10熙讯
            switch (param.getDeviceType()) {
                case 0:
                    //删除灯杆的devicescode
                    Pole pole = poleService.getOne(Wrappers.lambdaQuery(Pole.class).eq(Pole::getId, poleId));
                    if (pole != null) {
                        poleService.updateDeviceCode(pole.getId());
                    }
                    break;
                case 1:
                    break;