From 62798752c1fd2672d7ad9b3c0c2135a0b6ad046c Mon Sep 17 00:00:00 2001 From: buaixuexideshitongxue <2936013465@qq.com> Date: Thu, 9 Apr 2026 15:17:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=AE=A4=E5=AE=9A=E5=8A=9E=E7=BB=93?= =?UTF-8?q?=E6=97=B6=E5=8C=BA=E5=88=86=E5=B8=82=E5=B1=80=E5=92=8C=E5=88=86?= =?UTF-8?q?=E5=B1=80=E8=AE=A4=E5=AE=9A=E8=AE=B0=E5=BD=95=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flow/action/ConfirmationCompletionAction.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/biutag/supervision/flow/action/ConfirmationCompletionAction.java b/src/main/java/com/biutag/supervision/flow/action/ConfirmationCompletionAction.java index eb8a468..0d33468 100644 --- a/src/main/java/com/biutag/supervision/flow/action/ConfirmationCompletionAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/ConfirmationCompletionAction.java @@ -105,6 +105,10 @@ public class ConfirmationCompletionAction implements Action { if (negative.getLatestProcessTime() != null) { firstApproveTime = firstApproveTime + TimeUtil.calculateWorkdayDuration(negative.getLatestProcessTime(), now); } + Long secondApprovalTime = negative.getSecondApprovalTime() == null ? 0L : negative.getSecondApprovalTime(); + if (negative.getLatestProcessTime() != null) { + secondApprovalTime = secondApprovalTime + TimeUtil.calculateWorkdayDuration(negative.getLatestProcessTime(), now); + } LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper() .eq(Negative::getId, negativeId) .set(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()) @@ -114,8 +118,13 @@ public class ConfirmationCompletionAction implements Action { .set(StrUtil.isNotEmpty(completionData.getReportId()),Negative::getReportId,completionData.getReportId()) .set(StrUtil.isNotEmpty(completionData.getReportNumber()),Negative::getReportNumber,completionData.getReportNumber()) .set(Negative::getFlowKey, FlowNodeEnum.COMPLETED.getKey()) - .set(Negative::getUpdTime, LocalDateTime.now()) - .set(Negative::getFirstApproveTime, firstApproveTime); + .set(Negative::getUpdTime, LocalDateTime.now()); + if ("2".equals(negative.getApprovalFlow())){ + updateWrapper.set(Negative::getSecondApprovalTime, secondApprovalTime); + } + if ("3".equals(negative.getApprovalFlow())){ + updateWrapper.set(Negative::getFirstApproveTime, firstApproveTime); + } negativeService.update(updateWrapper); } public void doneWork(Integer workId, String negativeId) {