|
@@ -327,6 +327,10 @@ public class AttendanceSheetServiceImpl implements AttendanceSheetService {
|
|
|
@NotNull
|
|
|
private AttendanceSheetDO getAttendanceMorningSheetDO(LocalTime normalTimeAm, LocalTime lateFlag, LocalTime finishAmFlag, String username, AttendanceRecordDO firstRecord, AdminUserRespDTO user, int year, int month, int day) {
|
|
|
AttendanceSheetDO morningSheetDO;
|
|
|
+ if(!user.getAttendanceFlag()){
|
|
|
+ morningSheetDO = buildAttendanceSheet(user, username, firstRecord, ATTENDANCE_STATUS_NORMAL, ATTENDANCE_TYPE_AM, null, year, month, day);
|
|
|
+ return morningSheetDO;
|
|
|
+ }
|
|
|
//第一次打卡时间在上班时间+不计入迟到时间之前
|
|
|
if ((firstRecord.getStrutime().toLocalTime().compareTo(lateFlag)) <= 0) {
|
|
|
morningSheetDO = buildAttendanceSheet(user, username, firstRecord, ATTENDANCE_STATUS_NORMAL, ATTENDANCE_TYPE_AM, null, year, month, day);
|
|
@@ -578,6 +582,10 @@ public class AttendanceSheetServiceImpl implements AttendanceSheetService {
|
|
|
@NotNull
|
|
|
private AttendanceSheetDO getAttendanceAfternoonSheetDO(LocalTime normalTimePm, LocalTime finishPmFlag, String username, AttendanceRecordDO lastRecord, AdminUserRespDTO user, int year, int month, int day) {
|
|
|
AttendanceSheetDO afternoonSheetDO;
|
|
|
+ if(!user.getAttendanceFlag()){
|
|
|
+ afternoonSheetDO = buildAttendanceSheet(user, username, lastRecord, ATTENDANCE_STATUS_NORMAL, ATTENDANCE_TYPE_PM, null, year, month, day);
|
|
|
+ return afternoonSheetDO;
|
|
|
+ }
|
|
|
//最后一次打卡时间在下午上班时间之前算旷工
|
|
|
if ((lastRecord.getStrutime().toLocalTime().compareTo(normalTimePm)) < 0) {
|
|
|
afternoonSheetDO = buildAttendanceSheet(user, username, lastRecord, ATTENDANCE_STATUS_ABSENT, ATTENDANCE_TYPE_PM, 270, year, month, day);
|