From 008b449b16a48380294801f25716a03ed2ddab3b Mon Sep 17 00:00:00 2001 From: XaoLi717 <144221124+XaoLi717@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:00:08 +0800 Subject: [PATCH] =?UTF-8?q?getWorkDay=E6=8E=A5=E5=8F=A3=E5=A4=A9=E6=95=B0?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/home/service/calendar/CalendarServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yudao-module-home/yudao-module-home-biz/src/main/java/cn/iocoder/yudao/module/home/service/calendar/CalendarServiceImpl.java b/yudao-module-home/yudao-module-home-biz/src/main/java/cn/iocoder/yudao/module/home/service/calendar/CalendarServiceImpl.java index 4906789..0e8f210 100644 --- a/yudao-module-home/yudao-module-home-biz/src/main/java/cn/iocoder/yudao/module/home/service/calendar/CalendarServiceImpl.java +++ b/yudao-module-home/yudao-module-home-biz/src/main/java/cn/iocoder/yudao/module/home/service/calendar/CalendarServiceImpl.java @@ -192,9 +192,9 @@ public class CalendarServiceImpl implements CalendarService { // 判断开始天为工作日时才判断 if (sTotal > 0) { // 开始日期的时间判断 - if (sHour >= 7 && sHour <= 17) { + if (sHour > 8 && (sHour - 8) == 4) { day += 0.5F; - } else if (sHour >= 17) { + } else if (sHour > 8&&(sHour - 8) > 4) { day += 1F; } } @@ -202,9 +202,9 @@ public class CalendarServiceImpl implements CalendarService { // 判断结束天为工作日时才判断 if (eTotal > 0) { // 结束日期的时间判断 - if (eHour <= 7) { + if (sHour >= 0&&eHour<8) { day += 1F; - } else if (eHour <= 17) { + } else if (sHour > 8 && (eHour - 8) <= 4) { day += 0.5F; } }