Lius
2025-04-23 a90ae030ad64da0e44f48f4b1bb044753c1acff2
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamReportRepairServiceImpl.java
@@ -139,4 +139,24 @@
        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;
    }
}