| | |
| | | @Autowired |
| | | private IDeviceMaintenanceService deviceMaintenanceService; |
| | | |
| | | @ApiModelProperty("设备报修列表") |
| | | @ApiModelProperty("设备保养列表") |
| | | @GetMapping("/page") |
| | | public AjaxResult page(Page page , DeviceMaintenanceDto deviceMaintenanceDto) { |
| | | return AjaxResult.success(deviceMaintenanceService.queryPage(page,deviceMaintenanceDto)); |
| | | } |
| | | |
| | | @PostMapping() |
| | | @ApiModelProperty("添加设备报修") |
| | | @ApiModelProperty("添加设备保养") |
| | | public AjaxResult add(@RequestBody DeviceMaintenance deviceRepair) { |
| | | return deviceMaintenanceService.saveDeviceRepair(deviceRepair); |
| | | } |
| | | |
| | | @ApiModelProperty("根据id查询设备报修") |
| | | @ApiModelProperty("根据id查询设备保养") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult detail(@PathVariable Long id) { |
| | | return AjaxResult.success(deviceMaintenanceService.getById(id)); |
| | | return AjaxResult.success(deviceMaintenanceService.detailById(id)); |
| | | } |
| | | |
| | | @PutMapping () |
| | | @ApiModelProperty("修改设备报修") |
| | | @ApiModelProperty("修改设备保养") |
| | | public AjaxResult update(@RequestBody DeviceMaintenance deviceMaintenance) { |
| | | return deviceMaintenanceService.updateDeviceRepair(deviceMaintenance); |
| | | } |
| | | |
| | | @PostMapping ("maintenance") |
| | | @ApiModelProperty("修改设备保养") |
| | | public AjaxResult maintenance(@RequestBody DeviceMaintenance deviceMaintenance) { |
| | | return deviceMaintenanceService.updateDeviceRepair(deviceMaintenance); |
| | | } |
| | | |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiModelProperty("删除设备报修") |
| | | @ApiModelProperty("删除设备保养") |
| | | public AjaxResult delete(@PathVariable ArrayList<Long> ids) { |
| | | boolean b = deviceMaintenanceService.removeBatchByIds(ids); |
| | | if (!b) { |
| | |
| | | } |
| | | |
| | | @PostMapping("export") |
| | | @ApiModelProperty("导出设备报修") |
| | | @ApiModelProperty("导出设备保养") |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | | deviceMaintenanceService.export(response, ids); |
| | | } |