项目库-项目库详情-相关人员名单

This commit is contained in:
cuijiaming
2023-03-23 20:02:50 +08:00
parent 79014e5f45
commit b485ddbb96
4 changed files with 101 additions and 3 deletions
@@ -56,6 +56,16 @@ public class ProjectRelatedPersonnel implements Serializable {
@Excel(name = "工程接口人,Engineering Interface", width = 15,orderNum = "3")
private java.lang.String engineeringInterfacePersonName;
/**工程接口人法规工程师设置*/
private java.lang.String engineerLawSet;
@TableField(exist = false)
private java.lang.String engineerLawSetName;
/**工程接口人认证工程师设置*/
private java.lang.String engineerAttSet;
@TableField(exist = false)
private java.lang.String engineerAttSetName;
/**认证工程师*/
private java.lang.String certificationEngineer;
@TableField(exist = false)
@@ -71,6 +71,9 @@ public interface IProjectRelatedPersonnelService extends IService<ProjectRelated
Map<String,Object> queryPersonByProjectId(String projectId, String dutyTerritory);
//通过项目库id 和责任领域查询
List<ProjectRelatedPersonnel> queryByProjectIdAndDutyTerritoy(String projectId, List<String> dutyTerritoryList);
/**处理导出数据*/
List<ProjectRelatedPersonnel> disposeExportXls(String id,String projectId,String cut);
@@ -506,6 +506,78 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
this.update(projectLawsInventoryEO,updateWrapper);
// saveOrUpdate(projectLawsInventoryEO);
List<String> dutyTerritoryList = new ArrayList<>();
dutyTerritoryList = Arrays.asList(projectLawsInventoryEO.getDutyTerritory().split(","));
dutyTerritoryList = dutyTerritoryList.stream().distinct().collect(Collectors.toList());
String projectLibrartId = projectLawsInventoryEO.getProjectLibraryId();
List<String> designDutyIdList = new ArrayList<>();
designDutyIdList = Arrays.asList(projectLawsInventoryEO.getDesignDutyId().split(","));
designDutyIdList = designDutyIdList.stream().distinct().collect(Collectors.toList());
List<String> verifyDutyIdList = new ArrayList<>();
verifyDutyIdList = Arrays.asList(projectLawsInventoryEO.getVerifyDutyId().split(","));
verifyDutyIdList = verifyDutyIdList.stream().distinct().collect(Collectors.toList());
//allList 为法规工程师中验证符合性和确认符合中的责任人
List<String> allList = new ArrayList<>();
// allList = Arrays.asList(designDutyIdList.toString()+","+verifyDutyIdList.toString());
allList.addAll(designDutyIdList);
allList.addAll(verifyDutyIdList);
allList = allList.stream().distinct().collect(Collectors.toList());
// List<String> engineeringInterfacePersonList = new ArrayList<>();
// engineeringInterfacePersonList = Arrays.asList(projectLawsInventoryEO.getEngineeringInterfacePerson().split(","));
// engineeringInterfacePersonList = engineeringInterfacePersonList.stream().distinct().collect(Collectors.toList());
List<ProjectRelatedPersonnel> projectRelatedPersonnelList = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritoy(projectLibrartId, dutyTerritoryList);
//enginnerList为每一条的工程接口人的集合
List<String> enginnerList = new ArrayList<>();
if(projectRelatedPersonnelList.size()>0){
for(ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnelList){
if(StringUtils.isEmpty(projectRelatedPersonnel.getEngineeringInterfacePerson())){
//直接将allList存入到
String all = String.join(",",allList);
projectRelatedPersonnel.setEngineerLawSet(all);
projectRelatedPersonnelService.editById(projectRelatedPersonnel);
}else {
enginnerList.add(projectRelatedPersonnel.getEngineeringInterfacePerson());
enginnerList = enginnerList.stream().distinct().collect(Collectors.toList());
//比较allList中有而enginnerList中没有的工程接口人
boolean flag = false;
List<String> resultList = new ArrayList<>();
if(allList.size()>0){
flag = CollectionUtils.isEqualCollection(allList,enginnerList);
if(!flag){
//进行遍历两个list将allList中有的而enginnerList没有的存入到相关人员名单中的法规那里
for(String all : allList){
boolean flag1 = true;
for(String enginner : enginnerList){
if(all.equals(enginner)){
flag1 = false;
break;
}
}
if(flag1){
resultList.add(all);
}
}
}
}
//将相关人员名单中没有的resultList添加到相关人员记录表中
String result = String.join(",",resultList);
projectRelatedPersonnel.setEngineerLawSet(result);
projectRelatedPersonnelService.editById(projectRelatedPersonnel);
}
}
}
//翻译-中文
translateData(infoEOList);
translateData(dataList);
@@ -1800,7 +1872,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
String verifyFlowStatusName = ComplianceFlowStatusEnum.getTextByValue(projectLawsInventoryEO.getVerifyFlowStatus(), cut);
projectLawsInventoryEO.setVerifyFlowStatusName(verifyFlowStatusName);
}
// 返回符合性流程的流程实例id
if(!StringUtils.equals(projectLawsInventoryEO.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
||!StringUtils.equals(projectLawsInventoryEO.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())){
@@ -5873,7 +5945,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
queryWrapper.lambda().in(ProjectLawsInventoryEO::getId, Arrays.asList(ids.split(",")));
queryWrapper.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectLibraryId);
List<ProjectLawsInventoryEO> projectLawsInventoryEOS = this.list(queryWrapper);
List<String> idList = Arrays.asList(ids.split(","));
String projectLawsInventoryIds = ids;
String pIds = "";
@@ -5999,7 +6071,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//清除流程中心对应的数据
params.put("ids",ids);
this.processInfoEOService.change(params);
// 删除流程历史数据
this.processHistoryEOService.deleteBiActiProcInstIdList(actiProcInstIdList);
@@ -557,6 +557,19 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
return result;
}
@Override
public List<ProjectRelatedPersonnel> queryByProjectIdAndDutyTerritoy(String projectId, List<String> dutyTerritoryList) {
QueryWrapper<ProjectRelatedPersonnel> wrapper = new QueryWrapper<>();
wrapper.eq("project_id",projectId).in("duty_territory",dutyTerritoryList);
List<ProjectRelatedPersonnel> projectRelatedPersonnels = baseMapper.selectList(wrapper);
return projectRelatedPersonnels;
}
/**处理导出数据*/
@Override
public List<ProjectRelatedPersonnel> disposeExportXls(String id,String projectId,String cut){