变更查看当前用户今日打卡返回实体
This commit is contained in:
@ -261,9 +261,9 @@ public class WgzAppController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 【考勤打卡】【打卡】 提交上下班打卡·查看当前用户的打卡状态(0上班 1下班 2请假)
|
||||
* 【考勤打卡】【打卡】 提交上下班打卡·查看当前用户的打卡状态
|
||||
*/
|
||||
@ApiOperation("【考勤打卡】【打卡】 提交上下班打卡·用户今日打卡状态(0上班 1下班 2请假)")
|
||||
@ApiOperation("【考勤打卡】【打卡】 提交上下班打卡·用户今日打卡状态")
|
||||
//@PreAuthorize("@ss.hasPermi('wgzApp:user:userClockingCondition')")
|
||||
@GetMapping("/WgzAppUserClockingCondition")
|
||||
public AjaxResult<WgzAppUserClockingConditionRes> userClockingCondition() {
|
||||
|
@ -15,4 +15,10 @@ import java.io.Serializable;
|
||||
public class WgzAppUserClockingConditionRes implements Serializable {
|
||||
@ApiModelProperty("务工者今日打卡状态:0上班 1下班 2请假 3已完成")
|
||||
private Integer clockingCondition;
|
||||
|
||||
@ApiModelProperty("上班状态:0正常 1迟到 2缺卡 3补卡 4请假")
|
||||
private Integer in;
|
||||
|
||||
@ApiModelProperty("下班状态:0正常 1早退 2缺卡 3补卡 4请假")
|
||||
private Integer out;
|
||||
}
|
||||
|
@ -241,14 +241,43 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
res.setClockingCondition(0); //上班
|
||||
}else{
|
||||
res.setClockingCondition(1); //下班
|
||||
//上下班都打卡了就是已完成
|
||||
if (wgzAttendance.getClockInTime()!=null && wgzAttendance.getClockOutTime()!=null){
|
||||
if (wgzAttendance.getLeaveMarkId() == null && wgzAttendance.getClockInTime()!=null && wgzAttendance.getClockOutTime()!=null){
|
||||
res.setClockingCondition(3); //已完成
|
||||
}
|
||||
if (wgzAttendance.getLeaveMarkId()!= null && wgzAttendance.getLeaveMarkId()!= 0) {
|
||||
if (wgzAttendance.getLeaveMarkId() != null && wgzAttendance.getLeaveMarkId()!= 0) {
|
||||
res.setClockingCondition(2); //请假
|
||||
}
|
||||
}
|
||||
//3、获取上下班状态
|
||||
if (wgzAttendance!= null) {
|
||||
String exceptionType = wgzAttendance.getExceptionType();
|
||||
if (exceptionType.contains("0")) {
|
||||
res.setIn(0);
|
||||
res.setOut(0);
|
||||
}
|
||||
if (exceptionType.contains("1")) {
|
||||
res.setIn(1);
|
||||
}
|
||||
if (exceptionType.contains("2")) {
|
||||
res.setOut(1);
|
||||
}
|
||||
if (exceptionType.contains("3")) {
|
||||
res.setIn(2);
|
||||
}
|
||||
if (exceptionType.contains("4")) {
|
||||
res.setOut(2);
|
||||
}
|
||||
if (exceptionType.contains("5")) {
|
||||
res.setIn(3);
|
||||
}
|
||||
if (exceptionType.contains("6")) {
|
||||
res.setOut(3);
|
||||
}
|
||||
if (exceptionType.contains("7")) {
|
||||
res.setIn(4);
|
||||
res.setOut(4);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user