From aa0254aa12fca134350f0b8c4e97c346e14e7942 Mon Sep 17 00:00:00 2001 From: wxc <191104855@qq.com> Date: Mon, 4 Mar 2024 20:31:41 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/biutag/lan/domain/MailReturn.java | 8 +++++++- .../java/com/biutag/lan/flow/node/CountersignFlow.java | 3 ++- .../java/com/biutag/lan/flow/node/FirstApprovalFlow.java | 1 - .../src/main/java/com/biutag/outer/OuterApplication.java | 2 ++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/MailReturn.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/MailReturn.java index 5b56cc8..6028352 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/domain/MailReturn.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/MailReturn.java @@ -15,14 +15,17 @@ public class MailReturn { @TableId(type = IdType.AUTO) private Integer id; + /** * */ private String mailId; + /** * 退回原因 */ private String reason; + /** * */ @@ -37,12 +40,15 @@ public class MailReturn { * */ private Integer handlerDeptId; + /** * */ private String handlerDeptName; + /** * */ private LocalDateTime createTime; -} + +} \ No newline at end of file diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/CountersignFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/CountersignFlow.java index a4036d2..3437753 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/CountersignFlow.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/CountersignFlow.java @@ -11,6 +11,7 @@ import org.springframework.stereotype.Component; import org.springframework.util.Assert; import java.time.LocalDateTime; +import java.util.Comparator; import java.util.List; import java.util.Optional; @@ -53,7 +54,7 @@ public class CountersignFlow extends Flow { return null; } List mailFlows = mailFlowService.list(mailId); - MailFlow mailFlow = mailFlows.stream().filter(item -> item.getFlowAfterName().equals("发起会签")).findFirst().get(); + MailFlow mailFlow = mailFlows.stream().sorted(Comparator.comparing(MailFlow::getCreateTime).reversed()).filter(item -> item.getFlowAfterName().equals("发起会签")).findFirst().get(); List flowNodes = flowNodeService.list(); String flowBeforeName = flowNodes.stream().filter(item -> item.getKey().equals(mailFlow.getFlowKey())).findFirst().map(FlowNode::getBeforeName).get(); // 会签完成 diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java index 7f7d459..49f4349 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java @@ -95,7 +95,6 @@ public class FirstApprovalFlow extends Flow { public Flow mailReturn(String mailId, JSONObject data) { LocalDateTime now = LocalDateTime.now(); String returnOperate = data.getString("returnOperate"); - Assert.hasText(returnOperate, "参数错误"); String reason = data.getString("reason"); Assert.hasText(reason, "参数错误"); Mail mail = mailService.getById(mailId); diff --git a/mailbox-outer/src/main/java/com/biutag/outer/OuterApplication.java b/mailbox-outer/src/main/java/com/biutag/outer/OuterApplication.java index b549e5e..b9d7072 100644 --- a/mailbox-outer/src/main/java/com/biutag/outer/OuterApplication.java +++ b/mailbox-outer/src/main/java/com/biutag/outer/OuterApplication.java @@ -3,7 +3,9 @@ package com.biutag.outer; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration; +import org.springframework.scheduling.annotation.EnableScheduling; +@EnableScheduling @SpringBootApplication(exclude = {RedisRepositoriesAutoConfiguration.class}) public class OuterApplication {