| | |
| | | import com.sandu.ximon.admin.dto.DeviceStatusDto; |
| | | import com.sandu.ximon.admin.param.*; |
| | | import com.sandu.ximon.admin.security.PermissionConfig; |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.admin.service.AirEquipmentService; |
| | | import com.sandu.ximon.admin.service.IpVolumeService; |
| | | import com.sandu.ximon.admin.service.MonitorService; |
| | |
| | | return ResponseUtil.success(poleService.updatePole(poleId, param)); |
| | | } |
| | | |
| | | @PostMapping("/delete/{poleId}") |
| | | public ResponseVO<Object> deletePole(@PathVariable Long poleId) { |
| | | @PostMapping("/delete") |
| | | public ResponseVO<Object> deletePole(@RequestBody List<Long> poleIds) { |
| | | if (!permissionConfig.check(MenuEnum.POLE_DELETE.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(poleService.deletePole(poleId)); |
| | | return ResponseUtil.success(poleService.deletePole(poleIds)); |
| | | } |
| | | |
| | | @PostMapping("/listDetail") |
| | |
| | | if (!permissionConfig.check(MenuEnum.UNBIND.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | boolean result = poleService.unBindPole(poleId, param.getDeviceCode()); |
| | | boolean result = poleService.unBindPole(poleId, param.getDeviceCode(), param.getDeviceType()); |
| | | if (result) { |
| | | //设备类型,0路灯,1led屏幕,2充电桩,3大气监测,4水质监测,5ip音柱,6lcd广告机,7摄像头,8杆体倾测,9一键救助, 10熙讯, 11农耕 |
| | | switch (param.getDeviceType().toString()) { |
| | |
| | | throw new BusinessException("播放时间需大于零且小于86400000 !"); |
| | | } |
| | | VnnoxResult vnnoxResult = poleService.pushAirDataToNova(param); |
| | | if (vnnoxResult.getSuccess().size() != 0) { |
| | | if (vnnoxResult != null && vnnoxResult.getSuccess() != null && !vnnoxResult.getSuccess().isEmpty()) { |
| | | return ResponseUtil.success("推送成功"); |
| | | } else { |
| | | return ResponseUtil.fail("推送失败"); |