|
@@ -2059,6 +2059,11 @@ public class TimingTask {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+ int dayOfMonth = LocalDate.now().getDayOfMonth();
|
|
|
+ System.out.println(dayOfMonth);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 每天凌晨2:50同步前一天的北森考勤数据 暂时固定公司id(5978)针对景昱
|
|
|
* */
|
|
@@ -2071,8 +2076,19 @@ public class TimingTask {
|
|
|
DateTimeFormatter df1=DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
DateTimeFormatter df2=DateTimeFormatter.ofPattern("HH:mm");
|
|
|
DateTimeFormatter df3=DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
|
|
|
- String startDate=LocalDate.now().minusDays(1).format(df);
|
|
|
- String endDate=LocalDate.now().plusDays(1).format(df);
|
|
|
+ int dayOfMonth = LocalDate.now().getDayOfMonth();
|
|
|
+ String startDate;
|
|
|
+ String endDate;
|
|
|
+ if(dayOfMonth==8){
|
|
|
+ //每个月8号重新同步上个月数据以及当月至8号的数据
|
|
|
+ startDate=LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()).minusMonths(1).format(df);
|
|
|
+ endDate=LocalDate.now().with(TemporalAdjusters.lastDayOfMonth()).minusMonths(1).plusDays(8).format(df);
|
|
|
+ }else {
|
|
|
+ startDate=LocalDate.now().minusDays(3).format(df);
|
|
|
+ endDate=LocalDate.now().plusDays(1).format(df);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
List<User> userList = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getCompanyId, 5978));
|
|
|
List<UserWithBeisen> userWithBeisenList = userWithBeisenService.list(new LambdaQueryWrapper<UserWithBeisen>().eq(UserWithBeisen::getCompanyId, 5978));
|
|
|
BeisenConfig beisenConfig = beisenConfigMapper.selectById(5978);
|