This commit is contained in:
andy 2026-03-17 16:35:16 +08:00
parent 3e70da9fd9
commit 7393d00710

View File

@ -1,5 +1,6 @@
package com.evo.attendance.processor.impl;
import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.evo.attendance.domain.RzAttendance;
import com.evo.attendance.domain.RzAttendanceDetail;
@ -175,6 +176,7 @@ public class KQDeviceExchangeProcessor implements PunchTheClockStrategyExchangeP
//获取员工的工作时长
RzAttendanceDetail attendanceDetail = rzAttendanceDetailService.addDetail(attendance, rules, sn, date, "", photo);
if(attendanceDetail.getId() == null){
log.info("[打卡失败]============> 因为没有打卡详情id{}", JSON.toJSONString(attendanceDetail));
return initMessage(1, "打卡失败");
}
@ -202,10 +204,10 @@ public class KQDeviceExchangeProcessor implements PunchTheClockStrategyExchangeP
}
//上班的下班卡
if(rzAttendanceDetail.getButtonType().contains("上班")){
return KqUtils.workOffDutyCard( date, rzAttendanceDetail.getButtonType(), attendance) ? initMessage(0, "打卡成功") : initMessage(1,"打卡失败");
}
log.info("[打卡失败]============> 走到最后了, 打卡人姓名{}", sysStaff.getName());
return initMessage(1, "打卡失败");
}
@ -234,6 +236,8 @@ public class KQDeviceExchangeProcessor implements PunchTheClockStrategyExchangeP
attendance.setYcsFlag("1");
}
}catch (Exception e){
log.info("[打卡失败]============> 出现异常了, 异常原因{}", e.getMessage());
e.printStackTrace();
return initMessage(1, "打卡失败,"+e.getMessage());
}
//查询昨天是否未打卡
@ -249,6 +253,7 @@ public class KQDeviceExchangeProcessor implements PunchTheClockStrategyExchangeP
e.printStackTrace();
log.error("查询前一天的打卡情况报错了");
}
log.info("[打卡失败]============> 上班卡模块, 走到最后了, 不知道成功还是失败, 打卡人姓名{}", attendance.getName());
return (rzAttendanceMapper.updateRzAttendance(attendance) > 0) ? initMessage(0, "打卡成功"+notBeforeEndTimeMessage) : initMessage(1, "打卡失败"+notBeforeEndTimeMessage);
}
//