From a9f19c1bb1f2bf5aa6593ae66687c87d02686c3c Mon Sep 17 00:00:00 2001 From: wxc <191104855@qq.com> Date: Fri, 22 Mar 2024 18:18:30 +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/vo/MailVo.java | 5 +++++ .../src/main/java/com/biutag/lan/service/MailService.java | 5 ++++- .../com/biutag/lan/service/impl/HolidayServiceImpl.java | 4 ++-- .../src/main/resources/mapper/DataScreenMapper.xml | 8 ++++---- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java index e458560..80374b5 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java @@ -272,6 +272,11 @@ public class MailVo { */ private Integer extensionDays; + /** + * 是否申请延期 + */ + private Boolean extensionFlag; + /** * 延期理由 */ diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java b/mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java index 9b597af..4934902 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java @@ -142,7 +142,10 @@ public class MailService extends ServiceImpl { FlowNode flowNode = flow.getFlowNode(); int limitedTime = flowNode.getLimitedTime().intValue(); // 剩余时间 - long flowRemainingTime = holidayService.getFlowRemainingTime(limitedTime, mail.getFlowLimitedLastHandlerTime(), mail.getExtensionFlag(), mail.getExtensionDays()); + long flowRemainingTime = holidayService.getFlowRemainingTime(limitedTime, + FlowNodeEnum.lessInterviewWriter(mail.getFlowKey()) ? mail.getFlowLimitedLastHandlerTime(): mail.getMailTime(), + mail.getExtensionFlag(), + mail.getExtensionDays()); if (Objects.nonNull(mail.getExtensionFlag()) && mail.getExtensionFlag()) { limitedTime += mail.getExtensionDays() * 86400; } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/impl/HolidayServiceImpl.java b/mailbox-lan/src/main/java/com/biutag/lan/service/impl/HolidayServiceImpl.java index bc42178..378a71e 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/impl/HolidayServiceImpl.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/impl/HolidayServiceImpl.java @@ -177,9 +177,9 @@ public class HolidayServiceImpl implements IHolidayService { } List list = list(dates); long holidays = list.stream().filter(item -> item.getHolidayFlag().equals(AppConstants.YES) && !item.getDate().equals(nowDate)).count(); - long todaySeconds = list.stream().anyMatch(item -> item.getHolidayFlag().equals(AppConstants.YES) && item.getDate().equals(nowDate)) ? 0 : + long todaySeconds = list.stream().anyMatch(item -> item.getHolidayFlag().equals(AppConstants.YES) && item.getDate().equals(nowDate)) ? // 当天的时间差 - Duration.between(now, now.toLocalDate().atStartOfDay()).getSeconds(); + Duration.between(now, now.toLocalDate().atStartOfDay()).getSeconds() : 0; limitedTime += 86400 * holidays + todaySeconds; return limitedTime - Duration.between(flowLimitedLastHandlerTime, LocalDateTime.now()).getSeconds(); } diff --git a/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml b/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml index b180641..c5e4555 100644 --- a/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml +++ b/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml @@ -41,10 +41,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"