Commit 4c0adf10 authored by 廖旭伟's avatar 廖旭伟

避免钉钉同步请假审批数据时重复生成考勤绩效

parent 61124e3e
......@@ -21,6 +21,7 @@ import com.mortals.xhx.module.attendance.service.AttendanceRecordHikService;
import com.mortals.xhx.module.attendance.service.AttendanceStatService;
import com.mortals.xhx.module.dingding.personal.service.IDingPersonService;
import com.mortals.xhx.module.perform.model.PerformAttendRecordEntity;
import com.mortals.xhx.module.perform.model.PerformAttendRecordQuery;
import com.mortals.xhx.module.perform.model.PerformRulesEntity;
import com.mortals.xhx.module.perform.model.PerformRulesQuery;
import com.mortals.xhx.module.perform.service.PerformAttendRecordService;
......@@ -230,7 +231,14 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
recordEntity.setCreateUserId(1l);
recordEntity.setErrorTime(entity.getStartTime());
recordEntity.setScore(recordEntity.getScore().multiply(new BigDecimal(multiple)));
performAttendRecordService.save(recordEntity, context);
PerformAttendRecordQuery query = new PerformAttendRecordQuery();
query.setStaffId(recordEntity.getStaffId());
query.setRuleId(recordEntity.getRuleId());
query.setErrorTime(recordEntity.getErrorTime());
PerformAttendRecordEntity temp = performAttendRecordService.selectOne(query);
if(temp==null) {
performAttendRecordService.save(recordEntity, context);
}
}
}
}catch (Exception e){
......
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