diff --git a/jero-boot/db/蔚来标准sql/dev_2nd_period.sql b/jero-boot/db/蔚来标准sql/dev_2nd_period.sql index de2244b1d..167801aa3 100644 --- a/jero-boot/db/蔚来标准sql/dev_2nd_period.sql +++ b/jero-boot/db/蔚来标准sql/dev_2nd_period.sql @@ -293,4 +293,10 @@ ALTER TABLE `project_library_role_rel` ADD COLUMN `model_type` varchar(64) NULL COMMENT '模块类型,对应系统中枚举类 RoleRelModelTypeEnum ' AFTER `role_code`; -- 初始化历史数据 -update project_library_role_rel set model_type = 'Laws inventory' +update project_library_role_rel set model_type = 'Laws inventory'; + +-- 项目库-认证清单表-增加认证进度备注 2023-03-08 未同步生产环境 +ALTER TABLE `project_certification_inventory` + ADD COLUMN `certification_progress_remark` varchar(2000) NULL COMMENT '认证进度备注' AFTER `certification_progress`; +-- 将之前的任务清单-认证进度,修改为 认证清单-认证进度 2023-03-08 未同步生产环境 +UPDATE `sys_dict` SET `dict_name` = '认证清单-认证进度', `description` = '认证清单-认证进度' WHERE `id` = '1524311122804346881'; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/EvaluationTypeEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/EvaluationTypeEnum.java index 06d9043c6..e2e40a670 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/EvaluationTypeEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/EvaluationTypeEnum.java @@ -37,12 +37,12 @@ public enum EvaluationTypeEnum { public static String getTextByValue(String value,String cut) { EvaluationTypeEnum[] values = values(); - for (EvaluationTypeEnum certificationProgressEnum : values) { - if (certificationProgressEnum.value.equals(value)) { + for (EvaluationTypeEnum evaluationTypeEnum : values) { + if (evaluationTypeEnum.value.equals(value)) { if(StringUtils.equals(cut, CutEnum.CN.getValue())){ - return certificationProgressEnum.name; + return evaluationTypeEnum.name; }else { - return certificationProgressEnum.value; + return evaluationTypeEnum.value; } } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java index dadbccd26..bb4feef48 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java @@ -213,4 +213,11 @@ public class ProjectCertificationInventoryEOController extends JeroController submitTask(@RequestBody JSONObject json) { return this.projectCertificationInventoryEOService.submitTask(json); } + + @AutoLog(value = "项目库-认证清单表-批量保存") + @ApiOperation(value="项目库-认证清单表-批量保存", notes="项目库-认证清单表-批量保存") + @PostMapping(value = "/saveBatch") + public Result saveBatch(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.saveBatch(json); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java index 2a34dc9c2..9242934e8 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java @@ -174,6 +174,14 @@ public class ProjectCertificationInventoryEO implements Serializable { @ApiModelProperty(value = "认证进度") private java.lang.String certificationProgress; + /**认证进度展示名称**/ + @TableField(exist = false) + private String certificationProgress_dictText; + + @Excel(name = "认证进度备注", width = 15) + @ApiModelProperty(value = "认证进度备注") + private String certificationProgressRemark; + /**项目库id*/ @ApiModelProperty(value = "项目库id") private String projectLibraryId; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/CertificationFlowNodeEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/CertificationFlowNodeEnum.java index afd94aca7..0833b9b80 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/CertificationFlowNodeEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/CertificationFlowNodeEnum.java @@ -12,6 +12,7 @@ public enum CertificationFlowNodeEnum { RZGCSJSRW ("rzgcsjsrw","认证工程师接受任务","Certified engineers accept tasks"), RZGCSTHRW ("rzgcsthrw","认证工程师退回至studio任务","Certified engineer returns to studio task"), ZRRJSRW ("zrrjsrw","责任人接受任务","The responsible person accepts the task"), + ZRRJJRW ("zrrjjrw","责任人拒绝任务","The person in charge refused the assignment"), ZRRTJRW ("zrrtjrw","责任人提交任务","The responsible person submits the task"), RZGCSSC ("rzgcssc","认证工程师审查","Certified engineer review"), ; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java index c0c51c178..511e8d7f3 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java @@ -102,7 +102,7 @@ public interface IProjectCertificationInventoryEOService extends IService processInfoDetailEOList, ProcessInfoEO processInfoEO); + void addProcessInfoDetailEO(List processInfoDetailEOList, String processInfoId, String taskDefinitionKey); Result> getRoleByUserId(Map params); @@ -128,4 +128,11 @@ public interface IProjectCertificationInventoryEOService extends IService certificationInitiatingTask(JSONObject json); + + /** + * 批量保存 + * @param projectCertificationInventoryEOList + * @return + */ + Result saveBatch(JSONObject json); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index 76c7e1e0d..d37e42d1f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -3,6 +3,7 @@ package com.jero.modules.project.service.impl; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.jero.common.api.vo.Result; @@ -209,6 +210,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl categoryList = this.sysCategoryService.list(); List sysDictItems = this.sysDictItemServiceImpl.getBaseMapper().selectItemsAll(); + List certificationProgress = this.sysDictItemServiceImpl.selectItemsByDictCode("certification_progress"); List userIdList = new ArrayList<>(); @@ -248,6 +250,20 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl collect = certificationProgress.stream() + .filter(dict -> StringUtils.equals(dict.getItemValue(), data.getCertificationProgress())) + .collect(Collectors.toList()); + if(CollectionUtils.isNotEmpty(collect)){ + if(StringUtils.equals(cut,CutEnum.CN.getValue())){ + certificationProgress_dictText = collect.get(0).getItemText(); + }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ + certificationProgress_dictText = collect.get(0).getEnName(); + } + } + data.setCertificationProgress_dictText(certificationProgress_dictText); + } } } } @@ -288,14 +304,18 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl idList = Arrays.asList(ids.split(",")); + List flowStatusList = new ArrayList<>(); + flowStatusList.add(CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue()); + flowStatusList.add(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue()); + // 根据页面选择的认证清单数据id,查询出状态为’清单待发布‘的数据,进行发布处理 QueryWrapper certificationQueryWrap = new QueryWrapper<>(); certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getId,idList); - certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue()); + certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList); List projectCertificationInventoryEOList = this.list(certificationQueryWrap); if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){ - throw new JeroBootException("无法获取要发布的数据,请重新选择!"); + throw new JeroBootException("至少选择一条数据流程状态为'清单待发布 或 认证退回'的数据!"); } List processInfoDetailEOList = new ArrayList<>(); @@ -322,17 +342,24 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl deleteDetailWrap = new QueryWrapper<>(); + deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoEO.getId()); + deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey()); + deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getFlowType,FlowTypeEnum.CERTIFICATION_LC.getValue()); + this.processInfoDetailEOService.remove(deleteDetailWrap); + this.processInfoDetailEOService.saveBatch(processInfoDetailEOList); this.updateBatchById(projectCertificationInventoryEOList); return Result.OK("发布成功!"); } @@ -349,7 +376,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl deleteWrap = new QueryWrapper<>(); deleteWrap.lambda().eq(ProcessInfoEO::getId,projectLibraryId); @@ -360,19 +390,28 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl processInfoDetailEOList,ProcessInfoEO processInfoEO){ + public void addProcessInfoDetailEO(List processInfoDetailEOList,String processInfoId,String taskDefinitionKey){ processInfoDetailEOList.forEach(detail -> { + detail.setActiProcInstId(processInfoId); + detail.setProcessInfoId(processInfoId); detail.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue()); + detail.setTaskDefinitionKey(taskDefinitionKey); + detail.setStatus(TaskStatusEnum.NOT_DONE.getValue()); + detail.setCreateTime(new Date()); + detail.setStatus(TaskStatusEnum.NOT_DONE.getValue()); }); - // 删除该项目数据的待办任务,key为 认证工程师接受任务的数据 - QueryWrapper deleteDetailWrap = new QueryWrapper<>(); - deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoEO.getId()); - deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey()); - this.processInfoDetailEOService.remove(deleteDetailWrap); + List userIdList = processInfoDetailEOList.stream().map(ProcessInfoDetailEO::getUserId).distinct().collect(Collectors.toList()); + QueryWrapper removeWrap = new QueryWrapper<>(); + removeWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoId); + removeWrap.lambda().in(ProcessInfoDetailEO::getUserId,userIdList); + removeWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,taskDefinitionKey); + // 删除用户在这个认证清单流程中其它的待办任务 + this.processInfoDetailEOService.remove(removeWrap); + this.processInfoDetailEOService.saveBatch(processInfoDetailEOList); } @@ -619,6 +658,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl submitTask(JSONObject json) { + if (!json.containsKey("nodeKey")) { + throw new JeroBootException("nodeKey不能为空,请联系管理员!"); + } + String nodeKey = json.getString("nodeKey"); CertificationFlowNodeEnum flowNodeEnum = CertificationFlowNodeEnum.getEnumByKey(nodeKey); @@ -626,12 +669,19 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl certificationReturnedStudioTask(JSONObject json) { + String ids = json.getString("ids"); + if(StringUtils.isEmpty(ids)){ + throw new JeroBootException("至少选择一条数据进行操作!"); + } + List idList = Arrays.asList(ids.split(",")); + List flowStatusList = new ArrayList<>(); + flowStatusList.add(CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue()); + flowStatusList.add(CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue()); + + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().in(ProjectCertificationInventoryEO::getId,idList); + queryWrapper.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList); + List projectCertificationInventoryEOList = this.list(queryWrapper); + + if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){ + throw new JeroBootException("至少选择一条数据流程状态为'清单待校核 或 责任人拒绝的数据'!"); + } + + ProjectLibraryBase projectLibraryBase = JSONObject.parseObject(JSONObject.toJSONString(json.get("projectLibraryBase")), ProjectLibraryBase.class); + if (StringUtils.isEmpty(projectLibraryBase.getStudioEngineer())) { + throw new JeroBootException("该项目的studio为空,请维护studio后再进行退回操作!"); + } + + // 给studio分配待办中心任务 + List processInfoDetailEOList = new ArrayList<>(); + ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO(); + processInfoDetailEO.setUserId(projectLibraryBase.getStudioEngineer()); + processInfoDetailEOList.add(processInfoDetailEO); + this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.STUDIOFQ.getKey()); + + try { + for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) { + projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue()); + } + + // 认证工程师发起任务,将数据的状态更新为 任务待确认。 + this.updateBatchById(projectCertificationInventoryEOList); + + // 更新该项目认证流程中,认证工程师的任务状态。 + QueryWrapper queryCountWrap = new QueryWrapper<>(); + queryCountWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectLibraryBase.getId()); + queryCountWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList); + int notDoneCount = this.count(queryCountWrap); + // 如果还有 清单待校核、责任人拒绝 状态的数据,不做操作,如果没有 将这个项目认证流程的所有认证工程师待办任务转为已办 + if(notDoneCount == 0){ + QueryWrapper detailQueryWrapper = new QueryWrapper<>(); + detailQueryWrapper.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId()); + detailQueryWrapper.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey()); + List detailEOList = this.processInfoDetailEOService.list(detailQueryWrapper); + + for (ProcessInfoDetailEO detailEO : detailEOList) { + detailEO.setStatus(TaskStatusEnum.HAVE_DONE.getValue()); + } + + this.processInfoDetailEOService.updateBatchById(detailEOList); + } + }catch (Exception ex){ + ex.printStackTrace(); + log.error("认证工程师-退回认证清单任务失败:" + ex.getMessage()); + throw new JeroBootException("退回任务失败!"); + } + + return Result.OK("退回任务成功!"); + } + /** * 认证工程师发起任务 * @param json @@ -674,12 +790,47 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl processInfoDetailEOList = new ArrayList<>(); for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) { projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue()); + + ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO(); + processInfoDetailEO.setUserId(projectCertificationInventoryEO.getDutyPerson()); + processInfoDetailEO.setEndTime(projectCertificationInventoryEO.getEndTime()); + processInfoDetailEO.setProjectLawsInventoryId(projectCertificationInventoryEO.getId()); + processInfoDetailEOList.add(processInfoDetailEO); } + + this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.ZRRJSRW.getKey()); + // 认证工程师发起任务,将数据的状态更新为 任务待确认。 this.updateBatchById(projectCertificationInventoryEOList); + + // 更新该项目认证流程中,认证工程师的任务状态。 + QueryWrapper queryCountWrap = new QueryWrapper<>(); + queryCountWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectLibraryBase.getId()); + queryCountWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList); + int notDoneCount = this.count(queryCountWrap); + // 如果还有 清单待校核、责任人拒绝 状态的数据,不做操作,如果没有 将这个项目认证流程的所有认证工程师待办任务转为已办 + if(notDoneCount == 0){ + QueryWrapper detailQueryWrapper = new QueryWrapper<>(); + detailQueryWrapper.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId()); + detailQueryWrapper.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey()); + List detailEOList = this.processInfoDetailEOService.list(detailQueryWrapper); + + for (ProcessInfoDetailEO processInfoDetailEO : detailEOList) { + processInfoDetailEO.setStatus(TaskStatusEnum.HAVE_DONE.getValue()); + } + + this.processInfoDetailEOService.updateBatchById(detailEOList); + } }catch (Exception ex){ ex.printStackTrace(); log.error("认证工程师-发起认证清单任务失败:" + ex.getMessage()); @@ -689,4 +840,23 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl saveBatch(JSONObject json) { + if (!json.containsKey("dataList")) { + throw new JeroBootException("无法获取需要保存的数据,请检查!"); + } + JSONArray dataList = json.getJSONArray("dataList"); + List projectCertificationInventoryEOList = new ArrayList<>(); + ProjectCertificationInventoryEO projectCertificationInventoryEO = null; + for (Object data : dataList) { + projectCertificationInventoryEO = JSONObject.parseObject(JSONObject.toJSONString(data),ProjectCertificationInventoryEO.class); + projectCertificationInventoryEOList.add(projectCertificationInventoryEO); + } + if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){ + throw new JeroBootException("无法获取需要保存的数据,请检查!"); + } + this.updateBatchById(projectCertificationInventoryEOList); + return Result.OK("保存成功!"); + } + } 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 2a9e6a82e..3a774ebd0 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 @@ -9377,15 +9377,50 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl certificationEngineerList = new ArrayList<>(); + if(projectRelatedPersonnels.size() != 0){ + for(ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnels){ + String certificationEngineerName1 = projectRelatedPersonnel.getCertificationEngineerName(); + if(StringUtils.isNotBlank(certificationEngineerName1)){ + certificationEngineerName1 = certificationEngineerName1.replaceAll(" ",""); + certificationEngineerList.addAll(Arrays.asList(certificationEngineerName1.split(","))); + } + } + } + if((StringUtils.isNotBlank(certificationEngineerName) && certificationEngineerName.contains(loginUser.getUsername())) + || certificationEngineerList.contains(loginUser.getUsername())){ + SysRole sysRole = new SysRole(); + sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue()); + if(StringUtils.equals(cut,CutEnum.CN.getValue())){ + sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getName()); + }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ + sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getCode()); + } + sysRoles.add(sysRole); + } +// if((StringUtils.isNotBlank(certificationEngineerName) && certificationEngineerName.contains(loginUser.getUsername())) +// || lawEngineerNameList.contains(loginUser.getUsername())){ +// SysRole sysRole = new SysRole(); +// sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue()); +// if(StringUtils.equals(cut,CutEnum.CN.getValue())){ +// sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getName()); +// }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ +// sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getCode()); +// } +// sysRoles.add(sysRole); +// +// } + + + List roleList = sysRoleMapper.getRoleByUserId(loginUser.getId()); //studio角色,法规工程师/认证工程师,领导角色,管理员角色,Viewer diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/mapper/xml/ProcessInfoEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/mapper/xml/ProcessInfoEOMapper.xml index d85aad48a..0a2b1654f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/mapper/xml/ProcessInfoEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/mapper/xml/ProcessInfoEOMapper.xml @@ -172,13 +172,41 @@ '' as title_en, pi.flow_type, pi.create_by, - ( + + ( + case when flow_type = '21' then + ( + SELECT + pci.end_time + FROM + project_certification_inventory pci + WHERE + pci.project_library_id = pi.id + AND ( pci.flow_status = 'List to be checked' OR pci.flow_status = 'Refusal of responsible person' ) + ORDER BY + pci.end_time ASC + LIMIT 1 + ) + when flow_type = '10' then + ( + SELECT + pid.end_time + FROM + process_info_detail pid + WHERE + pid.process_info_id = pi.id + AND pid.STATUS = 'NotDone' + ORDER BY + pid.end_time ASC + LIMIT 1 + ) end + )AS end_time, pi.STATUS, pi.prc_num, pi.prc_name, @@ -203,7 +231,10 @@ where pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus} ) ) - AND pi.flow_type = #{params.qdqrFlowTypeValue} + AND pi.flow_type IN + + #{item} + )temp order by temp.end_time asc diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/service/impl/ProcessInfoEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/service/impl/ProcessInfoEOServiceImpl.java index f72b89ba1..6549e3e92 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/service/impl/ProcessInfoEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/service/impl/ProcessInfoEOServiceImpl.java @@ -39,6 +39,7 @@ import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum; import com.jero.modules.wkflow.enums.FlowTypeEnum; import com.jero.modules.wkflow.feginClient.impl.WorkFlowFeignClientImpl; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -199,11 +200,16 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl qdqrFlowTypeValue = new ArrayList<>(); + qdqrFlowTypeValue.add(FlowTypeEnum.QDQR.getValue()); + qdqrFlowTypeValue.add(FlowTypeEnum.CERTIFICATION_LC.getValue()); + params.put("qdqrFlowTypeValue",qdqrFlowTypeValue); IPage page = new Page(pageNo, pageSize); IPage result = this.baseMapper.queryProjectProcessTodoTaskListList(page,params); @@ -304,7 +310,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl flowTypeList = new ArrayList<>(); flowTypeList.add(FlowTypeEnum.RWQRLC.getValue()); flowTypeList.add(FlowTypeEnum.SJFHXSHLC.getValue()); - flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue()); + // flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue()); flowTypeList.add(FlowTypeEnum.YZFHXSCLC.getValue()); //根据法规清单id,查询待办中心数据 @@ -396,7 +402,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl import(/* webpackChunkName: "user" */ '@/views/documentTools/virtualList/components/virtualListDetails') }, + { + path: '/certificationListMaintenance', + name: 'certificationListMaintenance', + component: () => import(/* webpackChunkName: "user" */ '@/views/virtualAuthenticationList/virtualAuthenticationListDesign/certificationListMaintenance') + }, { path: '/ProjectDetails', name: 'ProjectDetails', diff --git a/jero-web/src/views/projectManagement/ProjectDetails/index.vue b/jero-web/src/views/projectManagement/ProjectDetails/index.vue index 7b15b0029..d42bea7ef 100644 --- a/jero-web/src/views/projectManagement/ProjectDetails/index.vue +++ b/jero-web/src/views/projectManagement/ProjectDetails/index.vue @@ -248,6 +248,9 @@ } else if (this.$route.query.type == '105') { this.textColor(this.$t('TaskParameterCollection')) this.textTitle = this.$t('TaskParameterCollection') + }else if (this.$route.query.type == '106') { + this.textColor(this.$t('certificationList')) + this.textTitle = this.$t('certificationList') } } else { if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) { diff --git a/jero-web/src/views/projectManagement/components/TaskListModel.vue b/jero-web/src/views/projectManagement/components/TaskListModel.vue index 8430cd4f2..31e1cc703 100644 --- a/jero-web/src/views/projectManagement/components/TaskListModel.vue +++ b/jero-web/src/views/projectManagement/components/TaskListModel.vue @@ -183,7 +183,8 @@ studioList: [], disabled: false, url: { - edit: '/project/projectTaskInventoryEO/edit', + // edit: '/project/projectTaskInventoryEO/edit', + edit: '/project/projectCertificationInventoryEO/edit', addOrUpdate: '/project/projectTaskInventoryConditionAssessmentEO/addOrUpdate', list: '/project/projectTaskInventoryConditionAssessmentEO/list' } diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue b/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue index 8c5b56716..03441eca1 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue @@ -496,6 +496,9 @@ this.formInline = {} this.visible = true this.formInline = value + if (this.formInline.deliverableType) { + this.formInline.deliverableType = this.formInline.deliverableType.split(',') + } this.getRegulationNo() this.title = this.$t('edit') this.$nextTick(() => { diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue b/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue index f5f3110f0..6d7f9cde3 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue @@ -1,7 +1,7 @@