From 3009d3a72374638137be6eb8cf52beb43b9cbf89 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Wed, 20 Apr 2022 15:52:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=8F=91=E8=B5=B7=E4=BA=BA?= =?UTF-8?q?=E3=80=81=E8=B4=A3=E4=BB=BB=E4=BA=BA=E5=8C=B9=E9=85=8D=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E3=80=82=20update=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectLawsInventoryEOController.java | 2 +- .../entity/ProjectLawsInventoryEO.java | 72 +- .../ProjectLawsInventoryEOServiceImpl.java | 217 ++- .../ProjectRelatedPersonnelServiceImpl.java | 12 + jero-web/src/common/lang/en-us.js | 1 + jero-web/src/common/lang/zh-cn.js | 1 + .../components/listOfRegulations.vue | 1377 +++++++++-------- 7 files changed, 962 insertions(+), 720 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryEOController.java index ba0f43bf5..eb62adacb 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryEOController.java @@ -69,7 +69,7 @@ public class ProjectLawsInventoryEOController extends JeroController> queryList(ProjectLawsInventoryEO projectLawsInventoryEO,HttpServletRequest req) { List list = projectLawsInventoryEOService.queryList(projectLawsInventoryEO,req); - return Result.OK(list); + return Result.OK(projectLawsInventoryEO.getCut(),list); } /** diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java index ef424d92c..457f5a766 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java @@ -170,18 +170,32 @@ public class ProjectLawsInventoryEO implements Serializable { @TableField(exist = false) private String designDeliverableTemplateName; - /**设计符合性确认-发起人*/ - @Excel(name = "设计符合性确认-发起人", width = 15) - @ApiModelProperty(value = "设计符合性确认-发起人") + /**设计符合性确认-发起人角色*/ + @Excel(name = "设计符合性确认-发起人角色", width = 15) + @ApiModelProperty(value = "设计符合性确认-发起人角色") @Dict(dicCode ="fa1_qi3_ren2") private String designInitiator; - /**设计符合性确认-责任人*/ - @Excel(name = "设计符合性确认-责任人", width = 15) - @ApiModelProperty(value = "设计符合性确认-责任人") + /**设计符合性确认-发起人id*/ + @ApiModelProperty(value = "设计符合性确认-发起人id") + private String designInitiatorId; + /**设计符合性确认-发起人名称*/ + @TableField(exist = false) + private String designInitiatorName; + + /**设计符合性确认-责任人角色*/ + @Excel(name = "设计符合性确认-责任人角色", width = 15) + @ApiModelProperty(value = "设计符合性确认-责任人角色") @Dict(dicCode ="ze2_ren4_ren2") private String designDuty; + /**设计符合性确认-责任人id*/ + @ApiModelProperty(value = "设计符合性确认-责任人id") + private String designDutyId; + /**设计符合性确认-责任人名称*/ + @TableField(exist = false) + private String designDutyName; + /**设计符合性确认-截止时间*/ @Excel(name = "设计符合性确认-截止时间", width = 15, format = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @@ -204,18 +218,32 @@ public class ProjectLawsInventoryEO implements Serializable { @TableField(exist = false) private String prehomoDeliverableTemplateName; - /**prehomo确认-发起人*/ - @Excel(name = "prehomo确认-发起人", width = 15) - @ApiModelProperty(value = "prehomo确认-发起人") + /**prehomo确认-发起人角色*/ + @Excel(name = "prehomo确认-发起人角色", width = 15) + @ApiModelProperty(value = "prehomo确认-发起人角色") @Dict(dicCode ="fa1_qi3_ren2") private String prehomoInitiator; - /**prehomo确认-责任人*/ - @Excel(name = "prehomo确认-责任人", width = 15) - @ApiModelProperty(value = "prehomo确认-责任人") + /**prehomo确认-发起人id*/ + @ApiModelProperty(value = "prehomo确认-发起人id") + private String prehomoInitiatorId; + /**prehomo确认-发起人名称*/ + @TableField(exist = false) + private String prehomoInitiatorName; + + /**prehomo确认-责任人角色*/ + @Excel(name = "prehomo确认-责任人角色", width = 15) + @ApiModelProperty(value = "prehomo确认-责任人角色") @Dict(dicCode ="ze2_ren4_ren2") private String prehomoDuty; + /**prehomo确认-责任人id*/ + @ApiModelProperty(value = "prehomo确认-责任人id") + private String prehomoDutyId; + /**prehomo确认-责任人名称*/ + @TableField(exist = false) + private String prehomoDutyName; + /**prehomo确认-截止时间*/ @Excel(name = "prehomo确认-截止时间", width = 15, format = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @@ -238,18 +266,32 @@ public class ProjectLawsInventoryEO implements Serializable { @TableField(exist = false) private String verifyDeliverableTemplateName; - /**验证符合性确认-发起人*/ - @Excel(name = "验证符合性确认-发起人", width = 15) - @ApiModelProperty(value = "验证符合性确认-发起人") + /**验证符合性确认-发起人角色*/ + @Excel(name = "验证符合性确认-发起人角色", width = 15) + @ApiModelProperty(value = "验证符合性确认-发起人角色") @Dict(dicCode ="fa1_qi3_ren2") private String verifyInitiator; + /**验证符合性确认-发起人id*/ + @ApiModelProperty(value = "验证符合性确认-发起人id") + private String verifyInitiatorId; + /**验证符合性确认-发起人名称*/ + @TableField(exist = false) + private String verifyInitiatorName; + /**验证符合性确认-责任人*/ @Excel(name = "验证符合性确认-责任人", width = 15) @ApiModelProperty(value = "验证符合性确认-责任人") @Dict(dicCode ="ze2_ren4_ren2") private String verifyDuty; + /**验证符合性确认-责任人id*/ + @ApiModelProperty(value = "验证符合性确认-责任人id") + private String verifyDutyId; + /**验证符合性确认-责任人名称*/ + @TableField(exist = false) + private String verifyDutyName; + /**验证符合性确认-截止时间*/ @Excel(name = "验证符合性确认-截止时间", width = 15, format = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") 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 e7dc373a4..f3f5953eb 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 @@ -213,16 +213,49 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl userIdList = new ArrayList<>(); List deliverableList = new ArrayList<>(); for (ProjectLawsInventoryEO projectLawsInventoryEO : list) { + //认证工程师id if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId())){ userIdList.add(projectLawsInventoryEO.getHomologationEngineerId()); } + //法规工程师id if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId())){ userIdList.add(projectLawsInventoryEO.getRegulationOwnerId()); } + //工程接口人id if(StringUtils.isNotEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())){ userIdList.add(projectLawsInventoryEO.getEngineeringInterfacePerson()); } + //设计符合性确认 + //发起人 + if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignInitiatorId())){ + userIdList.add(projectLawsInventoryEO.getDesignInitiatorId()); + } + //责任人 + if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){ + userIdList.add(projectLawsInventoryEO.getDesignDutyId()); + } + + //prehomo确认 + //发起人 + if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())){ + userIdList.add(projectLawsInventoryEO.getPrehomoInitiatorId()); + } + //责任人 + if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDutyId())){ + userIdList.add(projectLawsInventoryEO.getPrehomoDutyId()); + } + + //验证符合性确认 + //发起人 + if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyInitiatorId())){ + userIdList.add(projectLawsInventoryEO.getVerifyInitiatorId()); + } + //责任人 + if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){ + userIdList.add(projectLawsInventoryEO.getVerifyDutyId()); + } + //设计符合性确认交付物模板 if(StringUtils.isNotBlank(projectLawsInventoryEO.getDesignDeliverableTemplate())){ deliverableList.addAll(Arrays.asList(projectLawsInventoryEO.getDesignDeliverableTemplate().split(","))); @@ -272,6 +305,54 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl designInitiatorId.equals(e.getId())). + map(SysUser::getUsername).collect(Collectors.joining(",")); + projectLawsInventoryEO.setDesignInitiatorName(designInitiatorName); + } + //责任人 + String designDutyId = projectLawsInventoryEO.getDesignDutyId(); + if(StringUtils.isNotEmpty(designDutyId)){ + String designDutyName = sysUsers.stream().filter(e -> designDutyId.equals(e.getId())). + map(SysUser::getUsername).collect(Collectors.joining(",")); + projectLawsInventoryEO.setDesignDutyName(designDutyName); + } + + //prehomo确认 + //发起人 + String prehomoInitiatorId = projectLawsInventoryEO.getPrehomoInitiatorId(); + if(StringUtils.isNotEmpty(prehomoInitiatorId)){ + String prehomoInitiatorName = sysUsers.stream().filter(e -> prehomoInitiatorId.equals(e.getId())). + map(SysUser::getUsername).collect(Collectors.joining(",")); + projectLawsInventoryEO.setPrehomoInitiatorName(prehomoInitiatorName); + } + //责任人 + String prehomoDutyId = projectLawsInventoryEO.getPrehomoDutyId(); + if(StringUtils.isNotEmpty(prehomoDutyId)){ + String prehomoDutyName = sysUsers.stream().filter(e -> prehomoDutyId.equals(e.getId())). + map(SysUser::getUsername).collect(Collectors.joining(",")); + projectLawsInventoryEO.setPrehomoDutyName(prehomoDutyName); + } + + //验证符合性确认 + //发起人 + String verifyInitiatorId = projectLawsInventoryEO.getVerifyInitiatorId(); + if(StringUtils.isNotEmpty(verifyInitiatorId)){ + String verifyInitiatorName = sysUsers.stream().filter(e -> verifyInitiatorId.equals(e.getId())). + map(SysUser::getUsername).collect(Collectors.joining(",")); + projectLawsInventoryEO.setVerifyInitiatorName(verifyInitiatorName); + } + //责任人 + String verifyDutyId = projectLawsInventoryEO.getVerifyDutyId(); + if(StringUtils.isNotEmpty(verifyDutyId)){ + String verifyDutyName = sysUsers.stream().filter(e -> verifyDutyId.equals(e.getId())). + map(SysUser::getUsername).collect(Collectors.joining(",")); + projectLawsInventoryEO.setVerifyDutyName(verifyDutyName); + } } //清单确认状态 @@ -632,10 +713,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); - List inventoryAffirmStatusList = new ArrayList<>(); + /*List inventoryAffirmStatusList = new ArrayList<>(); inventoryAffirmStatusList.add(InventoryAffirmStatusEnum.NOT_STARTED.getValue()); inventoryAffirmStatusList.add(InventoryAffirmStatusEnum.REJECTED.getValue()); - queryWrapper.lambda().in(ProjectLawsInventoryEO::getInventoryAffirmStatus,inventoryAffirmStatusList); + queryWrapper.lambda().in(ProjectLawsInventoryEO::getInventoryAffirmStatus,inventoryAffirmStatusList);*/ queryWrapper.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectLibraryId); //查询当前项目下,清单状态为 未发起、拒绝状态的法规清单。 List projectLawsInventoryEOS = this.baseMapper.selectList(queryWrapper); @@ -645,33 +726,90 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl().success("带入成功!"); } + + /** + * 获取一个用户的id + * @param roleCode + * @param projectRelatedPersonnel + * @return + */ + public String ToGetAUserId(String roleCode,ProjectRelatedPersonnel projectRelatedPersonnel){ + String resultUserId = ""; + //法规工程师 + if(StringUtils.equals(roleCode,ProjectRoleEnum.REGULATI_ENGINEER.getValue())){ + String lawEngineer = projectRelatedPersonnel.getLawEngineer(); + if(StringUtils.isNotEmpty(lawEngineer)){ + String[] lawEngineerArr = lawEngineer.split(","); + if(lawEngineerArr.length == 1){ + resultUserId = lawEngineer; + } + } + } + //认证工程师 + if(StringUtils.equals(roleCode,ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue())){ + String certificationEngineer = projectRelatedPersonnel.getCertificationEngineer(); + if(StringUtils.isNotEmpty(certificationEngineer)){ + String[] certificationEngineerArr = certificationEngineer.split(","); + if(certificationEngineerArr.length == 1){ + resultUserId = certificationEngineer; + } + } + } + //工程接口人 + if(StringUtils.equals(roleCode,ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue())){ + String engineeringInterfacePerson = projectRelatedPersonnel.getEngineeringInterfacePerson(); + if(StringUtils.isNotEmpty(engineeringInterfacePerson)){ + String[] engineeringInterfacePersonArr = engineeringInterfacePerson.split(","); + if(engineeringInterfacePersonArr.length == 1){ + resultUserId = engineeringInterfacePerson; + } + } + } + return resultUserId; + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectRelatedPersonnelServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectRelatedPersonnelServiceImpl.java index 1e4494efe..b56e030ae 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectRelatedPersonnelServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectRelatedPersonnelServiceImpl.java @@ -223,6 +223,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl queryPersonByProjectId(String projectId,String dutyTerritory) { JSONObject result = new JSONObject(); + List> allPersonList = new ArrayList<>(); List> lawEngineerList = new ArrayList<>(); List> certificationEngineerList = new ArrayList<>(); List> engineeringInterfacePersonList = new ArrayList<>(); @@ -301,10 +302,21 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl + new TreeSet<>(Comparator.comparing(o -> (String)o.get("value")))), ArrayList::new + ) + ); result.put("lawEngineerList",lawEngineerList); result.put("certificationEngineerList",certificationEngineerList); result.put("engineeringInterfacePersonList",engineeringInterfacePersonList); + result.put("allPersonList",allPersonList); return Result.OK(result); } diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index a9bc1cebd..6c4927138 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -691,4 +691,5 @@ module.exports = { historicalVersion:'Historical version', versionName:'Version name', finalizationTime:'Finalization time', + incorrectsubmitted:'The data status is incorrect; Only data with status to be confirmed can be submitted', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 9646e479b..f3de8d81c 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -676,6 +676,7 @@ module.exports = { confirmOverrule:'确认驳回?', The:'第', submitted:'条数据已提交不能重复提交', + incorrectsubmitted:'条数据状态有误;只能提交状态为待确认的数据', basicInformationOfParameters:'参数基本信息', regulatoryCertificationTaskPlan:'法规/认证任务计划', bringInRelevantPersonnel:'带入相关人员', diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index fc2ed2055..23f8484da 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -1,14 +1,14 @@ \ No newline at end of file