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

修改bug:考勤统计->异常处理,页面处理会生成重复的绩效考勤核查数据

parent 98e5de57
package com.mortals.xhx.module.attendance.service.impl;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.ThreadPool;
import com.mortals.xhx.common.utils.AttendSummaryThread;
......@@ -12,6 +13,9 @@ import com.mortals.framework.model.Context;
import com.mortals.xhx.module.attendance.dao.AttendanceLeaveRecordDao;
import com.mortals.xhx.module.attendance.model.AttendanceLeaveRecordEntity;
import com.mortals.xhx.module.attendance.service.AttendanceLeaveRecordService;
import static com.mortals.xhx.common.key.RedisKey.KEY_ATTENDANCE_STAT_CACHE;
/**
* AttendanceLeaveRecordService
* 请假记录信息 service实现
......@@ -24,6 +28,8 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
@Autowired
private AttendanceStatService attendanceStatService;
@Autowired
private ICacheService cacheService;
@Override
protected void updateAfter(AttendanceLeaveRecordEntity entity, Context context) throws AppException {
......@@ -33,8 +39,7 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
query.setStaffId(entity.getLeavePersonId());
query.setSummaryTimeStart(DateUtils.getStrDate(entity.getStartTime()));
query.setSummaryTimeEnd(DateUtils.getStrDate(entity.getEndTime()));
AttendSummaryThread summaryThread = new AttendSummaryThread(attendanceStatService, query);
ThreadPool.getInstance().execute(summaryThread);
cacheService.lpush(KEY_ATTENDANCE_STAT_CACHE,query);
}
}
......
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