Merge remote-tracking branch 'origin/fix_bug_first_stage' into fix_bug_first_stage

This commit is contained in:
wangzhijiang
2022-07-04 15:06:31 +08:00
3 changed files with 197 additions and 113 deletions
@@ -10,3 +10,11 @@ ADD COLUMN `prehomo_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_
ADD COLUMN `design_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设计备注' AFTER `prehomo_remark`; ADD COLUMN `design_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设计备注' AFTER `prehomo_remark`;
-- 2022年7月2日部署到正式环境 -- 2022年7月2日部署到正式环境
-- 加大备注的长度
ALTER TABLE `buss_document_library`
MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述' AFTER `replaced_standard`;
UPDATE `laws_weilai`.`onl_cgform_field` SET `id`='e4fe526794af4477321227f69b764b0d', `cgform_head_id`='48308196e7b04761b533dc31bc899707', `db_field_name`='description', `db_field_en_name`='Description', `db_field_txt`='描述', `order_num`='9', `db_field_name_old`=NULL, `db_is_key`='0', `db_is_null`='1', `db_type`='string', `db_length`='1000', `db_point_length`='0', `db_default_val`='', `dict_field`='', `dict_table`='', `dict_text`='', `field_show_type`='8', `field_href`='', `field_length`='120', `field_valid_type`=NULL, `field_must_input`='0', `field_extend_json`='', `field_default_value`='', `is_query`='0', `is_show_form`='1', `is_show_list`='0', `is_read_only`='0', `query_mode`='single', `main_table`='', `main_field`='', `update_by`='admin', `update_time`='2022-06-06 16:05:28', `create_time`='2022-01-21 14:41:40', `create_by`='admin', `converter`='', `query_def_val`='', `query_dict_text`='', `query_dict_field`='', `query_dict_table`='', `query_show_type`='text', `query_config_flag`='0', `query_valid_type`=NULL, `query_must_input`=NULL, `sort_flag`='0', `show_area`='1499657602378825729', `is_show_laws_list`='0', `is_show_search`='0', `is_delete`='0', `is_model`='1', `dict_id`=NULL WHERE (`id`='e4fe526794af4477321227f69b764b0d');
-- 2022年7月4日部署到正式环境
@@ -85,7 +85,7 @@ public class FeishuServiceImpl implements IFeishuService {
// 第二行 // 第二行
JSONObject contentTwo = new JSONObject(); JSONObject contentTwo = new JSONObject();
contentTwo.put("tag", "a"); contentTwo.put("tag", "a");
contentTwo.put("text", "跳转链接"); contentTwo.put("text", "View");
contentTwo.put("href", backUrl); contentTwo.put("href", backUrl);
List<JSONObject> contentList = new ArrayList<>(); List<JSONObject> contentList = new ArrayList<>();
contentList.add(contentOne); contentList.add(contentOne);
@@ -1694,31 +1694,103 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
} }
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOS) { for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOS) {
for (ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnels) { //法规清单的责任领域
if(StringUtils.equals(projectRelatedPersonnel.getDutyTerritory(),projectLawsInventoryEO.getDutyTerritory())){ String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
if(StringUtils.isNotBlank(dutyTerritory)){
List<ProjectRelatedPersonnel> projectRelatedPersonnelList = projectRelatedPersonnels.stream()
.filter(e -> dutyTerritory.contains(e.getDutyTerritory())).collect(Collectors.toList());
List<String> lawEngineerList = projectRelatedPersonnelList.stream().map(ProjectRelatedPersonnel::getLawEngineer).distinct().collect(Collectors.toList()).stream().filter(e->StringUtils.isNotBlank(e)).collect(Collectors.toList());
List<String> engineeringInterfacePersonList = projectRelatedPersonnelList.stream().map(ProjectRelatedPersonnel::getEngineeringInterfacePerson).distinct().collect(Collectors.toList()).stream().filter(e->StringUtils.isNotBlank(e)).collect(Collectors.toList());
List<String> certificationEngineerList = projectRelatedPersonnelList.stream().map(ProjectRelatedPersonnel::getCertificationEngineer).distinct().collect(Collectors.toList()).stream().filter(e->StringUtils.isNotBlank(e)).collect(Collectors.toList());
List<String> lawEngineerListTemp = new ArrayList<>();
List<String> engineeringInterfacePersonListTemp = new ArrayList<>();
List<String> certificationEngineerListTemp = new ArrayList<>();
if(lawEngineerList.size() != 0){
for (String s : lawEngineerList) {
lawEngineerListTemp.addAll(Arrays.asList(s.split(",")));
}
lawEngineerListTemp = lawEngineerListTemp.stream().distinct().collect(Collectors.toList());
}
if(engineeringInterfacePersonList.size() != 0){
for (String s : engineeringInterfacePersonList) {
engineeringInterfacePersonListTemp.addAll(Arrays.asList(s.split(",")));
}
engineeringInterfacePersonListTemp = engineeringInterfacePersonListTemp.stream().distinct().collect(Collectors.toList());
}
if(certificationEngineerList.size() != 0){
for (String s : certificationEngineerList) {
certificationEngineerListTemp.addAll(Arrays.asList(s.split(",")));
}
certificationEngineerListTemp = certificationEngineerListTemp.stream().distinct().collect(Collectors.toList());
}
//法规工程师 //法规工程师
if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) { if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && lawEngineerListTemp.size() == 1) {
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnel,studioEngineer); List<String> finalLawEngineerList = lawEngineerListTemp;
List<ProjectRelatedPersonnel> collect = projectRelatedPersonnels.stream()
.filter(e -> finalLawEngineerList.contains(e.getLawEngineer())).collect(Collectors.toList());
if(collect.size() != 0){
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), collect.get(0),studioEngineer);
if(StringUtils.isNotEmpty(userId)){ if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setRegulationOwnerId(userId); projectLawsInventoryEO.setRegulationOwnerId(userId);
} }
} }
}
//认证工程师 //认证工程师
if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId())) { if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && certificationEngineerListTemp.size() == 1) {
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnel,studioEngineer); List<String> finalCertificationEngineerList = certificationEngineerListTemp;
List<ProjectRelatedPersonnel> collect = projectRelatedPersonnels.stream()
.filter(e -> finalCertificationEngineerList.contains(e.getCertificationEngineer())).collect(Collectors.toList());
if(collect.size() != 0){
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), collect.get(0),studioEngineer);
if(StringUtils.isNotEmpty(userId)){ if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setHomologationEngineerId(userId); projectLawsInventoryEO.setHomologationEngineerId(userId);
} }
} }
}
//项目接口人 //项目接口人
if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) { if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson()) && engineeringInterfacePersonListTemp.size() == 1) {
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnel,studioEngineer); List<String> finalEngineeringInterfacePersonList = engineeringInterfacePersonListTemp;
List<ProjectRelatedPersonnel> collect = projectRelatedPersonnels.stream()
.filter(e -> finalEngineeringInterfacePersonList.contains(e.getEngineeringInterfacePerson())).collect(Collectors.toList());
if(collect.size() != 0){
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), collect.get(0),studioEngineer);
if(StringUtils.isNotEmpty(userId)){ if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setEngineeringInterfacePerson(userId); projectLawsInventoryEO.setEngineeringInterfacePerson(userId);
} }
} }
}
}
for (ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnels) {
if(StringUtils.equals(projectRelatedPersonnel.getDutyTerritory(),projectLawsInventoryEO.getDutyTerritory())){
// //法规工程师
// if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) {
// String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnel,studioEngineer);
// if(StringUtils.isNotEmpty(userId)){
// projectLawsInventoryEO.setRegulationOwnerId(userId);
// }
// }
//
// //认证工程师
// if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId())) {
// String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnel,studioEngineer);
// if(StringUtils.isNotEmpty(userId)){
// projectLawsInventoryEO.setHomologationEngineerId(userId);
// }
// }
//
// //项目接口人
// if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
// String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnel,studioEngineer);
// if(StringUtils.isNotEmpty(userId)){
// projectLawsInventoryEO.setEngineeringInterfacePerson(userId);
// }
// }
//设计符合性确认 //设计符合性确认
//发起人角色 //发起人角色
@@ -2171,7 +2243,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
for (String id : projectLawsInventoryEO.getIds().split(",")) { for (String id : projectLawsInventoryEO.getIds().split(",")) {
ProjectLawsInventoryEO info = infoList.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0); List<ProjectLawsInventoryEO> collect = infoList.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList());
if(collect.size() != 0){
ProjectLawsInventoryEO info = collect.get(0);
ProjectLawsInventoryEO infoCopy = infoListCopy.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0); ProjectLawsInventoryEO infoCopy = infoListCopy.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0);
StringBuilder contentLogBuilder = new StringBuilder(); StringBuilder contentLogBuilder = new StringBuilder();
StringBuilder enContentLogBuilder = new StringBuilder(); StringBuilder enContentLogBuilder = new StringBuilder();
@@ -2287,6 +2361,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
enContentLog += enContentLogBuilder ; enContentLog += enContentLogBuilder ;
} }
} }
}
String contentIndexStart = contentLog.substring(0,contentLog.indexOf("“")); String contentIndexStart = contentLog.substring(0,contentLog.indexOf("“"));
String content= contentLog.substring(contentIndexStart.length()+1,contentLog.length()); String content= contentLog.substring(contentIndexStart.length()+1,contentLog.length());