diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLawsInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLawsInventoryEOServiceImpl.java index bce800d1c..9f6459510 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLawsInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLawsInventoryEOServiceImpl.java @@ -2611,181 +2611,185 @@ public class PlatformProjectLawsInventoryEOServiceImpl extends ServiceImpl projectRelatedPersonnelTempList = projectRelatedPersonnels.stream().filter(relatedPersonnel -> { - boolean flag = false; - for (String duty : dutyTerritory.split(",")) { - if (StringUtils.equals(duty, relatedPersonnel.getDutyTerritory())) { - flag = true; + if ((projectLawsInventoryEO.getDesignFlowStatus().equals(ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue()) + || projectLawsInventoryEO.getDesignFlowStatus().equals(ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())) + && (projectLawsInventoryEO.getVerifyFlowStatus().equals(ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue()) + || projectLawsInventoryEO.getVerifyFlowStatus().equals(ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue()))) { + String dutyTerritory = projectLawsInventoryEO.getDutyTerritory(); + if (StringUtils.isNotEmpty(dutyTerritory)) { + List projectRelatedPersonnelTempList = projectRelatedPersonnels.stream().filter(relatedPersonnel -> { + boolean flag = false; + for (String duty : dutyTerritory.split(",")) { + if (StringUtils.equals(duty, relatedPersonnel.getDutyTerritory())) { + flag = true; + } } - } - return flag; - }).collect(Collectors.toList()); + return flag; + }).collect(Collectors.toList()); - if (CollectionUtils.isNotEmpty(projectRelatedPersonnelTempList)) { + if (CollectionUtils.isNotEmpty(projectRelatedPersonnelTempList)) { - LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); - //法规工程师 - if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) { - 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.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) { + String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer); if (StringUtils.isNotEmpty(userId)) { - projectLawsInventoryEO.setDesignInitiatorId(userId); + projectLawsInventoryEO.setRegulationOwnerId(userId); } } else { - String userId = ToGetAUserId(designInitiator, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getDesignInitiatorId()); + String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getRegulationOwnerId()); if (StringUtils.isNotEmpty(userId)) { - projectLawsInventoryEO.setDesignInitiatorId(userId); + projectLawsInventoryEO.setRegulationOwnerId(userId); } else { - updateWrapper.set(ProjectLawsInventoryEO::getDesignInitiatorId, null); + updateWrapper.set(ProjectLawsInventoryEO::getRegulationOwnerId, null); } } - } - //责任人角色 - String designDuty = projectLawsInventoryEO.getDesignDuty(); - if (StringUtils.isNotEmpty(designDuty)) { - if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignDutyId())) { - String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer); + //认证工程师 + if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId())) { + String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer); if (StringUtils.isNotEmpty(userId)) { - projectLawsInventoryEO.setDesignDutyId(userId); + projectLawsInventoryEO.setHomologationEngineerId(userId); } } else { - String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getDesignDutyId()); + String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getHomologationEngineerId()); if (StringUtils.isNotEmpty(userId)) { - projectLawsInventoryEO.setDesignDutyId(userId); + projectLawsInventoryEO.setHomologationEngineerId(userId); } else { - updateWrapper.set(ProjectLawsInventoryEO::getDesignDutyId, null); + updateWrapper.set(ProjectLawsInventoryEO::getHomologationEngineerId, null); } } - } - - //prehomo确认 - //发起人角色 - String prehomoInitiator = projectLawsInventoryEO.getPrehomoInitiator(); - if (StringUtils.isNotEmpty(prehomoInitiator)) { - if (StringUtils.isEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())) { - String userId = ToGetAUserId(prehomoInitiator, projectRelatedPersonnelTempList, studioEngineer); + //项目接口人 + if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) { + String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnelTempList, studioEngineer); if (StringUtils.isNotEmpty(userId)) { - projectLawsInventoryEO.setPrehomoInitiatorId(userId); + projectLawsInventoryEO.setEngineeringInterfacePerson(userId); } } 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)) { - projectLawsInventoryEO.setPrehomoInitiatorId(userId); + projectLawsInventoryEO.setEngineeringInterfacePerson(userId); } else { - updateWrapper.set(ProjectLawsInventoryEO::getPrehomoInitiatorId, null); + updateWrapper.set(ProjectLawsInventoryEO::getEngineeringInterfacePerson, 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); + //设计符合性确认 + //发起人角色 + String designInitiator = projectLawsInventoryEO.getDesignInitiator(); + if (StringUtils.isNotEmpty(designInitiator)) { + if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignInitiatorId())) { + String userId = ToGetAUserId(designInitiator, projectRelatedPersonnelTempList, studioEngineer); + if (StringUtils.isNotEmpty(userId)) { + projectLawsInventoryEO.setDesignInitiatorId(userId); + } } 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 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); + //责任人角色 + String designDuty = projectLawsInventoryEO.getDesignDuty(); + if (StringUtils.isNotEmpty(designDuty)) { + if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignDutyId())) { + String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer); + if (StringUtils.isNotEmpty(userId)) { + projectLawsInventoryEO.setDesignDutyId(userId); + } } 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)) { - 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); + + //prehomo确认 + //发起人角色 + String prehomoInitiator = projectLawsInventoryEO.getPrehomoInitiator(); + if (StringUtils.isNotEmpty(prehomoInitiator)) { + if (StringUtils.isEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())) { + String userId = ToGetAUserId(prehomoInitiator, projectRelatedPersonnelTempList, studioEngineer); + if (StringUtils.isNotEmpty(userId)) { + projectLawsInventoryEO.setPrehomoInitiatorId(userId); + } } 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); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java index 7cea3f0c8..06d9eb67c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java @@ -2654,181 +2654,149 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl projectRelatedPersonnelTempList = projectRelatedPersonnels.stream().filter(relatedPersonnel -> { - boolean flag = false; - for (String duty : dutyTerritory.split(",")) { - if (StringUtils.equals(duty, relatedPersonnel.getDutyTerritory())) { - flag = true; + if ((projectLawsInventoryEO.getDesignFlowStatus().equals(ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue()) + || projectLawsInventoryEO.getDesignFlowStatus().equals(ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue()) + || projectLawsInventoryEO.getDesignFlowStatus().equals(ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())) + && (projectLawsInventoryEO.getVerifyFlowStatus().equals(ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue()) + || projectLawsInventoryEO.getVerifyFlowStatus().equals(ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue()) + || projectLawsInventoryEO.getVerifyFlowStatus().equals(ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue()))) { + String dutyTerritory = projectLawsInventoryEO.getDutyTerritory(); + if (StringUtils.isNotEmpty(dutyTerritory)) { + List projectRelatedPersonnelTempList = projectRelatedPersonnels.stream().filter(relatedPersonnel -> { + boolean flag = false; + for (String duty : dutyTerritory.split(",")) { + if (StringUtils.equals(duty, relatedPersonnel.getDutyTerritory())) { + flag = true; + } } - } - return flag; - }).collect(Collectors.toList()); + return flag; + }).collect(Collectors.toList()); - if (CollectionUtils.isNotEmpty(projectRelatedPersonnelTempList)) { + if (CollectionUtils.isNotEmpty(projectRelatedPersonnelTempList)) { - LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); - //法规工程师 - if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) { - 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.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) { + String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer); if (StringUtils.isNotEmpty(userId)) { - projectLawsInventoryEO.setDesignInitiatorId(userId); + projectLawsInventoryEO.setRegulationOwnerId(userId); } } else { - String userId = ToGetAUserId(designInitiator, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getDesignInitiatorId()); + String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getRegulationOwnerId()); if (StringUtils.isNotEmpty(userId)) { - projectLawsInventoryEO.setDesignInitiatorId(userId); + projectLawsInventoryEO.setRegulationOwnerId(userId); } else { - updateWrapper.set(ProjectLawsInventoryEO::getDesignInitiatorId, null); + updateWrapper.set(ProjectLawsInventoryEO::getRegulationOwnerId, null); } } - } - //责任人角色 - String designDuty = projectLawsInventoryEO.getDesignDuty(); - if (StringUtils.isNotEmpty(designDuty)) { - if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignDutyId())) { - String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer); + //认证工程师 + if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId())) { + String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer); if (StringUtils.isNotEmpty(userId)) { - projectLawsInventoryEO.setDesignDutyId(userId); + projectLawsInventoryEO.setHomologationEngineerId(userId); } } else { - String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getDesignDutyId()); + String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnelTempList, studioEngineer, projectLawsInventoryEO.getHomologationEngineerId()); if (StringUtils.isNotEmpty(userId)) { - projectLawsInventoryEO.setDesignDutyId(userId); + projectLawsInventoryEO.setHomologationEngineerId(userId); } else { - updateWrapper.set(ProjectLawsInventoryEO::getDesignDutyId, null); + updateWrapper.set(ProjectLawsInventoryEO::getHomologationEngineerId, null); } } - } - - //prehomo确认 - //发起人角色 - String prehomoInitiator = projectLawsInventoryEO.getPrehomoInitiator(); - if (StringUtils.isNotEmpty(prehomoInitiator)) { - if (StringUtils.isEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())) { - String userId = ToGetAUserId(prehomoInitiator, projectRelatedPersonnelTempList, studioEngineer); + //项目接口人 + if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) { + String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnelTempList, studioEngineer); if (StringUtils.isNotEmpty(userId)) { - projectLawsInventoryEO.setPrehomoInitiatorId(userId); + projectLawsInventoryEO.setEngineeringInterfacePerson(userId); } } 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)) { - projectLawsInventoryEO.setPrehomoInitiatorId(userId); + projectLawsInventoryEO.setEngineeringInterfacePerson(userId); } else { - updateWrapper.set(ProjectLawsInventoryEO::getPrehomoInitiatorId, null); + updateWrapper.set(ProjectLawsInventoryEO::getEngineeringInterfacePerson, 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); + //设计符合性确认 + //发起人角色 + String designInitiator = projectLawsInventoryEO.getDesignInitiator(); + if (StringUtils.isNotEmpty(designInitiator)) { + if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignInitiatorId())) { + String userId = ToGetAUserId(designInitiator, projectRelatedPersonnelTempList, studioEngineer); + if (StringUtils.isNotEmpty(userId)) { + projectLawsInventoryEO.setDesignInitiatorId(userId); + } } 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 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); + //责任人角色 + String designDuty = projectLawsInventoryEO.getDesignDuty(); + if (StringUtils.isNotEmpty(designDuty)) { + if (StringUtils.isEmpty(projectLawsInventoryEO.getDesignDutyId())) { + String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList, studioEngineer); + if (StringUtils.isNotEmpty(userId)) { + projectLawsInventoryEO.setDesignDutyId(userId); + } } 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)) { - 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); + //验证符合性确认 + //发起人角色 + 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 { - 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);