From f98777460ea7d905be4d01622a7c9c65d5c7830b Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Fri, 7 Apr 2023 13:02:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BA=93=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../handle/ConstructionPlanReviewHandle.java | 21 +++++++++++++-------- .../projectlib/handle/DeptUnitedReviewHandle.java | 20 +++++++++++++------- .../handle/PreliminaryPreviewHandle.java | 21 +++++++++++++-------- .../handle/ProjectFinalInspectionHandle.java | 22 ++++++++++++++-------- .../projectlib/handle/UnitInnerAuditHandle.java | 21 +++++++++++++-------- 5 files changed, 66 insertions(+), 39 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java index 08edae5..196c1a2 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java @@ -4,6 +4,7 @@ import java.time.LocalDateTime; import java.util.List; import java.util.Objects; +import cn.hutool.core.collection.CollUtil; import com.google.common.collect.Lists; import com.ningdatech.basic.util.NdDateUtils; import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; @@ -72,14 +73,18 @@ public class ConstructionPlanReviewHandle extends AbstractProcessBusinessHandle // 装配节点审核人员信息 List progressInfo = instanceDetail.getProgressInfo(); - buildUserUtils.buildUserByProcessInfo(progressInfo); - - // 根据流程处理详情获取流程完成时间 - if(StepStatusEnum.contains(processDetailVO.getStepStatus(), - Lists.newArrayList(StepStatusEnum.REJECTED, - StepStatusEnum.COMPLETED))){ - ProgressNode progressNode = progressInfo.get(progressInfo.size() - 1); - LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(progressNode.getFinishTime()); + if (CollUtil.isNotEmpty(progressInfo)) { + buildUserUtils.buildUserByProcessInfo(progressInfo); + // 根据流程处理详情获取流程完成时间 + if (StepStatusEnum.contains(processDetailVO.getStepStatus(), + Lists.newArrayList(StepStatusEnum.REJECTED, + StepStatusEnum.COMPLETED))) { + ProgressNode progressNode = progressInfo.get(progressInfo.size() - 1); + LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(progressNode.getFinishTime()); + processDetailVO.setFinishTime(finishTime); + } + }else { + LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(instanceDetail.getStartTime()); processDetailVO.setFinishTime(finishTime); } processDetailVO.setProcessProgressVo(instanceDetail); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java index 587ee56..5d84a84 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java @@ -4,6 +4,7 @@ import java.time.LocalDateTime; import java.util.List; import java.util.Objects; +import cn.hutool.core.collection.CollUtil; import com.google.common.collect.Lists; import com.ningdatech.basic.util.NdDateUtils; import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; @@ -69,13 +70,18 @@ public class DeptUnitedReviewHandle extends AbstractProcessBusinessHandle { } // 装配节点审核人员信息 List progressInfo = instanceDetail.getProgressInfo(); - buildUserUtils.buildUserByProcessInfo(progressInfo); - // 根据流程处理详情获取流程完成时间 - if(StepStatusEnum.contains(processDetailVO.getStepStatus(), - Lists.newArrayList(StepStatusEnum.REJECTED, - StepStatusEnum.COMPLETED))){ - ProgressNode progressNode = progressInfo.get(progressInfo.size() - 1); - LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(progressNode.getFinishTime()); + if (CollUtil.isNotEmpty(progressInfo)) { + buildUserUtils.buildUserByProcessInfo(progressInfo); + // 根据流程处理详情获取流程完成时间 + if (StepStatusEnum.contains(processDetailVO.getStepStatus(), + Lists.newArrayList(StepStatusEnum.REJECTED, + StepStatusEnum.COMPLETED))) { + ProgressNode progressNode = progressInfo.get(progressInfo.size() - 1); + LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(progressNode.getFinishTime()); + processDetailVO.setFinishTime(finishTime); + } + }else { + LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(instanceDetail.getStartTime()); processDetailVO.setFinishTime(finishTime); } processDetailVO.setProcessProgressVo(instanceDetail); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/PreliminaryPreviewHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/PreliminaryPreviewHandle.java index a4d07bd..fa57371 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/PreliminaryPreviewHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/PreliminaryPreviewHandle.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.projectlib.handle; +import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.google.common.collect.Lists; import com.ningdatech.basic.util.NdDateUtils; @@ -69,14 +70,18 @@ public class PreliminaryPreviewHandle extends AbstractProcessBusinessHandle { // 装配节点审核人员信息 List progressInfo = instanceDetail.getProgressInfo(); - buildUserUtils.buildUserByProcessInfo(progressInfo); - - // 根据流程处理详情获取流程完成时间 - if(StepStatusEnum.contains(processDetailVO.getStepStatus(), - Lists.newArrayList(StepStatusEnum.REJECTED, - StepStatusEnum.COMPLETED))){ - ProgressNode progressNode = progressInfo.get(progressInfo.size() - 1); - LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(progressNode.getFinishTime()); + if (CollUtil.isNotEmpty(progressInfo)) { + buildUserUtils.buildUserByProcessInfo(progressInfo); + // 根据流程处理详情获取流程完成时间 + if (StepStatusEnum.contains(processDetailVO.getStepStatus(), + Lists.newArrayList(StepStatusEnum.REJECTED, + StepStatusEnum.COMPLETED))) { + ProgressNode progressNode = progressInfo.get(progressInfo.size() - 1); + LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(progressNode.getFinishTime()); + processDetailVO.setFinishTime(finishTime); + } + }else { + LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(instanceDetail.getStartTime()); processDetailVO.setFinishTime(finishTime); } processDetailVO.setProcessProgressVo(instanceDetail); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java index 72c8e8c..8d93f02 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java @@ -3,6 +3,8 @@ package com.ningdatech.pmapi.projectlib.handle; import java.time.LocalDateTime; import java.util.List; import java.util.Objects; + +import cn.hutool.core.collection.CollUtil; import com.google.common.collect.Lists; import com.ningdatech.basic.util.NdDateUtils; import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; @@ -72,14 +74,18 @@ public class ProjectFinalInspectionHandle extends AbstractProcessBusinessHandle // 装配节点审核人员信息 List progressInfo = instanceDetail.getProgressInfo(); - buildUserUtils.buildUserByProcessInfo(progressInfo); - - // 根据流程处理详情获取流程完成时间 - if(StepStatusEnum.contains(processDetailVO.getStepStatus(), - Lists.newArrayList(StepStatusEnum.REJECTED, - StepStatusEnum.COMPLETED))){ - ProgressNode progressNode = progressInfo.get(progressInfo.size() - 1); - LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(progressNode.getFinishTime()); + if (CollUtil.isNotEmpty(progressInfo)) { + buildUserUtils.buildUserByProcessInfo(progressInfo); + // 根据流程处理详情获取流程完成时间 + if (StepStatusEnum.contains(processDetailVO.getStepStatus(), + Lists.newArrayList(StepStatusEnum.REJECTED, + StepStatusEnum.COMPLETED))) { + ProgressNode progressNode = progressInfo.get(progressInfo.size() - 1); + LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(progressNode.getFinishTime()); + processDetailVO.setFinishTime(finishTime); + } + }else { + LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(instanceDetail.getStartTime()); processDetailVO.setFinishTime(finishTime); } processDetailVO.setProcessProgressVo(instanceDetail); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/UnitInnerAuditHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/UnitInnerAuditHandle.java index c22f36d..2e14eb4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/UnitInnerAuditHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/UnitInnerAuditHandle.java @@ -1,6 +1,7 @@ package com.ningdatech.pmapi.projectlib.handle; import java.time.LocalDateTime; +import java.util.Date; import java.util.List; import java.util.Map; @@ -68,14 +69,18 @@ public class UnitInnerAuditHandle extends AbstractProcessBusinessHandle { // 装配节点审核人员信息 List progressInfo = instanceDetail.getProgressInfo(); - buildUserUtils.buildUserByProcessInfo(progressInfo); - - // 根据流程处理详情获取流程完成时间 - if(StepStatusEnum.contains(processDetailVO.getStepStatus(), - Lists.newArrayList(StepStatusEnum.REJECTED, - StepStatusEnum.COMPLETED))){ - ProgressNode progressNode = progressInfo.get(progressInfo.size() - 1); - LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(progressNode.getFinishTime()); + if (CollUtil.isNotEmpty(progressInfo)) { + buildUserUtils.buildUserByProcessInfo(progressInfo); + // 根据流程处理详情获取流程完成时间 + if (StepStatusEnum.contains(processDetailVO.getStepStatus(), + Lists.newArrayList(StepStatusEnum.REJECTED, + StepStatusEnum.COMPLETED))) { + ProgressNode progressNode = progressInfo.get(progressInfo.size() - 1); + LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(progressNode.getFinishTime()); + processDetailVO.setFinishTime(finishTime); + } + }else { + LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(instanceDetail.getStartTime()); processDetailVO.setFinishTime(finishTime); } processDetailVO.setProcessProgressVo(instanceDetail);