修改法规清单带入相关人,流程中的数据不能带入
This commit is contained in:
+139
-135
@@ -2611,181 +2611,185 @@ public class PlatformProjectLawsInventoryEOServiceImpl extends ServiceImpl<Platf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
if ((projectLawsInventoryEO.getDesignFlowStatus().equals(ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|
||||||
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
|
|| projectLawsInventoryEO.getDesignFlowStatus().equals(ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue()))
|
||||||
if (StringUtils.isNotEmpty(dutyTerritory)) {
|
&& (projectLawsInventoryEO.getVerifyFlowStatus().equals(ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|
||||||
List<ProjectRelatedPersonnel> projectRelatedPersonnelTempList = projectRelatedPersonnels.stream().filter(relatedPersonnel -> {
|
|| projectLawsInventoryEO.getVerifyFlowStatus().equals(ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue()))) {
|
||||||
boolean flag = false;
|
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
|
||||||
for (String duty : dutyTerritory.split(",")) {
|
if (StringUtils.isNotEmpty(dutyTerritory)) {
|
||||||
if (StringUtils.equals(duty, relatedPersonnel.getDutyTerritory())) {
|
List<ProjectRelatedPersonnel> projectRelatedPersonnelTempList = projectRelatedPersonnels.stream().filter(relatedPersonnel -> {
|
||||||
flag = true;
|
boolean flag = false;
|
||||||
|
for (String duty : dutyTerritory.split(",")) {
|
||||||
|
if (StringUtils.equals(duty, relatedPersonnel.getDutyTerritory())) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
return flag;
|
||||||
return flag;
|
}).collect(Collectors.toList());
|
||||||
}).collect(Collectors.toList());
|
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(projectRelatedPersonnelTempList)) {
|
if (CollectionUtils.isNotEmpty(projectRelatedPersonnelTempList)) {
|
||||||
|
|
||||||
LambdaUpdateWrapper<ProjectLawsInventoryEO> updateWrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<ProjectLawsInventoryEO> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
|
||||||
//法规工程师
|
//法规工程师
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) {
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) {
|
||||||
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer);
|
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer);
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setRegulationOwnerId(userId);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getRegulationOwnerId());
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setRegulationOwnerId(userId);
|
|
||||||
} else {
|
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getRegulationOwnerId, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//认证工程师
|
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId())) {
|
|
||||||
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer);
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setHomologationEngineerId(userId);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getHomologationEngineerId());
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setHomologationEngineerId(userId);
|
|
||||||
} else {
|
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getHomologationEngineerId, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//项目接口人
|
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
|
|
||||||
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnelTempList, studioEngineer);
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setEngineeringInterfacePerson(userId);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getEngineeringInterfacePerson());
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setEngineeringInterfacePerson(userId);
|
|
||||||
} else {
|
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getEngineeringInterfacePerson, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//设计符合性确认
|
|
||||||
//发起人角色
|
|
||||||
String designInitiator = projectLawsInventoryEO.getDesignInitiator();
|
|
||||||
if (StringUtils.isNotEmpty(designInitiator)) {
|
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignInitiatorId())) {
|
|
||||||
String userId = ToGetAUserId(designInitiator, projectRelatedPersonnelTempList, studioEngineer);
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
projectLawsInventoryEO.setDesignInitiatorId(userId);
|
projectLawsInventoryEO.setRegulationOwnerId(userId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String userId = ToGetAUserId(designInitiator, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getDesignInitiatorId());
|
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getRegulationOwnerId());
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
projectLawsInventoryEO.setDesignInitiatorId(userId);
|
projectLawsInventoryEO.setRegulationOwnerId(userId);
|
||||||
} else {
|
} else {
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getDesignInitiatorId, null);
|
updateWrapper.set(ProjectLawsInventoryEO::getRegulationOwnerId, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//责任人角色
|
//认证工程师
|
||||||
String designDuty = projectLawsInventoryEO.getDesignDuty();
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId())) {
|
||||||
if (StringUtils.isNotEmpty(designDuty)) {
|
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer);
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignDutyId())) {
|
|
||||||
String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer);
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
projectLawsInventoryEO.setDesignDutyId(userId);
|
projectLawsInventoryEO.setHomologationEngineerId(userId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getDesignDutyId());
|
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getHomologationEngineerId());
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
projectLawsInventoryEO.setDesignDutyId(userId);
|
projectLawsInventoryEO.setHomologationEngineerId(userId);
|
||||||
} else {
|
} else {
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getDesignDutyId, null);
|
updateWrapper.set(ProjectLawsInventoryEO::getHomologationEngineerId, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
//项目接口人
|
||||||
//prehomo确认
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
|
||||||
//发起人角色
|
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnelTempList, studioEngineer);
|
||||||
String prehomoInitiator = projectLawsInventoryEO.getPrehomoInitiator();
|
|
||||||
if (StringUtils.isNotEmpty(prehomoInitiator)) {
|
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())) {
|
|
||||||
String userId = ToGetAUserId(prehomoInitiator, projectRelatedPersonnelTempList, studioEngineer);
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
projectLawsInventoryEO.setPrehomoInitiatorId(userId);
|
projectLawsInventoryEO.setEngineeringInterfacePerson(userId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String userId = ToGetAUserId(prehomoInitiator, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getPrehomoInitiatorId());
|
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getEngineeringInterfacePerson());
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
projectLawsInventoryEO.setPrehomoInitiatorId(userId);
|
projectLawsInventoryEO.setEngineeringInterfacePerson(userId);
|
||||||
} else {
|
} else {
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getPrehomoInitiatorId, null);
|
updateWrapper.set(ProjectLawsInventoryEO::getEngineeringInterfacePerson, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//责任人角色
|
//设计符合性确认
|
||||||
String prehomoDuty = projectLawsInventoryEO.getPrehomoDuty();
|
//发起人角色
|
||||||
if (StringUtils.isNotEmpty(prehomoDuty)) {
|
String designInitiator = projectLawsInventoryEO.getDesignInitiator();
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getPrehomoDutyId())) {
|
if (StringUtils.isNotEmpty(designInitiator)) {
|
||||||
String userId = ToGetAUserId(prehomoDuty, projectRelatedPersonnelTempList, studioEngineer);
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignInitiatorId())) {
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
String userId = ToGetAUserId(designInitiator, projectRelatedPersonnelTempList, studioEngineer);
|
||||||
projectLawsInventoryEO.setPrehomoDutyId(userId);
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
}
|
projectLawsInventoryEO.setDesignInitiatorId(userId);
|
||||||
} else {
|
}
|
||||||
String userId = ToGetAUserId(prehomoDuty, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getPrehomoDutyId());
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setPrehomoDutyId(userId);
|
|
||||||
} else {
|
} else {
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getPrehomoDutyId, null);
|
String userId = ToGetAUserId(designInitiator, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getDesignInitiatorId());
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setDesignInitiatorId(userId);
|
||||||
|
} else {
|
||||||
|
updateWrapper.set(ProjectLawsInventoryEO::getDesignInitiatorId, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//验证符合性确认
|
//责任人角色
|
||||||
//发起人角色
|
String designDuty = projectLawsInventoryEO.getDesignDuty();
|
||||||
String verifyInitiator = projectLawsInventoryEO.getVerifyInitiator();
|
if (StringUtils.isNotEmpty(designDuty)) {
|
||||||
if (StringUtils.isNotEmpty(verifyInitiator)) {
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignDutyId())) {
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getVerifyInitiatorId())) {
|
String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer);
|
||||||
String userId = ToGetAUserId(verifyInitiator, projectRelatedPersonnelTempList, studioEngineer);
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
projectLawsInventoryEO.setDesignDutyId(userId);
|
||||||
projectLawsInventoryEO.setVerifyInitiatorId(userId);
|
}
|
||||||
}
|
|
||||||
} else {
|
|
||||||
String userId = ToGetAUserId(verifyInitiator, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getVerifyInitiatorId());
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setVerifyInitiatorId(userId);
|
|
||||||
} else {
|
} else {
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getVerifyInitiatorId, null);
|
String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getDesignDutyId());
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setDesignDutyId(userId);
|
||||||
|
} else {
|
||||||
|
updateWrapper.set(ProjectLawsInventoryEO::getDesignDutyId, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//责任人角色
|
|
||||||
String verifyDuty = projectLawsInventoryEO.getVerifyDuty();
|
//prehomo确认
|
||||||
if (StringUtils.isNotEmpty(verifyDuty)) {
|
//发起人角色
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getVerifyDutyId())) {
|
String prehomoInitiator = projectLawsInventoryEO.getPrehomoInitiator();
|
||||||
String userId = ToGetAUserId(verifyDuty, projectRelatedPersonnelTempList, studioEngineer);
|
if (StringUtils.isNotEmpty(prehomoInitiator)) {
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())) {
|
||||||
projectLawsInventoryEO.setVerifyDutyId(userId);
|
String userId = ToGetAUserId(prehomoInitiator, projectRelatedPersonnelTempList, studioEngineer);
|
||||||
}
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
} else {
|
projectLawsInventoryEO.setPrehomoInitiatorId(userId);
|
||||||
String userId = ToGetAUserId(verifyDuty, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getVerifyDutyId());
|
}
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setVerifyDutyId(userId);
|
|
||||||
} else {
|
} else {
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getVerifyDutyId, null);
|
String userId = ToGetAUserId(prehomoInitiator, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getPrehomoInitiatorId());
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setPrehomoInitiatorId(userId);
|
||||||
|
} else {
|
||||||
|
updateWrapper.set(ProjectLawsInventoryEO::getPrehomoInitiatorId, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//责任人角色
|
||||||
|
String prehomoDuty = projectLawsInventoryEO.getPrehomoDuty();
|
||||||
|
if (StringUtils.isNotEmpty(prehomoDuty)) {
|
||||||
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getPrehomoDutyId())) {
|
||||||
|
String userId = ToGetAUserId(prehomoDuty, projectRelatedPersonnelTempList, studioEngineer);
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setPrehomoDutyId(userId);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
String userId = ToGetAUserId(prehomoDuty, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getPrehomoDutyId());
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setPrehomoDutyId(userId);
|
||||||
|
} else {
|
||||||
|
updateWrapper.set(ProjectLawsInventoryEO::getPrehomoDutyId, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//验证符合性确认
|
||||||
|
//发起人角色
|
||||||
|
String verifyInitiator = projectLawsInventoryEO.getVerifyInitiator();
|
||||||
|
if (StringUtils.isNotEmpty(verifyInitiator)) {
|
||||||
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getVerifyInitiatorId())) {
|
||||||
|
String userId = ToGetAUserId(verifyInitiator, projectRelatedPersonnelTempList, studioEngineer);
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setVerifyInitiatorId(userId);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
String userId = ToGetAUserId(verifyInitiator, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getVerifyInitiatorId());
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setVerifyInitiatorId(userId);
|
||||||
|
} else {
|
||||||
|
updateWrapper.set(ProjectLawsInventoryEO::getVerifyInitiatorId, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//责任人角色
|
||||||
|
String verifyDuty = projectLawsInventoryEO.getVerifyDuty();
|
||||||
|
if (StringUtils.isNotEmpty(verifyDuty)) {
|
||||||
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getVerifyDutyId())) {
|
||||||
|
String userId = ToGetAUserId(verifyDuty, projectRelatedPersonnelTempList, studioEngineer);
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setVerifyDutyId(userId);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
String userId = ToGetAUserId(verifyDuty, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getVerifyDutyId());
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setVerifyDutyId(userId);
|
||||||
|
} else {
|
||||||
|
updateWrapper.set(ProjectLawsInventoryEO::getVerifyDutyId, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
updateWrapper.eq(ProjectLawsInventoryEO::getId, projectLawsInventoryEO.getId());
|
||||||
|
super.update(projectLawsInventoryEO, updateWrapper);
|
||||||
}
|
}
|
||||||
updateWrapper.eq(ProjectLawsInventoryEO::getId, projectLawsInventoryEO.getId());
|
|
||||||
super.update(projectLawsInventoryEO, updateWrapper);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//this.baseMapper.updateById(projectLawsInventoryEO);
|
//this.baseMapper.updateById(projectLawsInventoryEO);
|
||||||
|
|||||||
+103
-135
@@ -2654,181 +2654,149 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
if ((projectLawsInventoryEO.getDesignFlowStatus().equals(ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|
||||||
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
|
|| projectLawsInventoryEO.getDesignFlowStatus().equals(ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|
||||||
if (StringUtils.isNotEmpty(dutyTerritory)) {
|
|| projectLawsInventoryEO.getDesignFlowStatus().equals(ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue()))
|
||||||
List<ProjectRelatedPersonnel> projectRelatedPersonnelTempList = projectRelatedPersonnels.stream().filter(relatedPersonnel -> {
|
&& (projectLawsInventoryEO.getVerifyFlowStatus().equals(ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|
||||||
boolean flag = false;
|
|| projectLawsInventoryEO.getVerifyFlowStatus().equals(ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|
||||||
for (String duty : dutyTerritory.split(",")) {
|
|| projectLawsInventoryEO.getVerifyFlowStatus().equals(ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue()))) {
|
||||||
if (StringUtils.equals(duty, relatedPersonnel.getDutyTerritory())) {
|
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
|
||||||
flag = true;
|
if (StringUtils.isNotEmpty(dutyTerritory)) {
|
||||||
|
List<ProjectRelatedPersonnel> projectRelatedPersonnelTempList = projectRelatedPersonnels.stream().filter(relatedPersonnel -> {
|
||||||
|
boolean flag = false;
|
||||||
|
for (String duty : dutyTerritory.split(",")) {
|
||||||
|
if (StringUtils.equals(duty, relatedPersonnel.getDutyTerritory())) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
return flag;
|
||||||
return flag;
|
}).collect(Collectors.toList());
|
||||||
}).collect(Collectors.toList());
|
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(projectRelatedPersonnelTempList)) {
|
if (CollectionUtils.isNotEmpty(projectRelatedPersonnelTempList)) {
|
||||||
|
|
||||||
LambdaUpdateWrapper<ProjectLawsInventoryEO> updateWrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<ProjectLawsInventoryEO> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
|
||||||
//法规工程师
|
//法规工程师
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) {
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) {
|
||||||
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer);
|
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer);
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setRegulationOwnerId(userId);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getRegulationOwnerId());
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setRegulationOwnerId(userId);
|
|
||||||
} else {
|
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getRegulationOwnerId, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//认证工程师
|
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId())) {
|
|
||||||
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer);
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setHomologationEngineerId(userId);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getHomologationEngineerId());
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setHomologationEngineerId(userId);
|
|
||||||
} else {
|
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getHomologationEngineerId, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//项目接口人
|
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
|
|
||||||
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnelTempList, studioEngineer);
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setEngineeringInterfacePerson(userId);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getEngineeringInterfacePerson());
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setEngineeringInterfacePerson(userId);
|
|
||||||
} else {
|
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getEngineeringInterfacePerson, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//设计符合性确认
|
|
||||||
//发起人角色
|
|
||||||
String designInitiator = projectLawsInventoryEO.getDesignInitiator();
|
|
||||||
if (StringUtils.isNotEmpty(designInitiator)) {
|
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignInitiatorId())) {
|
|
||||||
String userId = ToGetAUserId(designInitiator, projectRelatedPersonnelTempList, studioEngineer);
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
projectLawsInventoryEO.setDesignInitiatorId(userId);
|
projectLawsInventoryEO.setRegulationOwnerId(userId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String userId = ToGetAUserId(designInitiator, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getDesignInitiatorId());
|
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getRegulationOwnerId());
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
projectLawsInventoryEO.setDesignInitiatorId(userId);
|
projectLawsInventoryEO.setRegulationOwnerId(userId);
|
||||||
} else {
|
} else {
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getDesignInitiatorId, null);
|
updateWrapper.set(ProjectLawsInventoryEO::getRegulationOwnerId, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//责任人角色
|
//认证工程师
|
||||||
String designDuty = projectLawsInventoryEO.getDesignDuty();
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId())) {
|
||||||
if (StringUtils.isNotEmpty(designDuty)) {
|
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer);
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignDutyId())) {
|
|
||||||
String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer);
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
projectLawsInventoryEO.setDesignDutyId(userId);
|
projectLawsInventoryEO.setHomologationEngineerId(userId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getDesignDutyId());
|
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getHomologationEngineerId());
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
projectLawsInventoryEO.setDesignDutyId(userId);
|
projectLawsInventoryEO.setHomologationEngineerId(userId);
|
||||||
} else {
|
} else {
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getDesignDutyId, null);
|
updateWrapper.set(ProjectLawsInventoryEO::getHomologationEngineerId, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
//项目接口人
|
||||||
//prehomo确认
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
|
||||||
//发起人角色
|
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnelTempList, studioEngineer);
|
||||||
String prehomoInitiator = projectLawsInventoryEO.getPrehomoInitiator();
|
|
||||||
if (StringUtils.isNotEmpty(prehomoInitiator)) {
|
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())) {
|
|
||||||
String userId = ToGetAUserId(prehomoInitiator, projectRelatedPersonnelTempList, studioEngineer);
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
projectLawsInventoryEO.setPrehomoInitiatorId(userId);
|
projectLawsInventoryEO.setEngineeringInterfacePerson(userId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String userId = ToGetAUserId(prehomoInitiator, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getPrehomoInitiatorId());
|
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getEngineeringInterfacePerson());
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
projectLawsInventoryEO.setPrehomoInitiatorId(userId);
|
projectLawsInventoryEO.setEngineeringInterfacePerson(userId);
|
||||||
} else {
|
} else {
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getPrehomoInitiatorId, null);
|
updateWrapper.set(ProjectLawsInventoryEO::getEngineeringInterfacePerson, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//责任人角色
|
//设计符合性确认
|
||||||
String prehomoDuty = projectLawsInventoryEO.getPrehomoDuty();
|
//发起人角色
|
||||||
if (StringUtils.isNotEmpty(prehomoDuty)) {
|
String designInitiator = projectLawsInventoryEO.getDesignInitiator();
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getPrehomoDutyId())) {
|
if (StringUtils.isNotEmpty(designInitiator)) {
|
||||||
String userId = ToGetAUserId(prehomoDuty, projectRelatedPersonnelTempList, studioEngineer);
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignInitiatorId())) {
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
String userId = ToGetAUserId(designInitiator, projectRelatedPersonnelTempList, studioEngineer);
|
||||||
projectLawsInventoryEO.setPrehomoDutyId(userId);
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
}
|
projectLawsInventoryEO.setDesignInitiatorId(userId);
|
||||||
} else {
|
}
|
||||||
String userId = ToGetAUserId(prehomoDuty, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getPrehomoDutyId());
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setPrehomoDutyId(userId);
|
|
||||||
} else {
|
} else {
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getPrehomoDutyId, null);
|
String userId = ToGetAUserId(designInitiator, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getDesignInitiatorId());
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setDesignInitiatorId(userId);
|
||||||
|
} else {
|
||||||
|
updateWrapper.set(ProjectLawsInventoryEO::getDesignInitiatorId, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//验证符合性确认
|
//责任人角色
|
||||||
//发起人角色
|
String designDuty = projectLawsInventoryEO.getDesignDuty();
|
||||||
String verifyInitiator = projectLawsInventoryEO.getVerifyInitiator();
|
if (StringUtils.isNotEmpty(designDuty)) {
|
||||||
if (StringUtils.isNotEmpty(verifyInitiator)) {
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignDutyId())) {
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getVerifyInitiatorId())) {
|
String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer);
|
||||||
String userId = ToGetAUserId(verifyInitiator, projectRelatedPersonnelTempList, studioEngineer);
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
projectLawsInventoryEO.setDesignDutyId(userId);
|
||||||
projectLawsInventoryEO.setVerifyInitiatorId(userId);
|
}
|
||||||
}
|
|
||||||
} else {
|
|
||||||
String userId = ToGetAUserId(verifyInitiator, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getVerifyInitiatorId());
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setVerifyInitiatorId(userId);
|
|
||||||
} else {
|
} else {
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getVerifyInitiatorId, null);
|
String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getDesignDutyId());
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setDesignDutyId(userId);
|
||||||
|
} else {
|
||||||
|
updateWrapper.set(ProjectLawsInventoryEO::getDesignDutyId, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//责任人角色
|
//验证符合性确认
|
||||||
String verifyDuty = projectLawsInventoryEO.getVerifyDuty();
|
//发起人角色
|
||||||
if (StringUtils.isNotEmpty(verifyDuty)) {
|
String verifyInitiator = projectLawsInventoryEO.getVerifyInitiator();
|
||||||
if (StringUtils.isEmpty(projectLawsInventoryEO.getVerifyDutyId())) {
|
if (StringUtils.isNotEmpty(verifyInitiator)) {
|
||||||
String userId = ToGetAUserId(verifyDuty, projectRelatedPersonnelTempList, studioEngineer);
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getVerifyInitiatorId())) {
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
String userId = ToGetAUserId(verifyInitiator, projectRelatedPersonnelTempList, studioEngineer);
|
||||||
projectLawsInventoryEO.setVerifyDutyId(userId);
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
}
|
projectLawsInventoryEO.setVerifyInitiatorId(userId);
|
||||||
} else {
|
}
|
||||||
String userId = ToGetAUserId(verifyDuty, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getVerifyDutyId());
|
|
||||||
if (StringUtils.isNotEmpty(userId)) {
|
|
||||||
projectLawsInventoryEO.setVerifyDutyId(userId);
|
|
||||||
} else {
|
} else {
|
||||||
updateWrapper.set(ProjectLawsInventoryEO::getVerifyDutyId, null);
|
String userId = ToGetAUserId(verifyInitiator, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getVerifyInitiatorId());
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setVerifyInitiatorId(userId);
|
||||||
|
} else {
|
||||||
|
updateWrapper.set(ProjectLawsInventoryEO::getVerifyInitiatorId, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//责任人角色
|
||||||
|
String verifyDuty = projectLawsInventoryEO.getVerifyDuty();
|
||||||
|
if (StringUtils.isNotEmpty(verifyDuty)) {
|
||||||
|
if (StringUtils.isEmpty(projectLawsInventoryEO.getVerifyDutyId())) {
|
||||||
|
String userId = ToGetAUserId(verifyDuty, projectRelatedPersonnelTempList, studioEngineer);
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setVerifyDutyId(userId);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
String userId = ToGetAUserId(verifyDuty, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getVerifyDutyId());
|
||||||
|
if (StringUtils.isNotEmpty(userId)) {
|
||||||
|
projectLawsInventoryEO.setVerifyDutyId(userId);
|
||||||
|
} else {
|
||||||
|
updateWrapper.set(ProjectLawsInventoryEO::getVerifyDutyId, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
updateWrapper.eq(ProjectLawsInventoryEO::getId, projectLawsInventoryEO.getId());
|
||||||
|
super.update(projectLawsInventoryEO, updateWrapper);
|
||||||
}
|
}
|
||||||
updateWrapper.eq(ProjectLawsInventoryEO::getId, projectLawsInventoryEO.getId());
|
|
||||||
super.update(projectLawsInventoryEO, updateWrapper);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//this.baseMapper.updateById(projectLawsInventoryEO);
|
//this.baseMapper.updateById(projectLawsInventoryEO);
|
||||||
|
|||||||
Reference in New Issue
Block a user