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; } }