| | |
| | | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "查看能耗记录") |
| | | @PreAuthorize("@ss.hasPermission('energy:record:query')") |
| | | public CommonResult<EnergyRecordRespVO> get(@RequestParam("id") Long id) { |
| | | return success(BeanUtils.toBean(energyRecordService.get(id), EnergyRecordRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "分页查询能耗记录") |
| | | @PreAuthorize("@ss.hasPermission('energy:record:query')") |
| | | public CommonResult<PageResult<EnergyRecordRespVO>> page(@Valid EnergyRecordPageReqVO req) { |
| | | return success(BeanUtils.toBean(energyRecordService.page(req), EnergyRecordRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/analysis") |
| | | @Operation(summary = "能耗数据分析(按能源分别汇总用量)") |
| | | @PreAuthorize("@ss.hasPermission('energy:analysis:query')") |
| | | public CommonResult<EnergyAnalysisRespVO> analysis(@Valid EnergyAnalysisReqVO req) { |
| | | return success(energyRecordService.analysis(req)); |
| | | } |