新金湾,新考勤bug修复
This commit is contained in:
parent
10d2b693b2
commit
c70dcc5562
@ -206,25 +206,23 @@ public class WorkerDailyAttendanceStatisticsV2ServiceImpl extends ServiceImpl<Wo
|
||||
Optional<CalAttendanceBo> nextDayMin = allAttendances.stream().filter(o -> DateUtil.isSameDay(DateUtil.offsetDay(date, 1), o.getDate())).min(Comparator.comparing(CalAttendanceBo::getDate));
|
||||
if (Objects.equals(hourOvernightType, 1)) {
|
||||
//跨夜工时按零点结算到前后两天
|
||||
if (beforeDayMax.isPresent() && dayMin.isPresent() && beforeDayMax.get().getPassType() == 1 && beforeDayMax.get().getPassType() == 2) {
|
||||
if (beforeDayMax.isPresent() && dayMin.isPresent() && beforeDayMax.get().getPassType() == 1 && dayMin.get().getPassType() == 2) {
|
||||
//补date零点进
|
||||
attendances.add(new CalAttendanceBo(personSn, DateUtil.beginOfDay(date), 1));
|
||||
}
|
||||
attendances.addAll(allAttendances.stream().filter(o -> DateUtil.isSameDay(date, o.getDate())).collect(Collectors.toList()));
|
||||
if (dayMax.isPresent() && nextDayMin.isPresent() && dayMax.get().getPassType() == 2 && nextDayMin.get().getPassType() == 1) {
|
||||
if (dayMax.isPresent() && nextDayMin.isPresent() && dayMax.get().getPassType() == 1 && nextDayMin.get().getPassType() == 2) {
|
||||
//补date最后出
|
||||
attendances.add(new CalAttendanceBo(personSn, DateUtil.endOfDay(date), 2));
|
||||
}
|
||||
} else if (Objects.equals(hourOvernightType, 2)) {
|
||||
//跨夜工时结算到前一天
|
||||
attendances.addAll(allAttendances.stream().filter(o -> DateUtil.isSameDay(date, o.getDate())).collect(Collectors.toList()));
|
||||
if (dayMax.isPresent() && nextDayMin.isPresent()) {
|
||||
if (dayMax.get().getPassType() == 1 && nextDayMin.get().getPassType() == 2) {
|
||||
if (dayMax.isPresent() && nextDayMin.isPresent() && dayMax.get().getPassType() == 1 && nextDayMin.get().getPassType() == 2) {
|
||||
attendances.add(new CalAttendanceBo(personSn, DateUtil.endOfDay(date), 2));
|
||||
attendances.add(new CalAttendanceBo(personSn, DateUtil.beginOfDay(DateUtil.offsetDay(date, 1)), 1));
|
||||
attendances.add(new CalAttendanceBo(personSn, nextDayMin.get().getDate(), 2));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//不做跨夜结算
|
||||
attendances.addAll(allAttendances.stream().filter(o -> DateUtil.isSameDay(date, o.getDate())).collect(Collectors.toList()));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user