| | |
| | | |
| | | @PostMapping() |
| | | @Operation(summary = "添加设备保养") |
| | | public AjaxResult add(@RequestBody DeviceMaintenance deviceMaintenance) { |
| | | public AjaxResult add(@RequestBody DeviceMaintenanceDto deviceMaintenance) { |
| | | DeviceLedger byId = deviceLedgerService.getById(deviceMaintenance.getDeviceLedgerId()); |
| | | deviceMaintenance.setDeviceName(byId.getDeviceName()); |
| | | deviceMaintenance.setDeviceModel(byId.getDeviceModel()); |
| | |
| | | |
| | | @PutMapping () |
| | | @Operation(summary = "修改设备保养") |
| | | public AjaxResult update(@RequestBody DeviceMaintenance deviceMaintenance) { |
| | | public AjaxResult update(@RequestBody DeviceMaintenanceDto deviceMaintenance) { |
| | | DeviceLedger byId = deviceLedgerService.getById(deviceMaintenance.getDeviceLedgerId()); |
| | | deviceMaintenance.setDeviceName(byId.getDeviceName()); |
| | | deviceMaintenance.setDeviceModel(byId.getDeviceModel()); |
| | |
| | | |
| | | @PostMapping ("maintenance") |
| | | @Operation(summary = "修改设备保养") |
| | | public AjaxResult maintenance(@RequestBody DeviceMaintenance deviceMaintenance) { |
| | | public AjaxResult maintenance(@RequestBody DeviceMaintenanceDto deviceMaintenance) { |
| | | return deviceMaintenanceService.updateDeviceDeviceMaintenance(deviceMaintenance); |
| | | } |
| | | |
| | |
| | | deviceMaintenanceService.export(response, ids); |
| | | } |
| | | |
| | | @PutMapping("/complete/{id}") |
| | | @Operation(summary = "保养完成") |
| | | public AjaxResult complete(@PathVariable Long id) { |
| | | return deviceMaintenanceService.complete(id); |
| | | } |
| | | |
| | | @PutMapping("/batchComplete") |
| | | @Operation(summary = "一键保养完成") |
| | | public AjaxResult batchComplete(String dateStr) { |
| | | return deviceMaintenanceService.batchComplete(dateStr); |
| | | } |
| | | |
| | | } |