|
@@ -1,5 +1,6 @@
|
|
package org.fouram.service;
|
|
package org.fouram.service;
|
|
|
|
|
|
|
|
+import org.fouram.core.util.DateUtil;
|
|
import org.fouram.core.util.LoggerUtil;
|
|
import org.fouram.core.util.LoggerUtil;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -23,23 +24,25 @@ public class CheckTaskService {
|
|
private SapApprovalInfoService sapApprovalInfoService;
|
|
private SapApprovalInfoService sapApprovalInfoService;
|
|
|
|
|
|
public void executeBiz(String checkinDay) {
|
|
public void executeBiz(String checkinDay) {
|
|
- String startDay = checkinDay;
|
|
|
|
- String endDay = checkinDay;
|
|
|
|
- try {
|
|
|
|
- wxDepartService.saveDeparts();
|
|
|
|
- wxUserService.saveUsers();
|
|
|
|
- sapCheckService.saveCheckInOffOuts(startDay, endDay);
|
|
|
|
- // 判断打卡记录小于10条记录认为是假期
|
|
|
|
- if(sapCheckService.queryCheckInTotal() < 10) {
|
|
|
|
- return;
|
|
|
|
|
|
+ if(DateUtil.getHour().equals("10") || DateUtil.getHour().equals("20")) {
|
|
|
|
+ String startDay = checkinDay;
|
|
|
|
+ String endDay = checkinDay;
|
|
|
|
+ try {
|
|
|
|
+ wxDepartService.saveDeparts();
|
|
|
|
+ wxUserService.saveUsers();
|
|
|
|
+ sapCheckService.saveCheckInOffOuts(startDay, endDay);
|
|
|
|
+ // 判断打卡记录小于10条记录认为是假期
|
|
|
|
+ if(sapCheckService.queryCheckInTotal() < 10) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ sapCheckdateService.saveCheckout(startDay);
|
|
|
|
+ employeeTimeService.saveEmployeeTimes();
|
|
|
|
+ sapCheckOptionService.saveOptions(endDay);
|
|
|
|
+ sapApprovalInfoService.saveApprovalInfos(endDay.substring(0, 7));
|
|
|
|
+ sapCheckService.saveReportResultData(startDay, endDay);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ LoggerUtil.error(e);
|
|
}
|
|
}
|
|
- sapCheckdateService.saveCheckout(startDay);
|
|
|
|
- employeeTimeService.saveEmployeeTimes();
|
|
|
|
- sapCheckOptionService.saveOptions(endDay);
|
|
|
|
- sapApprovalInfoService.saveApprovalInfos(endDay.substring(0, 7));
|
|
|
|
- sapCheckService.saveReportResultData(startDay, endDay);
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- LoggerUtil.error(e);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|