修改法规清单批量设置报错
This commit is contained in:
+30
-37
@@ -4433,27 +4433,27 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
List<String> dutyTerritoryList = new ArrayList<>();
|
List<String> dutyTerritoryList = new ArrayList<>();
|
||||||
//获取批量设置中责任领域
|
//获取批量设置中责任领域
|
||||||
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
|
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
|
||||||
if (!StringUtils.isEmpty(dutyTerritory)) {
|
if (StringUtils.isNotEmpty(dutyTerritory)) {
|
||||||
for (ProjectLawsInventoryEO info : infoList) {
|
for (ProjectLawsInventoryEO info : infoList) {
|
||||||
info.setDutyTerritory(dutyTerritory);
|
info.setDutyTerritory(dutyTerritory);
|
||||||
}
|
}
|
||||||
dutyTerritoryList = Arrays.asList(dutyTerritory.split(","));
|
dutyTerritoryList = Arrays.asList(dutyTerritory.split(","));
|
||||||
dutyTerritoryList = dutyTerritoryList.stream().distinct().collect(Collectors.toList());
|
|
||||||
} else {
|
} else {
|
||||||
for (ProjectLawsInventoryEO info : infoList) {
|
for (ProjectLawsInventoryEO info : infoList) {
|
||||||
List<String> dutyList = new ArrayList<>();
|
if (StringUtils.isNotEmpty(info.getDutyTerritory())) {
|
||||||
dutyList = Arrays.asList(info.getDutyTerritory().split(","));
|
dutyTerritoryList.addAll(Arrays.asList(info.getDutyTerritory().split(",")));
|
||||||
dutyTerritoryList.addAll(dutyList);
|
}
|
||||||
}
|
}
|
||||||
dutyTerritoryList = dutyTerritoryList.stream().distinct().collect(Collectors.toList());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!StringUtils.isEmpty(desdutyId)) {
|
dutyTerritoryList = dutyTerritoryList.stream().distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (StringUtils.isNotEmpty(desdutyId)) {
|
||||||
for (ProjectLawsInventoryEO info : infoList) {
|
for (ProjectLawsInventoryEO info : infoList) {
|
||||||
info.setDesignDutyId(desdutyId);
|
info.setDesignDutyId(desdutyId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!StringUtils.isEmpty(verdutyId)) {
|
if (StringUtils.isNotEmpty(verdutyId)) {
|
||||||
for (ProjectLawsInventoryEO info : infoList) {
|
for (ProjectLawsInventoryEO info : infoList) {
|
||||||
info.setVerifyDutyId(verdutyId);
|
info.setVerifyDutyId(verdutyId);
|
||||||
}
|
}
|
||||||
@@ -4467,12 +4467,18 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
params.put("userId", currentUser.getId());
|
params.put("userId", currentUser.getId());
|
||||||
params.put("modelType", RoleRelModelTypeEnum.LAWS_INVENTORY.getValue());
|
params.put("modelType", RoleRelModelTypeEnum.LAWS_INVENTORY.getValue());
|
||||||
ProjectLibraryRoleRelEO projectLibraryRoleRelEO = projectLibraryRoleRelEOService.queryByProjectLibraryIdAndUserId(params);
|
ProjectLibraryRoleRelEO projectLibraryRoleRelEO = projectLibraryRoleRelEOService.queryByProjectLibraryIdAndUserId(params);
|
||||||
String roleCode1 = projectLibraryRoleRelEO.getRoleCode();
|
|
||||||
|
|
||||||
|
//获取当前项目库id的studio工程师和认证工程师
|
||||||
|
List<String> studionList = new ArrayList<>();
|
||||||
|
List<String> certificationEngineerList = new ArrayList<>();
|
||||||
|
List<ProjectLibraryBase> projectLibraryBases = projectLibraryBaseService.queryById(projectLibrartId, cut);
|
||||||
|
|
||||||
|
String roleCode1 = projectLibraryRoleRelEO.getRoleCode();
|
||||||
|
if(CollectionUtils.isNotEmpty(dutyTerritoryList)){
|
||||||
//获取相关责任领域下的和projectLibrartId的相关人员名单的信息
|
//获取相关责任领域下的和projectLibrartId的相关人员名单的信息
|
||||||
List<ProjectRelatedPersonnel> projectRelatedPersonnelList = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritoy(projectLibrartId, dutyTerritoryList);
|
List<ProjectRelatedPersonnel> projectRelatedPersonnelList = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritoy(projectLibrartId, dutyTerritoryList);
|
||||||
|
if(CollectionUtils.isNotEmpty(projectRelatedPersonnelList)){
|
||||||
List<ProjectRelatedPersonnel> list = new ArrayList<>();
|
List<ProjectRelatedPersonnel> updatePrpEoList = new ArrayList<>();
|
||||||
|
|
||||||
for (ProjectLawsInventoryEO projectLawsInventoryEO1 : infoList) {
|
for (ProjectLawsInventoryEO projectLawsInventoryEO1 : infoList) {
|
||||||
|
|
||||||
@@ -4498,42 +4504,37 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
List<String> lawEnginnerList = new ArrayList<>();
|
List<String> lawEnginnerList = new ArrayList<>();
|
||||||
List<String> enginnerLawSetList = new ArrayList<>();
|
List<String> enginnerLawSetList = new ArrayList<>();
|
||||||
List<String> enginnerAttSetList = new ArrayList<>();
|
List<String> enginnerAttSetList = new ArrayList<>();
|
||||||
//根据相关人员名单获取的工程接口人
|
|
||||||
for (ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList) {
|
for (ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList) {
|
||||||
|
// 工程接口人
|
||||||
String enginneringInterfacePerson = relatedPersonnel.getEngineeringInterfacePerson();
|
String enginneringInterfacePerson = relatedPersonnel.getEngineeringInterfacePerson();
|
||||||
if (!StringUtils.isEmpty(enginneringInterfacePerson)) {
|
if (!StringUtils.isEmpty(enginneringInterfacePerson)) {
|
||||||
enginnerList = Arrays.stream(enginneringInterfacePerson.split(",")).collect(Collectors.toList());
|
enginnerList = Arrays.stream(enginneringInterfacePerson.split(",")).collect(Collectors.toList());
|
||||||
allList.addAll(enginnerList);
|
allList.addAll(enginnerList);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//获取相关人员名单中的法规工程师
|
// 法规工程师
|
||||||
for (ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList) {
|
|
||||||
String lawEngineer = relatedPersonnel.getLawEngineer();
|
String lawEngineer = relatedPersonnel.getLawEngineer();
|
||||||
if (!StringUtils.isEmpty(lawEngineer)) {
|
if (!StringUtils.isEmpty(lawEngineer)) {
|
||||||
lawEnginnerList = Arrays.stream(lawEngineer.split(",")).collect(Collectors.toList());
|
lawEnginnerList = Arrays.stream(lawEngineer.split(",")).collect(Collectors.toList());
|
||||||
allList.addAll(lawEnginnerList);
|
allList.addAll(lawEnginnerList);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//获取相关人员名单中的工程接口-法规工程师设置
|
// 工程接口-法规工程师设置
|
||||||
for (ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList) {
|
|
||||||
String engineerLawSet = relatedPersonnel.getEngineerLawSet();
|
String engineerLawSet = relatedPersonnel.getEngineerLawSet();
|
||||||
if (!StringUtils.isEmpty(engineerLawSet)) {
|
if (!StringUtils.isEmpty(engineerLawSet)) {
|
||||||
enginnerLawSetList = Arrays.stream(engineerLawSet.split(",")).collect(Collectors.toList());
|
enginnerLawSetList = Arrays.stream(engineerLawSet.split(",")).collect(Collectors.toList());
|
||||||
allList.addAll(enginnerLawSetList);
|
allList.addAll(enginnerLawSetList);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//获取相关人员名单中的工程接口-认证工程师设置
|
// 工程接口-认证工程师设置
|
||||||
for (ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList) {
|
|
||||||
String engineerAttSet = relatedPersonnel.getEngineerAttSet();
|
String engineerAttSet = relatedPersonnel.getEngineerAttSet();
|
||||||
if (!StringUtils.isEmpty(engineerAttSet)) {
|
if (!StringUtils.isEmpty(engineerAttSet)) {
|
||||||
enginnerAttSetList = Arrays.stream(engineerAttSet.split(",")).collect(Collectors.toList());
|
enginnerAttSetList = Arrays.stream(engineerAttSet.split(",")).collect(Collectors.toList());
|
||||||
allList.addAll(enginnerAttSetList);
|
allList.addAll(enginnerAttSetList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//获取当前项目库id的studio工程师和认证工程师
|
|
||||||
List<String> studionList = new ArrayList<>();
|
|
||||||
List<String> certificationEngineerList = new ArrayList<>();
|
|
||||||
List<ProjectLibraryBase> projectLibraryBases = projectLibraryBaseService.queryById(projectLibrartId, cut);
|
|
||||||
for (ProjectLibraryBase projectLibraryBase : projectLibraryBases) {
|
for (ProjectLibraryBase projectLibraryBase : projectLibraryBases) {
|
||||||
studionList.add(projectLibraryBase.getStudioEngineer());
|
studionList.add(projectLibraryBase.getStudioEngineer());
|
||||||
|
|
||||||
@@ -4546,13 +4547,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
allList = allList.stream().filter(all -> {
|
allList = allList.stream().filter(all -> {
|
||||||
return StringUtils.isNotBlank(all);
|
return StringUtils.isNotBlank(all);
|
||||||
}).distinct().collect(Collectors.toList());
|
}).distinct().collect(Collectors.toList());
|
||||||
/*
|
|
||||||
for(String all : allList){
|
|
||||||
if(all.equals("")){
|
|
||||||
allList.remove(all);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
//遍历所有人alllist中是否包含责任人,如果包含,不用操作。
|
//遍历所有人alllist中是否包含责任人,如果包含,不用操作。
|
||||||
//-------如果不包含,再去判断当前用户的角色是studio、法规还是认证
|
//-------如果不包含,再去判断当前用户的角色是studio、法规还是认证
|
||||||
for (ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList) {
|
for (ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList) {
|
||||||
@@ -4587,12 +4581,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
list.addAll(projectRelatedPersonnelList);
|
updatePrpEoList.addAll(projectRelatedPersonnelList);
|
||||||
// this.projectRelatedPersonnelService.updateBatchById(projectRelatedPersonnelList);
|
}
|
||||||
|
this.projectRelatedPersonnelService.updateBatchById(updatePrpEoList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.projectRelatedPersonnelService.updateBatchById(list);
|
|
||||||
|
|
||||||
|
|
||||||
projectLawsInventoryEOList.forEach(projectLawsInventory -> {
|
projectLawsInventoryEOList.forEach(projectLawsInventory -> {
|
||||||
//更新三个符合性流程中的处理人。
|
//更新三个符合性流程中的处理人。
|
||||||
this.updateFlowInfo(projectLawsInventory);
|
this.updateFlowInfo(projectLawsInventory);
|
||||||
|
|||||||
Reference in New Issue
Block a user