UAT 问题清单修改,第9条。认证清单调取,自动带入责任人、接口人。

This commit is contained in:
wangzhijiang
2023-04-06 13:51:02 +08:00
parent a52f4a0b38
commit feccd26507
@@ -2823,6 +2823,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
List<AuthDummyInventoryInfoEO> authDummyInventoryInfoEOList = this.authDummyInventoryInfoEOService.list(authDummyInfoQueryWrap);
if(CollectionUtils.isNotEmpty(authDummyInventoryInfoEOList)){
// 获取该项目相关人员名单信息,用于根据责任领域配置数据 自动设置责任人、接口人。
QueryWrapper<ProjectRelatedPersonnel> prpQueryWrap = new QueryWrapper<>();
prpQueryWrap.lambda().eq(ProjectRelatedPersonnel::getProjectId,projectLibraryId);
List<ProjectRelatedPersonnel> prpEoList = this.projectRelatedPersonnelService.list(prpQueryWrap);
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryEOQueryWrap = new QueryWrapper<>();
lawsInventoryEOQueryWrap.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectLibraryId);
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.projectLawsInventoryEOService.list(lawsInventoryEOQueryWrap);
@@ -2849,6 +2854,42 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
ProjectCertificationInventoryEO projectCertificationInventoryEOTemp = new ProjectCertificationInventoryEO();
BeanUtils.copyProperties(authDummyInventoryInfoEO,projectCertificationInventoryEOTemp);
String dutyTerritory = projectCertificationInventoryEOTemp.getDutyTerritory();
if(StringUtils.isNotEmpty(dutyTerritory)){
if(CollectionUtils.isNotEmpty(prpEoList)){
List<ProjectRelatedPersonnel> prpEoListTemp = prpEoList.stream().filter(prpEo -> {
boolean flag = false;
if (StringUtils.equals(prpEo.getDutyTerritory(), dutyTerritory)) {
flag = true;
}
return flag;
}).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(prpEoListTemp)){
List<String> engineeringInterfacePersonIdList = new ArrayList<>();
ProjectRelatedPersonnel prpEo = prpEoListTemp.get(0);
if(StringUtils.isNotBlank(prpEo.getEngineeringInterfacePerson())){
List<String> engineeringInterfacePersonList = Arrays.asList(prpEo.getEngineeringInterfacePerson().split(","));
engineeringInterfacePersonIdList.addAll(engineeringInterfacePersonList);
}
if(StringUtils.isNotBlank(prpEo.getEngineerAttSet())){
List<String> engineerAttSetList = Arrays.asList(prpEo.getEngineerAttSet().split(","));
engineeringInterfacePersonIdList.addAll(engineerAttSetList);
}
if(StringUtils.isNotBlank(prpEo.getEngineerLawSet())){
List<String> engineerLawSetList = Arrays.asList(prpEo.getEngineerLawSet().split(","));
engineeringInterfacePersonIdList.addAll(engineerLawSetList);
}
engineeringInterfacePersonIdList = engineeringInterfacePersonIdList.stream().distinct().collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(engineeringInterfacePersonIdList) && engineeringInterfacePersonIdList.size() == 1){
projectCertificationInventoryEOTemp.setSdt(engineeringInterfacePersonIdList.get(0));
projectCertificationInventoryEOTemp.setDutyPerson(engineeringInterfacePersonIdList.get(0));
}
}
}
}
projectCertificationInventoryEOTemp.setId(UUID.randomUUID().toString().replace("-", ""));
projectCertificationInventoryEOTemp.setProjectLibraryId(projectLibraryId);
projectCertificationInventoryEOTemp.setFlowStatus(CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());