diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/enums/SysCategoryValueTypeEnum.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/enums/SysCategoryValueTypeEnum.java index 5a8359056..0a5cde3a8 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/enums/SysCategoryValueTypeEnum.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/enums/SysCategoryValueTypeEnum.java @@ -15,4 +15,20 @@ public enum SysCategoryValueTypeEnum { this.name = name; this.value = value; } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index 323922ade..b4b0caac1 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -34,6 +34,7 @@ import com.jero.modules.system.entity.SysCategory; import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.entity.SysRole; import com.jero.modules.system.entity.SysUser; +import com.jero.modules.system.enums.SysCategoryValueTypeEnum; import com.jero.modules.system.mapper.SysRoleMapper; import com.jero.modules.system.service.ISysCategoryService; import com.jero.modules.system.service.ISysDictItemService; @@ -1264,6 +1265,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl projectCertificationInventoryEOList = this.list(queryWrapper); + this.disposeData(projectCertificationInventoryEOList,CutEnum.CN.getValue()); if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){ throw new JeroBootException("至少选择一条数据流程状态为'结果待提交 或 审查退回'的数据!"); @@ -1291,9 +1293,35 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl projectCertificationInventoryLogEOList = new ArrayList<>(); // 数据更新为结果待审查 for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) { projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue()); + + String contentCn = ""; + String contentEn = ""; + if (StringUtils.equals(projectCertificationInventoryEO.getValueType(), SysCategoryValueTypeEnum.FILE.getValue())) { + String fileName = "N/A"; + if (StringUtils.isNotEmpty(projectCertificationInventoryEO.getDeliveryResult())) { + fileName = this.ossFileService.getFileInfos(projectCertificationInventoryEO.getDeliveryResult()).stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(",")); + } + contentCn = "\"" + currentUser.getUsername() + "\"" +"提交了附件 " + fileName; + contentEn = "\"" + currentUser.getUsername() + "\"" +" submitted attachment " + fileName; + }else { + String deliveryResult = (StringUtils.isNotEmpty(projectCertificationInventoryEO.getDeliveryResult()) ? projectCertificationInventoryEO.getDeliveryResult() : "N/A"); + contentCn = "\"" + currentUser.getUsername() + "\"" +"提交了交付结果为" + deliveryResult; + contentEn = "\"" + currentUser.getUsername() + "\"" +" submitted a delivery result of " + deliveryResult; + } + ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO = new ProjectCertificationInventoryLogEO(); + projectCertificationInventoryLogEO.setProjectCertificationInventoryId(projectCertificationInventoryEO.getId()); + projectCertificationInventoryLogEO.setContentCn(contentCn); + projectCertificationInventoryLogEO.setContentEn(contentEn); + projectCertificationInventoryLogEO.setOperatorType(OperatorTypeEnum.CERTIFICATION_INVENTORY_DUTY_PERSON_SUBMIT_TASK.getValue()); + projectCertificationInventoryLogEOList.add(projectCertificationInventoryLogEO); + } + + if(CollectionUtils.isNotEmpty(projectCertificationInventoryLogEOList)){ + this.projectCertificationInventoryLogEOService.insertBatch(projectCertificationInventoryLogEOList); } try { this.updateBatchById(projectCertificationInventoryEOList); @@ -2427,7 +2455,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl citeQueryWrapper = new QueryWrapper<>(); citeQueryWrapper.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,citeProjectLibraryId); citeQueryWrapper.lambda().eq(ProjectCertificationInventoryEO::getFlowStatus,CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue()); - List citeProjectCertificationInventoryEOList = this.list(queryWrapper); + List citeProjectCertificationInventoryEOList = this.baseMapper.selectList(citeQueryWrapper); if(CollectionUtils.isNotEmpty(citeProjectCertificationInventoryEOList)){ for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {