Browse Source

请假时长 2

shiqian 3 năm trước cách đây
mục cha
commit
334523cf96

+ 3 - 1
boman-web-core/src/main/java/com/boman/web/core/utils/LeaveFromUtils.java

@@ -207,7 +207,9 @@ public class LeaveFromUtils {
             int dayOfEndTime = getDayFromTime(endTime);
             int days = dayOfEndTime - tomorrowStartTime;
 
-            if (days == 1) {
+            if (days == 0) {
+                return 0;
+            } else if (days == 1) {
                 startTime = amStart;
                 startTime = addDays(startTime, 1);
                 return calcTimes(startTime, endTime, getYearMonthDayFromTime(endTime), rule);