| | |
| | | eamEquipmentExtendService.updateEquipmentRepairStatus(eamReportRepair.getEquipmentId(), EquipmentRepairStatus.WAIT_REPAIR.name()); |
| | | return eamReportRepair; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean edit(EamReportRepair eamReportRepair) { |
| | | // 附件处理 |
| | | if (eamReportRepair.getImageFilesResult() != null) { |
| | | List<FileUploadResult> imageFilesResult = eamReportRepair.getImageFilesResult(); |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | try { |
| | | String referenceFile = mapper.writeValueAsString(imageFilesResult); |
| | | eamReportRepair.setImageFiles(referenceFile); |
| | | } catch (JsonProcessingException e) { |
| | | return false; |
| | | } |
| | | } else { |
| | | eamReportRepair.setImageFiles(null); |
| | | } |
| | | this.baseMapper.updateById(eamReportRepair); |
| | | return true; |
| | | } |
| | | } |