| | |
| | | b.setStreetlightId(0L); |
| | | b.setExist(1); |
| | | save(b); |
| | | // broadcastTerminalV2EntityMapper.insert(b); |
| | | } |
| | | }); |
| | | } |
| | |
| | | if (id == null || id.trim().length() == 0) { |
| | | return equipmentInfo; |
| | | } |
| | | equipmentInfo.setEquipmentMac(id); |
| | | BroadcastTerminalV2Entity one = getOne(Wrappers.lambdaQuery(BroadcastTerminalV2Entity.class).eq(BroadcastTerminalV2Entity::getId, id)); |
| | | if (one != null) { |
| | | equipmentInfo.setEquipmentMac(id); |
| | | equipmentInfo.setEquipmentName(one.getTerminalName()); |
| | | } |
| | | TerminalVO terminalInfo = TerminalAPIUtils.getTerminalInfo(Integer.valueOf(id)); |
| | | if (terminalInfo != null) { |
| | | //空闲 1、 工作中 2 或者 4、 断线 0, 报 错 8 |
| | |
| | | } |
| | | boolean belong = SpringContextHolder.getBean(PoleBindingService.class).isBelong(String.valueOf(byId.getId()), PoleBindingEnums.IPVOLUME); |
| | | if (!belong) { |
| | | throw new RuntimeException("该设备不属于您,不能修改设备信息"); |
| | | throw new BusinessException("该设备不属于您,不能修改设备信息"); |
| | | } |
| | | byId.setTerminalName(name); |
| | | return updateById(byId); |