| | |
| | | import com.ruoyi.device.dto.DeviceRepairDto; |
| | | import com.ruoyi.device.pojo.DeviceRepair; |
| | | import com.ruoyi.device.service.IDeviceRepairService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return AjaxResult.success(deviceRepairService.queryPage(page,deviceRepairDto)); |
| | | } |
| | | |
| | | @Log(title = "新增设备报修", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | @Operation(summary = "添加设备报修") |
| | | public AjaxResult add( @RequestBody DeviceRepairDto deviceRepairDto) { |
| | |
| | | return AjaxResult.success(deviceRepairService.detailById(id)); |
| | | } |
| | | |
| | | @Log(title = "修改设备报修", businessType = BusinessType.UPDATE) |
| | | @PutMapping () |
| | | @Operation(summary = "修改设备报修") |
| | | public AjaxResult update( @RequestBody DeviceRepairDto deviceRepairDto) { |
| | | return deviceRepairService.updateDeviceRepair(deviceRepairDto); |
| | | } |
| | | |
| | | @PostMapping ("repair") |
| | | @Log(title = "设备维修", businessType = BusinessType.UPDATE) |
| | | @PostMapping ("/repair") |
| | | @Operation(summary = "设备维修") |
| | | public AjaxResult repair( @RequestBody DeviceRepairDto deviceRepairDto) { |
| | | return deviceRepairService.updateDeviceRepair(deviceRepairDto); |
| | | return deviceRepairService.confirmRepair(deviceRepairDto); |
| | | } |
| | | |
| | | @Log(title = "设备报修验收", businessType = BusinessType.UPDATE) |
| | | @PostMapping ("/acceptance") |
| | | @Operation(summary = "设备报修验收审批") |
| | | public AjaxResult acceptance(@RequestBody DeviceRepairDto deviceRepairDto) { |
| | | return deviceRepairService.approveRepairAcceptance(deviceRepairDto); |
| | | } |
| | | |
| | | @Log(title = "删除设备报修", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @Operation(summary = "删除设备报修") |
| | | public AjaxResult delete(@PathVariable("ids") Long[] ids) { |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "导出设备报修", businessType = BusinessType.EXPORT) |
| | | @PostMapping("export") |
| | | @Operation(summary = "导出设备报修") |
| | | public void export(HttpServletResponse response, Long[] ids) { |