变更查看当前用户今日打卡返回实体
This commit is contained in:
		@ -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