| | |
| | | import com.sandu.ximon.admin.param.PoleParam; |
| | | import com.sandu.ximon.admin.param.PoleStatesParam; |
| | | import com.sandu.ximon.admin.service.AirEquipmentService; |
| | | import com.sandu.ximon.admin.service.BroadcastTerminalV2Service; |
| | | import com.sandu.ximon.admin.service.MonitorService; |
| | | import com.sandu.ximon.admin.service.PoleService; |
| | | import com.sandu.ximon.dao.domain.Pole; |
| | |
| | | |
| | | private final PoleService poleService; |
| | | private MonitorService monitorService; |
| | | private BroadcastTerminalV2Service broadcastTerminalV2Service; |
| | | private AirEquipmentService airEquipmentService; |
| | | |
| | | @PostMapping("/add") |
| | |
| | | } |
| | | |
| | | //TODO 设备的绑定解绑都要单独重新处理 |
| | | |
| | | /** |
| | | * 灯杆绑定设备 |
| | | */ |
| | |
| | | case 4: |
| | | break; |
| | | case 5: |
| | | broadcastTerminalV2Service.updateBingdingState(true, Integer.valueOf(param.getDeviceCode()).intValue()); |
| | | break; |
| | | case 6: |
| | | break; |
| | |
| | | * 灯杆绑定设备 |
| | | */ |
| | | @PostMapping("/unBind/{poleId}") |
| | | public ResponseVO<Object> unBindPole(@PathVariable Long poleId, @RequestBody @Validated PoleBindingParam param) { |
| | | boolean result = poleService.unBindPole(param.getDeviceCode()); |
| | | public ResponseVO<Object> unBindPole(@PathVariable Long poleId, @RequestBody @Validated PoleBindingParam param) { |
| | | boolean result = poleService.unBindPole(poleId, param.getDeviceCode()); |
| | | if (result) { |
| | | //设备类型,0路灯,1led屏幕,2充电桩,3大气监测,4水质监测,5ip音柱,6lcd广告机,7摄像头,8杆体倾测,9一键救助 |
| | | switch (param.getDeviceType()) { |
| | |
| | | case 4: |
| | | break; |
| | | case 5: |
| | | broadcastTerminalV2Service.updateBingdingState(false, Integer.valueOf(param.getDeviceCode()).intValue()); |
| | | break; |
| | | case 6: |
| | | break; |