Commit 09e7bc71 authored by 廖旭伟's avatar 廖旭伟

修改bug:请假重复审批通过导致冗余绩效异常信息

parent c825da52
......@@ -90,6 +90,29 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
*/
private static String LEAVE_REIDS_KEY = "attendance:leave:";
@Override
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() == entity.getAuditResult() && LeaveTypeEnum.事假.getValue() == entity.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
protected void updateAfter(AttendanceLeaveRecordEntity entity, Context context) throws AppException {
super.updateAfter(entity, context);
......@@ -101,7 +124,7 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
query.setSummaryTimeEnd(DateUtils.getStrDate(entity.getEndTime()));
cacheService.lpush(KEY_ATTENDANCE_STAT_CACHE, query);
}*/
creatPerformAttend(entity, context);
creatPerformAttend (entity, context);
doUpdateRecordAndSummary(entity, context);
}
......
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