Commit d13bd537 authored by 廖旭伟's avatar 廖旭伟

考勤汇总任务执行前清理不在考勤组的考勤汇总数据

parent 6283fa65
......@@ -34,7 +34,8 @@ public class AttendanceSummaryTaskImpl implements ITaskExcuteService {
private ICacheService cacheService;
@Autowired
private AttendanceRecordErrorService attendanceRecordErrorService;
@Autowired
private AttendanceStatService attendanceStatService;
@Override
public void excuteTask(ITask task) throws AppException {
......@@ -43,6 +44,10 @@ public class AttendanceSummaryTaskImpl implements ITaskExcuteService {
now.setTime(new Date());
now.add(Calendar.DAY_OF_MONTH, -1); //默认查前一天数据
// attendanceRecordErrorService.doAutoProcess(now.getTime());
//删除当月不在考勤组的考勤汇总数据
int year = now.get(Calendar.YEAR);
int month = now.get(Calendar.MONTH) + 1;
attendanceStatService.removeNotInGroupStaff(year,month);
AttendanceSummaryQuery query = new AttendanceSummaryQuery();
query.setSummaryTimeEnd(DateUtils.getStrDate(now.getTime()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment