| | |
| | | import com.ruoyi.device.service.DeviceDefectRecordService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | public class DeviceDefectRecordController { |
| | | @Autowired |
| | | private DeviceDefectRecordService deviceDefectRecordService; |
| | | @ApiModelProperty("设备缺陷记录列表") |
| | | @ApiOperation("设备缺陷记录列表") |
| | | @GetMapping("/page") |
| | | public AjaxResult page(Page page , DeviceDefectRecordDto deviceDefectRecordDto) { |
| | | return AjaxResult.success(deviceDefectRecordService.listPage(page,deviceDefectRecordDto)); |
| | | } |
| | | @ApiModelProperty("设备id查询设备缺陷记录列表") |
| | | @ApiOperation("设备id查询设备缺陷记录列表") |
| | | @GetMapping("/find/{deviceLedgerId}") |
| | | public AjaxResult find(@PathVariable Long deviceLedgerId) { |
| | | DeviceDefectRecordDto deviceDefectRecordDto = new DeviceDefectRecordDto(); |
| | |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiModelProperty("添加设备缺陷记录") |
| | | @ApiOperation("添加设备缺陷记录") |
| | | public AjaxResult add(@RequestBody DeviceDefectRecord deviceDefectRecord) { |
| | | return AjaxResult.success(deviceDefectRecordService.add(deviceDefectRecord)); |
| | | } |
| | | @PostMapping("/update") |
| | | @ApiModelProperty("修改设备缺陷记录") |
| | | @ApiOperation("修改设备缺陷记录") |
| | | public AjaxResult update(@RequestBody DeviceDefectRecord deviceDefectRecord) { |
| | | return AjaxResult.success(deviceDefectRecordService.updateByDDR(deviceDefectRecord)); |
| | | } |
| | | @DeleteMapping("/delete") |
| | | @ApiModelProperty("删除设备缺陷记录") |
| | | @ApiOperation("删除设备缺陷记录") |
| | | public AjaxResult delete(@PathVariable Long id) { |
| | | return AjaxResult.success(deviceDefectRecordService.removeById(id)); |
| | | } |