| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult saveDeviceRepair(DeviceRepairDto deviceRepairDto) { |
| | | if (deviceRepairDto.getDeviceLedgerId() == null) { |
| | | return AjaxResult.error("请选择设备"); |
| | | } |
| | | DeviceLedger byId = deviceLedgerService.getById(deviceRepairDto.getDeviceLedgerId()); |
| | | if (byId == null) { |
| | | return AjaxResult.error("所选设备不存在"); |
| | | } |
| | | deviceRepairDto.setDeviceName(byId.getDeviceName()); |
| | | deviceRepairDto.setDeviceModel(byId.getDeviceModel()); |
| | | if (deviceRepairDto.getStatus() == null) { |