修改文档库文档编号、标题变化,虚拟清单,法规清单不联动(法规/认证清单中若状态为符合时则编号标题不再随文档库变化)

This commit is contained in:
gaosong
2023-11-23 21:15:31 +08:00
parent 021b841c3c
commit 77f2f1e82b
2 changed files with 38 additions and 1 deletions
@@ -1396,8 +1396,23 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
userIdList.addAll(datas.stream().map(ProjectCertificationInventoryEO::getSdt).collect(Collectors.toList()));
userIdList.addAll(datas.stream().map(ProjectCertificationInventoryEO::getDutyPerson).collect(Collectors.toList()));
List<SysUser> sysUserList = this.sysUserService.querySysUserListByIdList(userIdList);
List<String> standIdList = datas.stream().map(ProjectCertificationInventoryEO::getBussDocumentLibraryId).distinct().collect(Collectors.toList());
List<BussDocumentLibraryEO> docList = iBussDocumentLibraryEOService.listByIds(standIdList);
for (ProjectCertificationInventoryEO data : datas) {
//处理编号认证清单中若状态为符合时则编号标题不再随文档库变化
if (!data.getFlowStatus().equals(CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue())
&& StringUtils.isNotBlank(data.getBussDocumentLibraryId())) {
BussDocumentLibraryEO docObj = null;
for (BussDocumentLibraryEO obj : docList) {
if (obj.getId().equals(data.getBussDocumentLibraryId())) {
docObj = obj;
break;
}
}
if(null != docObj){
data.setSerialNumber(docObj.getSerialNumber());
}
}
if(StringUtils.isNotEmpty(data.getSdt())){
String sdtName = sysUserList.stream().filter(sysUser -> {
boolean flag = false;
@@ -1556,7 +1556,29 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
bussDocumentLibraryEOS = iBussDocumentLibraryEOService.list(lambdaQueryWrapper);
}
List<String> standIdList = list.stream().map(ProjectLawsInventoryEO::getStandId).distinct().collect(Collectors.toList());
List<BussDocumentLibraryEO> docList = bussDocumentLibraryEOService.listByIds(standIdList);
for (ProjectLawsInventoryEO projectLawsInventoryEO : list) {
//处理编号法规清单中若状态为符合时则编号标题不再随文档库变化
if ((!projectLawsInventoryEO.getDesignFlowStatus().equals(ComplianceFlowStatusEnum.CONFORMITY.getValue())
|| !projectLawsInventoryEO.getVerifyFlowStatus().equals(ComplianceFlowStatusEnum.CONFORMITY.getValue()))
&& StringUtils.isNotBlank(projectLawsInventoryEO.getStandId())) {
BussDocumentLibraryEO docObj = null;
for (BussDocumentLibraryEO obj : docList) {
if (obj.getId().equals(projectLawsInventoryEO.getStandId())) {
docObj = obj;
break;
}
}
if(null != docObj){
projectLawsInventoryEO.setSerialNumber(docObj.getSerialNumber());
if (StringUtils.equals(cut, CutEnum.CN.getValue())) {
projectLawsInventoryEO.setTitle(docObj.getTitle());
} else {
projectLawsInventoryEO.setTitle(docObj.getTitleEn());
}
}
}
//处理交付物类型
String designDeliverableType = projectLawsInventoryEO.getDesignDeliverableType();
String prehomoDeliverableType = projectLawsInventoryEO.getPrehomoDeliverableType();