| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | return deviceMaintenanceService.saveDeviceRepair(deviceMaintenance); |
| | | } |
| | | |
| | | @PostMapping("/batchAdd") |
| | | @ApiOperation("批量添加设备保养") |
| | | public AjaxResult batchAdd(@RequestBody DeviceMaintenance deviceMaintenance) { |
| | | if (CollectionUtils.isEmpty(deviceMaintenance.getDeviceIds())) { |
| | | return AjaxResult.error("请选择设备"); |
| | | } |
| | | return deviceMaintenanceService.batchSaveDeviceRepair(deviceMaintenance); |
| | | } |
| | | |
| | | @ApiOperation("根据id查询设备保养") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult detail(@PathVariable Long id) { |