hfxc226 3 سال پیش
والد
کامیت
75996aa1c6

+ 34 - 0
platform-common/src/main/java/com/platform/common/util/DateUtils.java

@@ -465,6 +465,7 @@ public class DateUtils {
         System.out.println(time2);
         System.out.println(getDurationHoursStr(time, time2));
     }
+
     /**
      * date 转 LocalDate
      *
@@ -582,6 +583,39 @@ public class DateUtils {
         return list;
     }
 
+    public static List<LocalDate> currentWeekDate(){
+        List<LocalDate> list = new ArrayList<>();
+        LocalDate now = LocalDate.now();
+        for(int i=-6;i<0;i++){
+            list.add(now.plusDays(i));
+        }
+        list.add(now);
+        return list;
+    }
+
+    /**
+     * 获取某年,制定之前6天的开始
+     *
+     * @param now
+     * @return
+     */
+    public static LocalDateTime getSixDayAgoOfDay(LocalDateTime now) {
+        LocalDateTime sevenDay = now.plusDays(-6);
+        LocalDateTime ldt = sevenDay.withHour(0).withMinute(0).withSecond(0);
+        return ldt;
+    }
+
+    /**
+     * 获取指定天的最后一秒钟
+     *
+     * @param now
+     * @return
+     */
+    public static LocalDateTime getLastDayOfDay(LocalDateTime now) {
+        LocalDateTime ldt = now.withHour(23).withMinute(59).withSecond(59);
+        return ldt;
+    }
+
 
 }
 

+ 0 - 1
platform-dao/src/main/java/com/platform/dao/vo/sb/SbInfoWorkplaceLineVO.java

@@ -21,7 +21,6 @@ public class SbInfoWorkplaceLineVO extends BaseVO implements Serializable {
     /**
      * 周几(从今天开始往前一周)
      */
-
     private String day;
     /**
      * 维修单数量