Commit 5fbc87f8 authored by 赵啸非's avatar 赵啸非

添加请假等异常考勤计算

parent 432fd2bf
......@@ -47,8 +47,6 @@ import java.util.stream.Collectors;
@Slf4j
public class AttendanceRecordHikServiceImpl extends AbstractCRUDServiceImpl<AttendanceRecordHikDao, AttendanceRecordHikEntity, Long> implements AttendanceRecordHikService {
@Autowired
private DeptService deptService;
@Autowired
private AttendanceRecordService attendanceRecordService;
@Autowired
......@@ -58,10 +56,6 @@ public class AttendanceRecordHikServiceImpl extends AbstractCRUDServiceImpl<Atte
@Autowired
private AttendanceGroupService attendanceGroupService;
@Autowired
private AttendanceGroupFixedworkService attendanceGroupFixedworkService;
@Autowired
private AttendanceClassService attendanceClassService;
@Autowired
private AttendanceClassDetailService attendanceClassDetailService;
@Autowired
private StaffService staffService;
......@@ -138,7 +132,6 @@ public class AttendanceRecordHikServiceImpl extends AbstractCRUDServiceImpl<Atte
public void addAttendanceOtherRecordList(List<AttendanceRecordHikEntity> hikEntityList, Context context) throws Exception {
List<AttendanceRecordHikEntity> collect = hikEntityList.stream().sorted(Comparator.comparing(AttendanceRecordHikEntity::getAttendanceDate)).collect(Collectors.toList());
Map<Long, List<AttendanceRecordHikEntity>> listMap = collect.stream().collect(Collectors.groupingBy(AttendanceRecordHikEntity::getStaffId));
List<AttendanceRecordEntity> saveList = new ArrayList<>();
List<AttendanceRecordEntity> updateList = new ArrayList<>();
......@@ -275,14 +268,20 @@ public class AttendanceRecordHikServiceImpl extends AbstractCRUDServiceImpl<Atte
}
if (!ObjectUtils.isEmpty(saveList)) {
attendanceRecordService.save(saveList, context);
for (AttendanceRecordEntity attendanceRecordEntity : saveList) {
attendanceRecordService.save(attendanceRecordEntity, context);
}
//attendanceRecordService.save(saveList, context);
}
if (!ObjectUtils.isEmpty(updateList)) {
List<List<AttendanceRecordEntity>> partition = ListUtil.partition(updateList, 30);
for (AttendanceRecordEntity attendanceRecordEntity : updateList) {
attendanceRecordService.update(attendanceRecordEntity, context);
}
/* List<List<AttendanceRecordEntity>> partition = ListUtil.partition(updateList, 30);
for (List<AttendanceRecordEntity> attendanceRecordEntities : partition) {
attendanceRecordService.update(attendanceRecordEntities, context);
}
}*/
}
}
......
......@@ -421,6 +421,7 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
errorEntity.setErrorStatus(ErrorStatusEnum.缺卡.getValue());
errorEntity.setActualAttendanceDateTime(null);
}
errorEntity.setProcessResult(errorEntity.getErrorStatus().toString());
errorEntityList.add(errorEntity);
}
//判断下班
......@@ -451,6 +452,9 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
if (OffWorkResultEnum.迟到.getValue() == recordDetailEntity.getOffWorkResult()) {
errorEntity.setErrorStatus(ErrorStatusEnum.迟到.getValue());
}
errorEntity.setProcessResult(errorEntity.getErrorStatus().toString());
errorEntityList.add(errorEntity);
}
}
......
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