| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得能耗计量点") |
| | | @Parameter(name = "id", description = "编号", required = true) |
| | | @PreAuthorize("@ss.hasPermission('mes:em-meter:query')") |
| | | public CommonResult<MesEmMeterRespVO> getMeter(@RequestParam("id") Long id) { |
| | | MesEmMeterDO meter = meterService.getMeter(id); |
| | | if (meter == null) { |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得能耗计量点分页") |
| | | @PreAuthorize("@ss.hasPermission('mes:em-meter:query')") |
| | | public CommonResult<PageResult<MesEmMeterRespVO>> getMeterPage(@Valid MesEmMeterPageReqVO pageReqVO) { |
| | | PageResult<MesEmMeterDO> pageResult = meterService.getMeterPage(pageReqVO); |
| | | return success(new PageResult<>(meterService.getMeterRespVOList(pageResult.getList()), |
| | |
| | | |
| | | @GetMapping("/simple-list") |
| | | @Operation(summary = "获得启用中的能耗计量点精简列表") |
| | | @PreAuthorize("@ss.hasPermission('mes:em-meter:query')") |
| | | public CommonResult<List<MesEmOptionRespVO>> getMeterSimpleList() { |
| | | return success(meterService.getMeterSimpleList()); |
| | | } |
| | | |
| | | @GetMapping("/workshop-options") |
| | | @Operation(summary = "获得车间下拉选项") |
| | | @PreAuthorize("@ss.hasPermission('mes:em-meter:query')") |
| | | public CommonResult<List<MesEmOptionRespVO>> getWorkshopOptions() { |
| | | return success(meterService.getWorkshopOptions()); |
| | | } |
| | | |
| | | @GetMapping("/line-options") |
| | | @Operation(summary = "获得产线下拉选项") |
| | | @PreAuthorize("@ss.hasPermission('mes:em-meter:query')") |
| | | public CommonResult<List<MesEmOptionRespVO>> getLineOptions() { |
| | | return success(meterService.getLineOptions()); |
| | | } |
| | | |
| | | @GetMapping("/machinery-options") |
| | | @Operation(summary = "获得设备下拉选项") |
| | | @PreAuthorize("@ss.hasPermission('mes:em-meter:query')") |
| | | public CommonResult<List<MesEmOptionRespVO>> getMachineryOptions() { |
| | | return success(meterService.getMachineryOptions()); |
| | | } |