Commit 2d03d50e authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents dd42110a a998bb09
......@@ -91,18 +91,26 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
private static String LEAVE_REIDS_KEY = "attendance:leave:";
@Override
protected void updateAfter(AttendanceLeaveRecordEntity entity, Context context) throws AppException {
super.updateAfter(entity, context);
/* //context!=null时表示页面调用的修改,自动执行处理任务调用时context为null,无需立即汇总
if (entity.getAuditResult() == 1 && context != null) {
AttendanceSummaryQuery query = new AttendanceSummaryQuery();
query.setStaffId(entity.getLeavePersonId());
query.setSummaryTimeStart(DateUtils.getStrDate(entity.getStartTime()));
query.setSummaryTimeEnd(DateUtils.getStrDate(entity.getEndTime()));
cacheService.lpush(KEY_ATTENDANCE_STAT_CACHE, query);
}*/
creatPerformAttend(entity, context);
doUpdateRecordAndSummary(entity, context);
public AttendanceLeaveRecordEntity update(AttendanceLeaveRecordEntity entity, Context context) throws AppException {
this.updateBefore(entity, context);
boolean doPerformAttend = true;
AttendanceLeaveRecordEntity temp = this.get(entity.getId());
if(temp!=null){
if(AppealResultEnum.通过.getValue() == temp.getAuditResult() && LeaveTypeEnum.事假.getValue() == temp.getLeaveType()){
doPerformAttend = false;
}
}
int iRet = this.dao.update(entity);
if (iRet == 0) {
throw new AppException(-1002, "更新失败!");
} else {
super.updateAfter(entity, context);
if(doPerformAttend) {
creatPerformAttend(entity, context);
}
doUpdateRecordAndSummary(entity, context);
return entity;
}
}
@Override
......
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