| | |
| | | |
| | | @ApiOperation("设备报修列表") |
| | | @GetMapping("/page") |
| | | public AjaxResult page(Page page , DeviceRepairDto deviceRepairDto) { |
| | | return AjaxResult.success(deviceRepairService.queryPage(page,deviceRepairDto)); |
| | | public AjaxResult page(Page page, DeviceRepairDto deviceRepairDto) { |
| | | return AjaxResult.success(deviceRepairService.queryPage(page, deviceRepairDto)); |
| | | } |
| | | |
| | | @PostMapping() |
| | | @ApiOperation("添加设备报修") |
| | | public AjaxResult add( @RequestBody DeviceRepair deviceRepair) { |
| | | public AjaxResult add(@RequestBody DeviceRepair deviceRepair) { |
| | | return deviceRepairService.saveDeviceRepair(deviceRepair); |
| | | } |
| | | |
| | |
| | | DeviceRepairDto byId = deviceRepairService.detailById(id); |
| | | return AjaxResult.success(byId); |
| | | } |
| | | // |
| | | // @ApiOperation("根据id查询附件") |
| | | // @GetMapping("/{deviceId}") |
| | | // public AjaxResult deviceId(@PathVariable Long id) { |
| | | // DeviceRepairDto byId = deviceRepairService.detailById(id); |
| | | // return AjaxResult.success(byId); |
| | | // } |
| | | |
| | | @PutMapping () |
| | | @PutMapping() |
| | | @ApiOperation("修改设备报修") |
| | | public AjaxResult update( @RequestBody DeviceRepair deviceRepair) { |
| | | public AjaxResult update(@RequestBody DeviceRepair deviceRepair) { |
| | | return deviceRepairService.updateDeviceRepair(deviceRepair); |
| | | } |
| | | |
| | | @PostMapping ("repair") |
| | | @ApiOperation("设备维修") |
| | | public AjaxResult repair( @RequestBody DeviceRepair deviceRepair) { |
| | | @PostMapping("/repairs") |
| | | public AjaxResult repair(@RequestBody DeviceRepair deviceRepair) { |
| | | return deviceRepairService.updateDeviceRepair(deviceRepair); |
| | | } |
| | | |