Commit 294bdfc7 authored by 赵啸非's avatar 赵啸非

整理代码

parent 122588ea
...@@ -465,16 +465,18 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract { ...@@ -465,16 +465,18 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
private void deleteErrorRecordCache(Long staffId, Context context) { private void deleteErrorRecordCache(Long staffId, Context context) {
//删除当前员工当日未处理的异常后,重新添加 //删除当前员工当日未处理的异常后,重新添加
List<AttendanceRecordErrorEntity> attendanceRecordErrorEntities = commonData.getErrorGroupStaffMap().get(staffId); List<AttendanceRecordErrorEntity> attendanceRecordErrorEntities = commonData.getErrorGroupStaffMap().get(staffId);
Long[] errorIds = attendanceRecordErrorEntities.stream() if (!ObjectUtils.isEmpty(attendanceRecordErrorEntities)) {
.filter(f -> YesNoEnum.NO.getValue() == f.getProcessStatus()) Long[] errorIds = attendanceRecordErrorEntities.stream()
.map(i -> i.getId()).toArray(Long[]::new); .filter(f -> YesNoEnum.NO.getValue() == f.getProcessStatus())
if (!ObjectUtils.isEmpty(errorIds)) { .map(i -> i.getId()).toArray(Long[]::new);
//log.info("删除 {} 人员:{} 异常记录:{}",dateStr,staffId, JSON.toJSONString(attendanceRecordErrorEntities)); if (!ObjectUtils.isEmpty(errorIds)) {
StopWatch stopWatch = new StopWatch(); //log.info("删除 {} 人员:{} 异常记录:{}",dateStr,staffId, JSON.toJSONString(attendanceRecordErrorEntities));
stopWatch.start("删除异常记录耗时"); StopWatch stopWatch = new StopWatch();
errorService.remove(errorIds, context); stopWatch.start("删除异常记录耗时");
stopWatch.stop(); errorService.remove(errorIds, context);
log.info("删除异常记录耗时:{}ms", stopWatch.getLastTaskTimeMillis()); stopWatch.stop();
log.info("删除异常记录耗时:{}ms", stopWatch.getLastTaskTimeMillis());
}
} }
} }
......
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