| | |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | CommonPage commonPage = lightReportDataService.listReportData(conditionVO.getPageNo(), conditionVO.getPageSize(), keyword, deviceCode); |
| | | List<LightReportDataBo> lightReportDataBos = ( List<LightReportDataBo>)commonPage.getList(); |
| | | List<LightReportDataBo> lightReportDataBos = (List<LightReportDataBo>) commonPage.getList(); |
| | | |
| | | if(lightReportDataBos == null){ |
| | | if (lightReportDataBos == null) { |
| | | return ResponseUtil.success(CommonPage.restPage(new ArrayList<>())); |
| | | } |
| | | CommonPage commonPage1 = CommonPage.restPage(lightReportDataBos); |
| | |
| | | return ResponseUtil.success(list); |
| | | } |
| | | |
| | | @PostMapping("/EnergySaving") |
| | | public ResponseVO<Object> controlEnergySaving() { |
| | | return ResponseUtil.success(lightService.controlEnergySaving()); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/Energy") |
| | | @AnonymousAccess |
| | | public ResponseVO<Object> Energy() { |
| | | return ResponseUtil.success(lightService.controlEnergy()); |
| | | } |
| | | |
| | | // /** |
| | | // * 获取设备码 |
| | | // */ |
| | | // @GetMapping("/deviceCode") |
| | | // public ResponseVO<Object> getDeviceCode(BaseConditionVO baseConditionVO) { |
| | | // return ResponseUtil.success(lightService.listDeviceCode(baseConditionVO.getPageNo() , baseConditionVO.getPageSize())); |
| | | // } |
| | | @AnonymousAccess |
| | | @PostMapping("/EnergySaving") |
| | | public ResponseVO<Object> controlEnergySaving() { |
| | | return ResponseUtil.success(lightService.controlEnergySaving()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 设置功率 |
| | | */ |
| | | @PostMapping("/setPower") |
| | | public ResponseVO<Object> setPower(@RequestBody LightPowerSettingParam lightPowerSettingParam) { |
| | | boolean resule= lightService.setPower(lightPowerSettingParam); |
| | | boolean resule = lightService.setPower(lightPowerSettingParam); |
| | | return ResponseUtil.success(resule); |
| | | } |
| | | } |