From c677521360b885d7eafe4b33762618720147d393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Thu, 9 Mar 2023 13:59:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E6=B8=85=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectManagement/components/certificationList/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index 9372e9d99..0583f5cc5 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -864,7 +864,7 @@ content: _this.$t('confirmResetProcess'), onOk() { let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys)) - postAction(_this.url.deleteBatch, { + postAction('/project/projectCertificationInventoryEO/resetFlow', { ids: idList.join(','), projectLibraryId: _this.$route.query.id }).then((res) => { From 7dedd03481f85d298c66c49f40d90a74f3026f23 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Thu, 9 Mar 2023 14:23:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95-?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E9=87=8D=E7=BD=AE=E6=8E=A5=E5=8F=A3=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ectCertificationInventoryEOController.java | 7 ++ ...rojectCertificationInventoryEOService.java | 7 ++ ...ctCertificationInventoryEOServiceImpl.java | 67 ++++++++++++++++++- 3 files changed, 79 insertions(+), 2 deletions(-) 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 bb4feef48..613f8de45 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 @@ -220,4 +220,11 @@ public class ProjectCertificationInventoryEOController extends JeroController saveBatch(@RequestBody JSONObject json) { return this.projectCertificationInventoryEOService.saveBatch(json); } + + @AutoLog(value = "项目库-认证清单表-流程重置") + @ApiOperation(value="项目库-认证清单表-流程重置", notes="项目库-认证清单表-流程重置") + @PostMapping(value = "/resetFlow") + public Result resetFlow(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.resetFlow(json); + } } 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 ab32190f8..9ed7ac480 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 @@ -135,4 +135,11 @@ public interface IProjectCertificationInventoryEOService extends IService saveBatch(JSONObject json); + + /** + * 流程重置 + * @param json + * @return + */ + Result resetFlow(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 d72f852cd..9af255d98 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 @@ -339,7 +339,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl certificationEngineerList = Arrays.asList(certificationEngineer.split(",")); @@ -645,6 +649,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl flowStatusList = new ArrayList<>(); flowStatusList.add(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue()); flowStatusList.add(CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue()); + flowStatusList.add(CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue()); queryWrapper.lambda().and(queryWrap -> { queryWrap.and(query -> { @@ -853,6 +858,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl flowStatusList = new ArrayList<>(); flowStatusList.add(CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue()); + flowStatusList.add(CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue()); QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.lambda().in(ProjectCertificationInventoryEO::getId,idList); @@ -860,7 +866,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl projectCertificationInventoryEOList = this.list(queryWrapper); if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){ - throw new JeroBootException("至少选择一条数据流程状态为'结果待提交'的数据!"); + throw new JeroBootException("至少选择一条数据流程状态为'结果待提交 或 审查退回'的数据!"); } ProjectLibraryBase projectLibraryBase = JSONObject.parseObject(JSONObject.toJSONString(json.get("projectLibraryBase")), ProjectLibraryBase.class); @@ -1194,4 +1200,61 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl resetFlow(JSONObject json) { + String ids = json.getString("ids"); + if(StringUtils.isEmpty(ids)){ + throw new JeroBootException("至少选择一条数据进行流程重置!"); + } + + String projectLibraryId = json.getString("projectLibraryId"); + ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.getBaseMapper().selectById(projectLibraryId); + if(ObjectUtils.isEmpty(projectLibraryBase)){ + throw new JeroBootException("无法获取项目库信息,项目库id为:" + projectLibraryId + " 请联系管理员!"); + } + + List idList = Arrays.asList(ids.split(",")); + + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().in(ProjectCertificationInventoryEO::getId,idList); + List projectCertificationInventoryEOList = this.list(queryWrapper); + + try { + // 处理待办中心相关数据 + // 更新该项目认证流程中,认证工程师的任务状态。 + // 认证工程师接受任务节点 + List rzgcsjsrwFlowStatusList = new ArrayList<>(); + rzgcsjsrwFlowStatusList.add(CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue()); + rzgcsjsrwFlowStatusList.add(CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue()); + this.updateProcessInfoDetailStatus(projectLibraryBase,CertificationFlowNodeEnum.RZGCSJSRW.getKey(),rzgcsjsrwFlowStatusList); + + // 认证工程师审查节点 如果还有 结果待审查 的数据,不做操作,如果没有 将这个项目认证流程的所有认证工程师待办任务转为已办 + List rzgcsscFlowStatusList = new ArrayList<>(); + rzgcsscFlowStatusList.add(CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue()); + this.updateProcessInfoDetailStatus(projectLibraryBase,CertificationFlowNodeEnum.RZGCSSC.getKey(),rzgcsscFlowStatusList); + + // 删除其它用户的待办任务 + QueryWrapper detailRemoveWrap = new QueryWrapper<>(); + detailRemoveWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId()); + detailRemoveWrap.lambda().eq(ProcessInfoDetailEO::getFlowType,FlowTypeEnum.CERTIFICATION_LC.getValue()); + detailRemoveWrap.lambda().in(ProcessInfoDetailEO::getProjectLawsInventoryId,idList); + this.processInfoDetailEOService.remove(detailRemoveWrap); + + for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) { + // 把交付结果、截止日期清空,流程状态 设置为 清单待发布 + LambdaUpdateWrapper updateWrap = new LambdaUpdateWrapper<>(); + updateWrap.set(ProjectCertificationInventoryEO::getDeliveryResult,null); + updateWrap.set(ProjectCertificationInventoryEO::getEndTime,null); + updateWrap.set(ProjectCertificationInventoryEO::getFlowStatus,CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue()); + updateWrap.eq(ProjectCertificationInventoryEO::getId,projectCertificationInventoryEO.getId()); + this.update(updateWrap); + } + }catch (Exception ex){ + ex.printStackTrace(); + log.error("studio-流程重置失败:" + ex.getMessage()); + throw new JeroBootException("流程重置失败!"); + } + return Result.OK("流程重置成功!"); + } + }