| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得设备保养记录") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('mes:dv-mainten-record:query')") |
| | | public CommonResult<MesDvMaintenRecordRespVO> getMaintenRecord(@RequestParam("id") Long id) { |
| | | MesDvMaintenRecordDO maintenRecord = maintenRecordService.getMaintenRecord(id); |
| | | if (maintenRecord == null) { |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得设备保养记录分页") |
| | | @PreAuthorize("@ss.hasPermission('mes:dv-mainten-record:query')") |
| | | public CommonResult<PageResult<MesDvMaintenRecordRespVO>> getMaintenRecordPage(@Valid MesDvMaintenRecordPageReqVO pageReqVO) { |
| | | PageResult<MesDvMaintenRecordDO> pageResult = maintenRecordService.getMaintenRecordPage(pageReqVO); |
| | | return success(new PageResult<>(buildMaintenRecordRespVOList(pageResult.getList()), pageResult.getTotal())); |
| | |
| | | .build() |
| | | ); |
| | | // 输出 |
| | | ExcelUtils.write(response, "设备保养记录导入模板.xls", "设备保养记录列表", MesDvMaintenRecordImportExcelVO.class, list); |
| | | ExcelUtils.writeTemplate(response, "设备保养记录导入模板.xls", "设备保养记录列表", MesDvMaintenRecordImportExcelVO.class, list); |
| | | } |
| | | |
| | | @PostMapping("/import") |