| | |
| | | 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") |
| | |
| | | } |
| | | boolean result = poleService.bindPole(poleId, param); |
| | | if (result) { |
| | | //设备类型,0路灯,1nove,2充电桩,3大气监测,4水质监测,5ip音柱,6lcd广告机,7摄像头,8杆体倾测,9一键救助, 10熙讯, 11农耕 |
| | | //设备类型,0路灯,1nove,2充电桩,3大气监测,4水质监测,5ip音柱,6lcd广告机,7摄像头,8杆体倾测, |
| | | // 9一键救助, 10熙讯, 11农耕,12本地诺瓦,13PLC |
| | | switch (param.getDeviceType().toString()) { |
| | | case PoleBindingEnums.LIGHT: |
| | | case PoleBindingEnums.PLC: |
| | | Pole pole = poleService.getById(poleId); |
| | | if (pole != null) { |
| | | pole.setPoleName(param.getDeviceName()); |
| | |
| | | if (!permissionConfig.check(MenuEnum.UNBIND.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | boolean result = poleService.unBindPole(poleId, param.getDeviceCode(),param.getDeviceType()); |
| | | 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 == null && vnnoxResult.getSuccess() != null && vnnoxResult.getSuccess().size() != 0) { |
| | | if (vnnoxResult != null && vnnoxResult.getSuccess() != null && !vnnoxResult.getSuccess().isEmpty()) { |
| | | return ResponseUtil.success("推送成功"); |
| | | } else { |
| | | return ResponseUtil.fail("推送失败"); |