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"