添加studio

This commit is contained in:
zhn
2022-06-02 10:51:33 +08:00
parent 83056ec5e5
commit 683bf48101
2 changed files with 28 additions and 16 deletions
@@ -1358,7 +1358,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
if (StringUtils.isNotBlank(infoDiff.get("designInitiator"))) {
List<String> list = Arrays.asList(infoDiff.get("designInitiator").split(","));
String infoDiffOld = list.get(0);
String infoDiffNew = list.get(1);
String infoDiffNew = "list.get(1)";
if (StringUtils.isBlank(contentLog)) {
contentInfo += "'"+DummyInventoryBaseFieldEnum.DESIGN_INITIATOR.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
@@ -1370,7 +1370,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
if (StringUtils.isNotBlank(infoDiff.get("designDuty"))) {
List<String> list = Arrays.asList(infoDiff.get("designDuty").split(","));
String infoDiffOld = list.get(0);
String infoDiffNew = list.get(1);
String infoDiffNew = "list.get(1)";
if (StringUtils.isBlank(contentLog)) {
contentInfo += "'"+DummyInventoryBaseFieldEnum.DESIGN_DUTY.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
@@ -1406,7 +1406,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
if (StringUtils.isNotBlank(infoDiff.get("prehomoInitiator"))) {
List<String> list = Arrays.asList(infoDiff.get("prehomoInitiator").split(","));
String infoDiffOld = list.get(0);
String infoDiffNew = list.get(1);
String infoDiffNew = "list.get(1)";
if (StringUtils.isBlank(contentLog)) {
contentInfo += "'"+DummyInventoryBaseFieldEnum.PREHOMO_INITIATOR.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
@@ -1418,7 +1418,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
if (StringUtils.isNotBlank(infoDiff.get("prehomoDuty"))) {
List<String> list = Arrays.asList(infoDiff.get("prehomoDuty").split(","));
String infoDiffOld = list.get(0);
String infoDiffNew = list.get(1);
String infoDiffNew = "list.get(1)";
if (StringUtils.isBlank(contentLog)) {
contentInfo += "'"+DummyInventoryBaseFieldEnum.PREHOMO_DUTY.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
@@ -1454,7 +1454,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
if (StringUtils.isNotBlank(infoDiff.get("verifyInitiator"))) {
List<String> list = Arrays.asList(infoDiff.get("verifyInitiator").split(","));
String infoDiffOld = list.get(0);
String infoDiffNew = list.get(1);
String infoDiffNew = "list.get(1)";
if (StringUtils.isBlank(contentLog)) {
contentInfo += "'"+DummyInventoryBaseFieldEnum.VERIFY_INITIATOR.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
@@ -1466,7 +1466,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
if (StringUtils.isNotBlank(infoDiff.get("verifyDuty"))) {
List<String> list = Arrays.asList(infoDiff.get("verifyDuty").split(","));
String infoDiffOld = list.get(0);
String infoDiffNew = list.get(1);
String infoDiffNew = "list.get(1)";
if (StringUtils.isBlank(contentLog)) {
contentInfo += "'"+DummyInventoryBaseFieldEnum.VERIFY_DUTY.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
@@ -1231,13 +1231,21 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
queryWrapper.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectLibraryId);
//查询当前项目下清单状态为 未发起拒绝状态的法规清单
List<ProjectLawsInventoryEO> projectLawsInventoryEOS = this.baseMapper.selectList(queryWrapper);
//项目库信息(获取studio)
LambdaQueryWrapper<ProjectLibraryBase> wrapper = new LambdaQueryWrapper<>();
wrapper.in(ProjectLibraryBase::getId,projectLibraryId);
List<ProjectLibraryBase> projectLibraryBases = projectLibraryBaseMapper.selectList(wrapper);
String studioEngineer = "";
if(projectLibraryBases.size() != 0){
studioEngineer = projectLibraryBases.get(0).getStudioEngineer();
}
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOS) {
for (ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnels) {
if(StringUtils.equals(projectRelatedPersonnel.getDutyTerritory(),projectLawsInventoryEO.getDutyTerritory())){
//法规工程师
if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) {
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnel);
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnel,studioEngineer);
if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setRegulationOwnerId(userId);
}
@@ -1245,7 +1253,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//认证工程师
if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId())) {
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnel);
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnel,studioEngineer);
if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setHomologationEngineerId(userId);
}
@@ -1253,7 +1261,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//项目接口人
if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnel);
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnel,studioEngineer);
if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setEngineeringInterfacePerson(userId);
}
@@ -1264,7 +1272,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(StringUtils.isEmpty(projectLawsInventoryEO.getDesignInitiatorId())){
String designInitiator = projectLawsInventoryEO.getDesignInitiator();
if(StringUtils.isNotEmpty(designInitiator)){
String userId = ToGetAUserId(designInitiator, projectRelatedPersonnel);
String userId = ToGetAUserId(designInitiator, projectRelatedPersonnel,studioEngineer);
if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setDesignInitiatorId(userId);
}
@@ -1274,7 +1282,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(StringUtils.isEmpty(projectLawsInventoryEO.getDesignDutyId())){
String designDuty = projectLawsInventoryEO.getDesignDuty();
if(StringUtils.isNotEmpty(designDuty)){
String userId = ToGetAUserId(designDuty, projectRelatedPersonnel);
String userId = ToGetAUserId(designDuty, projectRelatedPersonnel,studioEngineer);
if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setDesignDutyId(userId);
}
@@ -1286,7 +1294,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(StringUtils.isEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())){
String prehomoInitiator = projectLawsInventoryEO.getPrehomoInitiator();
if(StringUtils.isNotEmpty(prehomoInitiator)){
String userId = ToGetAUserId(prehomoInitiator, projectRelatedPersonnel);
String userId = ToGetAUserId(prehomoInitiator, projectRelatedPersonnel,studioEngineer);
if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setPrehomoInitiatorId(userId);
}
@@ -1296,7 +1304,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//责任人角色
String prehomoDuty = projectLawsInventoryEO.getPrehomoDuty();
if(StringUtils.isNotEmpty(prehomoDuty)){
String userId = ToGetAUserId(prehomoDuty, projectRelatedPersonnel);
String userId = ToGetAUserId(prehomoDuty, projectRelatedPersonnel,studioEngineer);
if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setPrehomoDutyId(userId);
}
@@ -1308,7 +1316,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//发起人角色
String verifyInitiator = projectLawsInventoryEO.getVerifyInitiator();
if(StringUtils.isNotEmpty(verifyInitiator)){
String userId = ToGetAUserId(verifyInitiator, projectRelatedPersonnel);
String userId = ToGetAUserId(verifyInitiator, projectRelatedPersonnel,studioEngineer);
if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setVerifyInitiatorId(userId);
}
@@ -1318,7 +1326,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//责任人角色
String verifyDuty = projectLawsInventoryEO.getVerifyDuty();
if(StringUtils.isNotEmpty(verifyDuty)){
String userId = ToGetAUserId(verifyDuty, projectRelatedPersonnel);
String userId = ToGetAUserId(verifyDuty, projectRelatedPersonnel,studioEngineer);
if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setVerifyDutyId(userId);
}
@@ -1352,7 +1360,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
* @param projectRelatedPersonnel
* @return
*/
public String ToGetAUserId(String roleCode,ProjectRelatedPersonnel projectRelatedPersonnel){
public String ToGetAUserId(String roleCode,ProjectRelatedPersonnel projectRelatedPersonnel,String studioEngineer){
String resultUserId = "";
//法规工程师
if(StringUtils.equals(roleCode,ProjectRoleEnum.REGULATI_ENGINEER.getValue())){
@@ -1384,6 +1392,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
}
}
//studio
if(StringUtils.equals(roleCode,ProjectRoleEnum.STUDIO_ENGINEER.getValue())){
resultUserId = studioEngineer;
}
return resultUserId;
}