diff --git a/jero-boot/db/蔚来标准sql/first_bug_fix_record.sql b/jero-boot/db/蔚来标准sql/first_bug_fix_record.sql index 598e071d8..910126edd 100644 --- a/jero-boot/db/蔚来标准sql/first_bug_fix_record.sql +++ b/jero-boot/db/蔚来标准sql/first_bug_fix_record.sql @@ -54,6 +54,18 @@ ADD COLUMN `initiator` varchar(255) NULL COMMENT '发起人' AFTER `document_id` ALTER TABLE `project_laws_inventory_log` MODIFY COLUMN `log_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'log内容' AFTER `project_library_id`; --- 2022-08-04 修改字段类型 生产环境已同步 +-- 2022-08-04 修改字段长度 生产环境已同步 ALTER TABLE `dummy_inventory_info` MODIFY COLUMN `subtitle` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '子标题' AFTER `wvta_id`; + +-- 2022-08-22 修改字段长度 生产环境未同步 +ALTER TABLE `project_laws_inventory` +MODIFY COLUMN `subtitle` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '子标题' AFTER `title`; + +-- 2022-08-22 修改字段长度 生产环境未同步 +ALTER TABLE `dummy_inventory_info` +MODIFY COLUMN `serial_number` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号' AFTER `sys_org_code`; + +-- 2022-08-22 修改字段长度 生产环境未同步 +ALTER TABLE `project_laws_inventory` +MODIFY COLUMN `serial_number` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号' AFTER `project_library_id`; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java index 9927927d7..e1e298f70 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java @@ -90,7 +90,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper.in(DummyInventoryInfoEO::getDummyInventoryBaseId,projectLawsInventoryEO.getDummyInventoryBaseId()); List dummyInventoryInfoEOList = dummyInventoryInfoEOService.list(lambdaQueryWrapper); + List dummyInventoryInfoEOListNew = new ArrayList<>(); if(dummyInventoryInfoEOList.size() != 0){ List projectLawsInventoryEOS = new ArrayList<>(); if(projectLawsInventoryEOList.size() ==0){ - //此时法规清单中没有数据,直接将维护清单中的数据添加即可 + //责任领域如果有多个,则需要拆分成多条 for (DummyInventoryInfoEO dummyInventoryInfoEO : dummyInventoryInfoEOList) { + String dutyTerritory = dummyInventoryInfoEO.getDutyTerritory(); + if(StringUtils.isNotBlank(dutyTerritory)){ + for (String dutyTerritoryOne : dutyTerritory.split(",")) { + DummyInventoryInfoEO dummyInventoryInfoEONew = new DummyInventoryInfoEO(); + BeanUtils.copyProperties(dummyInventoryInfoEO,dummyInventoryInfoEONew); + dummyInventoryInfoEONew.setDutyTerritory(dutyTerritoryOne); + dummyInventoryInfoEOListNew.add(dummyInventoryInfoEONew); + } + }else{ + dummyInventoryInfoEOListNew.add(dummyInventoryInfoEO); + } + } + + //此时法规清单中没有数据,直接将维护清单中的数据添加即可 + for (DummyInventoryInfoEO dummyInventoryInfoEO : dummyInventoryInfoEOListNew) { ProjectLawsInventoryEO projectLawsInventoryEOTemp = new ProjectLawsInventoryEO(); projectLawsInventoryEOTemp.setProjectLibraryId(projectLawsInventoryEO.getProjectLibraryId()); BeanUtils.copyProperties(dummyInventoryInfoEO,projectLawsInventoryEOTemp); @@ -253,7 +269,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl projectLawsInventoryEOListTemp = new ArrayList<>(); - for (DummyInventoryInfoEO dummyInventoryInfoEO : dummyInventoryInfoEOList) { + for (DummyInventoryInfoEO dummyInventoryInfoEO : dummyInventoryInfoEOListNew) { List collect = projectLawsInventoryEOList.stream() .filter(e -> e.getSerialNumber().equals(dummyInventoryInfoEO.getSerialNumber())).collect(Collectors.toList()); if(collect.size() != 0){ @@ -426,7 +442,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl infoDiffEn = ListDiff.compareObject(dataListCopy.get(0),projectLawsInventoryEOCopy); //设置更新log - setContentLog(infoDiff,contentLog,infoDiffEn,enContentLog,projectLawsInventoryEO.getProjectLibraryId()); +// setContentLog(infoDiff,contentLog,infoDiffEn,enContentLog,projectLawsInventoryEO.getProjectLibraryId()); //验证用户是否是该法规上级 项目库的studio, 如果是,则同步更新流程 @@ -1737,6 +1753,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl projectLawsInventoryIdList = Arrays.asList(ids.split(",")); + queryWrapper.lambda().in(ProjectLawsInventoryEO::getId,projectLawsInventoryIdList); + } + queryWrapper.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectLibraryId); //查询当前项目下,清单状态为 未发起、拒绝状态的法规清单。 List projectLawsInventoryEOS = this.baseMapper.selectList(queryWrapper); @@ -1751,7 +1774,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl projectRelatedPersonnelList = new ArrayList<>(); for (String s : dutyTerritory.split(",")) { @@ -1828,102 +1851,185 @@ 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; + } + } + return flag; + }).collect(Collectors.toList()); + + if(CollectionUtils.isNotEmpty(projectRelatedPersonnelTempList)){ + + 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); + } + } //设计符合性确认 //发起人角色 - if(StringUtils.isEmpty(projectLawsInventoryEO.getDesignInitiatorId())){ - String designInitiator = projectLawsInventoryEO.getDesignInitiator(); - if(StringUtils.isNotEmpty(designInitiator)){ - String userId = ToGetAUserId(designInitiator, projectRelatedPersonnel,studioEngineer); + 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); } - } - } - //责任人角色 - if(StringUtils.isEmpty(projectLawsInventoryEO.getDesignDutyId())){ - String designDuty = projectLawsInventoryEO.getDesignDuty(); - if(StringUtils.isNotEmpty(designDuty)){ - String userId = ToGetAUserId(designDuty, projectRelatedPersonnel,studioEngineer); + }else { + String userId = ToGetAUserId(designInitiator, projectRelatedPersonnelTempList,studioEngineer,projectLawsInventoryEO.getDesignInitiatorId()); if(StringUtils.isNotEmpty(userId)){ - projectLawsInventoryEO.setDesignDutyId(userId); + projectLawsInventoryEO.setDesignInitiatorId(userId); + }else { + updateWrapper.set(ProjectLawsInventoryEO::getDesignInitiatorId,null); } } } - //prehomo确认 - //发起人角色 - if(StringUtils.isEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())){ - String prehomoInitiator = projectLawsInventoryEO.getPrehomoInitiator(); - if(StringUtils.isNotEmpty(prehomoInitiator)){ - String userId = ToGetAUserId(prehomoInitiator, projectRelatedPersonnel,studioEngineer); + //责任人角色 + String designDuty = projectLawsInventoryEO.getDesignDuty(); + if(StringUtils.isNotEmpty(designDuty)){ + if(StringUtils.isEmpty(projectLawsInventoryEO.getDesignDutyId())){ + String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList,studioEngineer); if(StringUtils.isNotEmpty(userId)){ - projectLawsInventoryEO.setPrehomoInitiatorId(userId); + projectLawsInventoryEO.setDesignDutyId(userId); + } + }else { + String userId = ToGetAUserId(designDuty, projectRelatedPersonnelTempList,studioEngineer,projectLawsInventoryEO.getDesignDutyId()); + if(StringUtils.isNotEmpty(userId)){ + projectLawsInventoryEO.setDesignDutyId(userId); + }else { + updateWrapper.set(ProjectLawsInventoryEO::getDesignDutyId,null); } } } - if(StringUtils.isEmpty(projectLawsInventoryEO.getPrehomoDutyId())){ - //责任人角色 - String prehomoDuty = projectLawsInventoryEO.getPrehomoDuty(); - if(StringUtils.isNotEmpty(prehomoDuty)){ - String userId = ToGetAUserId(prehomoDuty, projectRelatedPersonnel,studioEngineer); + + + //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 { + 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); + } } } //验证符合性确认 - if(StringUtils.isEmpty(projectLawsInventoryEO.getVerifyInitiatorId())){ - //发起人角色 - String verifyInitiator = projectLawsInventoryEO.getVerifyInitiator(); - if(StringUtils.isNotEmpty(verifyInitiator)){ - String userId = ToGetAUserId(verifyInitiator, projectRelatedPersonnel,studioEngineer); + //发起人角色 + 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); } - } - } - if(StringUtils.isEmpty(projectLawsInventoryEO.getVerifyDutyId())){ - //责任人角色 - String verifyDuty = projectLawsInventoryEO.getVerifyDuty(); - if(StringUtils.isNotEmpty(verifyDuty)){ - String userId = ToGetAUserId(verifyDuty, projectRelatedPersonnel,studioEngineer); + }else { + String userId = ToGetAUserId(verifyInitiator, projectRelatedPersonnelTempList,studioEngineer,projectLawsInventoryEO.getVerifyInitiatorId()); if(StringUtils.isNotEmpty(userId)){ - projectLawsInventoryEO.setVerifyDutyId(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); } } - this.baseMapper.updateById(projectLawsInventoryEO); + //this.baseMapper.updateById(projectLawsInventoryEO); } }else { throw new JeroBootException("当前项目中,未找到相关维护人员信息"); @@ -1946,14 +2052,20 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl projectRelatedPersonnelList,String studioEngineer){ String resultUserId = ""; //法规工程师 if(StringUtils.equals(roleCode,ProjectRoleEnum.REGULATI_ENGINEER.getValue())){ - String lawEngineer = projectRelatedPersonnel.getLawEngineer(); + String lawEngineer = projectRelatedPersonnelList.stream().filter(relatedPersonnel -> { + boolean flag = false; + if(StringUtils.isNotEmpty(relatedPersonnel.getLawEngineer())){ + flag = true; + } + return flag; + }).map(ProjectRelatedPersonnel::getLawEngineer).distinct().collect(Collectors.joining(",")); if(StringUtils.isNotEmpty(lawEngineer)){ String[] lawEngineerArr = lawEngineer.split(","); if(lawEngineerArr.length == 1){ @@ -1963,7 +2075,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl { + boolean flag = false; + if(StringUtils.isNotEmpty(relatedPersonnel.getLawEngineer())){ + flag = true; + } + return flag; + }).map(ProjectRelatedPersonnel::getCertificationEngineer).distinct().collect(Collectors.joining(",")); if(StringUtils.isNotEmpty(certificationEngineer)){ String[] certificationEngineerArr = certificationEngineer.split(","); if(certificationEngineerArr.length == 1){ @@ -1973,7 +2091,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl { + boolean flag = false; + if(StringUtils.isNotEmpty(relatedPersonnel.getLawEngineer())){ + flag = true; + } + return flag; + }).map(ProjectRelatedPersonnel::getEngineeringInterfacePerson).distinct().collect(Collectors.joining(",")); if(StringUtils.isNotEmpty(engineeringInterfacePerson)){ String[] engineeringInterfacePersonArr = engineeringInterfacePerson.split(","); if(engineeringInterfacePersonArr.length == 1){ @@ -2485,14 +2609,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImple.getSerialNumber()).collect(Collectors.joining(",")); - String contentLog = username+"复制了“"+serialNumber+"”"; - String enContentLog = username+" copied “"+serialNumber+"”"; - projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId,CutEnum.CN.getValue()); - projectLawsInventoryLogEOService.updateLog(enContentLog, projectLibraryId,CutEnum.EN.getValue()); +// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); +// String username = sysUser.getUsername(); +// String projectLibraryId = projectLawsInventoryEOList.get(0).getProjectLibraryId(); +// String serialNumber = projectLawsInventoryEOList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(",")); +// String contentLog = username+"复制了“"+serialNumber+"”"; +// String enContentLog = username+" copied “"+serialNumber+"”"; +// projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId,CutEnum.CN.getValue()); +// projectLawsInventoryLogEOService.updateLog(enContentLog, projectLibraryId,CutEnum.EN.getValue()); this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOList); } @@ -2557,10 +2681,53 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl { + //更新三个符合性流程中的处理人。 + this.updateFlowInfo(projectLawsInventory); + }); // for (ProjectLawsInventoryEO lawsInventoryEO : projectLawsInventoryEOList) { // LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); // updateWrapper.in(ProjectLawsInventoryEO::getId,lawsInventoryEO.getId()); @@ -2716,15 +2883,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl 100){ + if(subtitle.length() > 300){ String message = ""; if(CutEnum.CN.getValue().equals(projectLawsInventoryEOTemp.getCut())){ - message = errorMsg + "子标题不能超过100个字符, "; + message = errorMsg + "子标题不能超过300个字符, "; }else{ - message = errorMsg + " Subheadings cannot be checked more than 100 characters, "; + message = errorMsg + " Subheadings cannot be checked more than 300 characters, "; } msgList.add(message); } @@ -7062,4 +7229,86 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl projectRelatedPersonnelList,String studioEngineer,String engineersId){ + String resultUserId = ""; + //法规工程师 + if(StringUtils.equals(roleCode,ProjectRoleEnum.REGULATI_ENGINEER.getValue())){ + String lawEngineer = projectRelatedPersonnelList.stream().filter(relatedPersonnel -> { + boolean flag = false; + if(StringUtils.isNotEmpty(relatedPersonnel.getLawEngineer())){ + flag = true; + } + return flag; + }).map(ProjectRelatedPersonnel::getLawEngineer).distinct().collect(Collectors.joining(",")); + if(StringUtils.isNotEmpty(lawEngineer)){ + if(!StringUtils.contains(lawEngineer,engineersId)){ + String[] lawEngineerArr = lawEngineer.split(","); + if(lawEngineerArr.length == 1){ + resultUserId = lawEngineer; + } + }else { + resultUserId = engineersId; + } + } + } + //认证工程师 + if(StringUtils.equals(roleCode,ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue())){ + String certificationEngineer = projectRelatedPersonnelList.stream().filter(relatedPersonnel -> { + boolean flag = false; + if(StringUtils.isNotEmpty(relatedPersonnel.getLawEngineer())){ + flag = true; + } + return flag; + }).map(ProjectRelatedPersonnel::getCertificationEngineer).distinct().collect(Collectors.joining(",")); + if(StringUtils.isNotEmpty(certificationEngineer)){ + if(!StringUtils.contains(certificationEngineer,engineersId)){ + String[] certificationEngineerArr = certificationEngineer.split(","); + if(certificationEngineerArr.length == 1){ + resultUserId = certificationEngineer; + } + }else { + resultUserId = engineersId; + } + } + } + //工程接口人 + if(StringUtils.equals(roleCode,ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue())){ + String engineeringInterfacePerson = projectRelatedPersonnelList.stream().filter(relatedPersonnel -> { + boolean flag = false; + if(StringUtils.isNotEmpty(relatedPersonnel.getLawEngineer())){ + flag = true; + } + return flag; + }).map(ProjectRelatedPersonnel::getEngineeringInterfacePerson).distinct().collect(Collectors.joining(",")); + if(StringUtils.isNotEmpty(engineeringInterfacePerson)){ + if(!StringUtils.contains(engineeringInterfacePerson,engineersId)){ + String[] engineeringInterfacePersonArr = engineeringInterfacePerson.split(","); + if(engineeringInterfacePersonArr.length == 1){ + resultUserId = engineeringInterfacePerson; + } + }else { + resultUserId = engineersId; + } + } + } + //studio + if(StringUtils.equals(roleCode,ProjectRoleEnum.STUDIO_ENGINEER.getValue())){ + resultUserId = studioEngineer; + } + return resultUserId; + } } diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 870cbb6fa..9a1c1fede 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -569,6 +569,8 @@ module.exports = { mergeTerms: 'Determine Merger Terms', documentSplitTemplate: 'Document Split Template', batSetting: 'Batch Setting', + batchSettingInformation:'Batch Setting Information', + batchSettingPersonnel:'Batch Setting Personnel', selectDirectoryTerms: 'Please Select the directory location to add terms', StandardBreakdown: 'Standard Breakdown', OnlyWordItem: 'Only the GSO file type can split PDF files. Please re select the file', @@ -713,9 +715,9 @@ module.exports = { confirmationOfRegulationsList: 'Regulation List Confirmation', regulatoryTaskConfirmation: 'Regulation Task Confirmation', - certificationStart: 'Homo Test Completion', - preHomoCompletion: 'Pre-Homo Completion', - certificationEnd: 'Type Approval', + certificationStart: 'Homo Completion', + preHomoCompletion: 'Pre-Homo Confirmation', + certificationEnd: 'Homo KO', directoryName: 'Catalogue Name', batch: 'Batch', uploadTime: 'Upload Time', @@ -1269,6 +1271,10 @@ module.exports = { source:'Source', sourceEn:'Source (English)', onlyone:'Only one merge delimiter can be entered', + theInconsistentSameResponsibility:'The selected data responsibility fields are inconsistent; Please select the same responsibility', + taskConfirmedPersonnelCannotBeSetBatch:'When the task confirmation status is to be confirmed, personnel cannot be set in batch', + theSelectedDataResponsibilityFieldCannotEmpty:'The selected data responsibility field cannot be empty', + theTaskConfirmationStatusCannot:'Only the list confirmation status is "reject" or "accept" and the task confirmation status cannot be "data to be confirmed"', BatchMaintenanceProgress:'Batch Maintenance Progress', BatchChangeStatus:'Batch Change Status', CollectinguthenticationParameters:'Collecting Authentication Parameters', diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 5c3278427..7d4e9abe7 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -576,6 +576,8 @@ module.exports = { mergeTerms: '确定合并条款', documentSplitTemplate: '文档拆分模板', batSetting: '批量设置', + batchSettingInformation:'批量设置信息', + batchSettingPersonnel:'批量设置人员', selectDirectoryTerms: '请选择添加条款的目录位置', selectDirectorylocation: '请选择添加文件夹的目录位置', OnlyWordItem: '只有GSO文件类型,才能拆分pdf文件,请重新选择文件', @@ -1371,6 +1373,10 @@ module.exports = { source: '来源', sourceEn: '来源(英文)', onlyone:'只能输入一个合并分隔符', + theInconsistentSameResponsibility:'所选的数据责任领域不一致;请选择相同的责任领域', + taskConfirmedPersonnelCannotBeSetBatch:'任务确认状态为待确认时无法批量设置人员', + theSelectedDataResponsibilityFieldCannotEmpty:'所选数据责任领域不能为空', + theTaskConfirmationStatusCannot:'只能变更清单确认状态为拒绝或接受、及任务确认状态不能为待确认的数据', BatchMaintenanceProgress:'批量维护进度', BatchChangeStatus:'批量修改状态', CollectinguthenticationParameters:'认证参数收集', diff --git a/jero-web/src/views/processCenter/processForm/taskListProcess/index.vue b/jero-web/src/views/processCenter/processForm/taskListProcess/index.vue index efb58fae4..653d756c2 100644 --- a/jero-web/src/views/processCenter/processForm/taskListProcess/index.vue +++ b/jero-web/src/views/processCenter/processForm/taskListProcess/index.vue @@ -99,11 +99,14 @@ title: this.$t('targetMarket'), value: 'targetMarket_dictText' }, - {}, + { + title: this.$t('subtitle'), + value: 'subtitle' + }, { title: this.$t('standard'), value: 'serialNumber', - type:'4', + type: '4' }, { title: this.$t('title'), @@ -325,7 +328,7 @@ this.$router.push({ path: '/ProjectDetails', query: { - type:'103', + type: '103', ...this.$route.query } }) @@ -375,7 +378,7 @@ this.$router.push({ path: '/ProjectDetails', query: { - type:'103', + type: '103', ...this.$route.query } }) diff --git a/jero-web/src/views/projectManagement/components/batSetting.vue b/jero-web/src/views/projectManagement/components/batSetting.vue index 4a1285e36..f215a1b33 100644 --- a/jero-web/src/views/projectManagement/components/batSetting.vue +++ b/jero-web/src/views/projectManagement/components/batSetting.vue @@ -1,6 +1,6 @@ @@ -445,6 +450,7 @@ import resultReportedUpload from './resultReportedUpload' import listOfRegulationsView from './listOfRegulationsView' import globalAdvancedQuery from '@/components/globalAdvancedQuery/index' + import batchSettingPersonnel from './batchSettingPersonnel' import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage' import moment from 'moment' import { mapGetters } from 'vuex' @@ -462,6 +468,7 @@ globalAdvancedQuery, fixedPlate, resultReportedUpload, + batchSettingPersonnel, listOfRegulationsView }, data() { @@ -1145,6 +1152,47 @@ this.$message.warning(this.$t('selectLeastOne')) } }, + batchSettingPersonnelClick() { + if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) + let isTrue + let content = [] + for (let i = 0; i < this.dataSource.length; i++) { + for (let j = 0; j < selectedRowKeys.length; j++) { + if (this.dataSource[i].id == selectedRowKeys[j]) { + content.push(this.dataSource[i]) + } + } + } + for (let i = 0; i < content.length; i++) { + if (!content[i].dutyTerritory_dictText) { + this.$message.warning(this.$t('theSelectedDataResponsibilityFieldCannotEmpty')) + return + } + for (let j = 1; j < content.length; j++) { + if (content[i].dutyTerritory_dictText != content[j].dutyTerritory_dictText || !content[i].dutyTerritory_dictText) { + this.$message.warning(this.$t('theInconsistentSameResponsibility')) + return + } + } + } + for (let i = 0; i < content.length; i++) { + if (content[i].roleCode == '0' && + content[i].taskAffirmStatus != 'List to confirm') { + isTrue = true + } else { + isTrue = false + this.$message.warning(this.$t('taskConfirmedPersonnelCannotBeSetBatch')) + return + } + } + if (isTrue) { + this.$refs.batchSettingPersonnelRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), content) + } + } else { + this.$message.warning(this.$t('selectLeastOne')) + } + }, questionClick() { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) @@ -1215,11 +1263,15 @@ if (this.dataSource[i].id == selectedRowKeys[j]) { if (this.dataSource[i].taskAffirmStatus == 'Accepted' || (this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Accepted') || - (this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Not started')) { + (this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Accepted') || + (this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Rejected') || + (this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Rejected') || + (this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Not started') || + (this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Not started')) { isTrue = true } else { isTrue = false - this.$message.warning(this.$t('onlyTheDataWhoseStatusNotInitiatedAcceptedChanged')) + this.$message.warning(this.$t('theTaskConfirmationStatusCannot')) return } } @@ -2072,19 +2124,27 @@ bringInRelevantPersonnelClick() { let _this = this - this.$confirm({ - content: _this.$t('confirmBringInRelevantPersonnel'), - onOk() { - getAction(_this.url.matchRelevantPeople, { projectLibraryId: _this.$route.query.id }).then((res) => { - if (res.success) { - _this.$message.success(_this.$t('OperationSuccessful')) - _this.getList() - } else { - _this.$message.warning(_this.$t('operationFailed')) - } - }) - } - }) + if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + this.$confirm({ + content: _this.$t('confirmBringInRelevantPersonnel'), + onOk() { + let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys)) + getAction(_this.url.matchRelevantPeople, { + ids: selectedRowKeys.join(','), + projectLibraryId: _this.$route.query.id + }).then((res) => { + if (res.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.getList() + } else { + _this.$message.warning(_this.$t('operationFailed')) + } + }) + } + }) + } else { + this.$message.warning(this.$t('selectLeastOne')) + } }, resultReportedClick(val) { @@ -2306,13 +2366,14 @@ ::v-deep .ant-card-body { padding: 24px 24px 0 24px; } + ::v-deep .ant-table-row:first-child { background: #fff!important; opacity: 0.9; } ::v-deep .ant-table-body { - background: transparent!important; + background: transparent !important; } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/projectStatusBoard/index.vue b/jero-web/src/views/projectManagement/projectStatusBoard/index.vue index 6332b145c..0492867a4 100644 --- a/jero-web/src/views/projectManagement/projectStatusBoard/index.vue +++ b/jero-web/src/views/projectManagement/projectStatusBoard/index.vue @@ -56,45 +56,47 @@
-
-
- {{item.projectName}} -
+
+
{{item}}
-
-
-
{{item}}
+
+
+
+ {{item.projectName}} +
-
-
-
-
-
{{val.name}}
-
{{val.name}}
- - - - - - +
+
+
+
+
+
{{val.name}}
+
{{val.name}} +
+ + + + + + - + +
+
+
+
+ {{handlingTime}}
-
-
- {{handlingTime}} -
-
{{this.$t('dataLoading')}}
@@ -308,8 +310,8 @@ }, getTimeline() { let query = { - startTime: this.startTime || this.getNewDate('before',6), - endTime: this.endTime || this.getNewDate('after',5), + startTime: this.startTime || this.getNewDate('before', 6), + endTime: this.endTime || this.getNewDate('after', 5), ...this.queryParam } this.loadingMain = true @@ -341,8 +343,8 @@ }, getTimelineList(time) { let query = { - startTime: this.startTime || this.getNewDate('before',6), - endTime: this.endTime || this.getNewDate('after',5), + startTime: this.startTime || this.getNewDate('before', 6), + endTime: this.endTime || this.getNewDate('after', 5), ...this.queryParam } getAction(this.url.timelineList, query).then((res) => { @@ -529,7 +531,7 @@ width: 100%; height: 500px; margin-bottom: 20px; - padding: 20px 58px 20px 10px; + padding: 0 58px 20px 10px; box-sizing: border-box; overflow: auto; } @@ -572,7 +574,7 @@ .box-top-content-left { width: 140px; float: left; - padding-top: 100px; + padding-top: 57px; margin-right: 20px; } @@ -597,6 +599,12 @@ display: flex; flex-direction: row; justify-content: space-between; + position: sticky; + top: 0; + background: #fff; + z-index: 100; + padding-top: 20px; + padding-left: 160px; } .box-top-content-right-top-text { @@ -620,7 +628,7 @@ .box-top-content-right-bottom { position: relative; - padding-top: 60px; + padding-top: 50px; } .process-content { @@ -657,18 +665,20 @@ left: 50%; transform: translate(-50%, -50%); } - .process-content-right-button{ - font-size: 12px; - color: #040B29; - width: 75px; - background: #fff; - display: inline-block; - overflow: hidden; - position: absolute; - top: 12px; - left: 50%; - transform: translate(-50%, -50%); - } + + .process-content-right-button { + font-size: 12px; + color: #040B29; + width: 75px; + background: #fff; + display: inline-block; + overflow: hidden; + position: absolute; + top: 12px; + left: 50%; + transform: translate(-50%, -50%); + } + .process-content-right-button { width: 75px; font-size: 12px; @@ -706,5 +716,6 @@ font-weight: bold; font-size: 14px; width: 100px; + z-index: 101; } \ No newline at end of file