Sfoglia il codice sorgente

智能日历调整

anderx 1 anno fa
parent
commit
1e2af709cc

+ 6 - 6
ruoyi-system/src/main/java/com/ruoyi/project/service/impl/ProjectStaffRecordServiceImpl.java

@@ -190,14 +190,14 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
 
         for (MyMonthDays myMonthDay : myMonthDays) {
             DateUtils.getWeeks(myMonthDay.getDates());
-//            status    0=未打卡,1=未满工时,2=满工时
-//             daystatus 0=正常,1=不属于打卡区间,2=未到时限,3=补班,4=法定节假日,5=周末
+//            status    0=未打卡,1=未满工时,2=满工时,3=未到时限
+//             daystatus 0=正常,1=不属于打卡区间,2=补班,3=法定节假日,4=周末
             pushLeaglHolidays(legalHolidays,myMonthDay);
             if (compareTo(projectTask.getStartTime(),myMonthDay.getDates(),0)||compareTo(projectTask.getEndTime(),myMonthDay.getDates(),1)){
                 myMonthDay.setDayStatus(1);
                 myMonthDay.setDuration("0");
             }else if (compareTo(date,myMonthDay.getDates())){
-                myMonthDay.setDayStatus(2);
+                myMonthDay.setStatus(3);
             }else if (myMonthDay.getDuration().equals("0")) {
                 myMonthDay.setStatus(0);
             }else if (new BigDecimal(myMonthDay.getDuration()).compareTo(maxDuration)<0){
@@ -212,7 +212,7 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
         String dates = myMonthDay.getDates();
         myMonthDay.setDayStatus(0);
         if (myMonthDay.getWeek()==0||myMonthDay.getWeek()==6){
-            myMonthDay.setDayStatus(5);
+            myMonthDay.setDayStatus(4);
         }
         List<HolidaysBo> boList=new ArrayList<>();
         for (LegalHolidays e : list) {
@@ -225,9 +225,9 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
         for (HolidaysBo e : boList) {
             if (dates.equals(e.getDays())){
                 if (e.getStatus()==1){
-                    myMonthDay.setDayStatus(4);
-                }else if (e.getStatus()==2) {
                     myMonthDay.setDayStatus(3);
+                }else if (e.getStatus()==2) {
+                    myMonthDay.setDayStatus(2);
                 }
             }
         }