优化
This commit is contained in:
@ -26,9 +26,9 @@ public class WgzAppPunchTheCalendarRecordThree implements Serializable {
|
||||
@ApiModelProperty("打卡状态(0正常 1迟到 2早退 3上班缺卡 4下班缺卡 5上班补卡 6下班补卡 7请假)")
|
||||
private Integer clockingCondition;
|
||||
|
||||
// @ApiModelProperty("补卡自增ID")
|
||||
// private Integer clockingCondition;
|
||||
//
|
||||
// @ApiModelProperty("补卡状态")
|
||||
// private Integer clockingCondition;
|
||||
@ApiModelProperty("补卡自增ID")
|
||||
private Long reissueacardId;
|
||||
|
||||
@ApiModelProperty("补卡状态:0待审核 1审核中 2已同意 3已拒绝(拒绝情况下可以重新申请)")
|
||||
private String reissueacardStatus;
|
||||
}
|
||||
|
@ -566,6 +566,8 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
if (wa.getExceptionType().contains("5")) {
|
||||
sbb.setClockingCondition(5);
|
||||
}
|
||||
// 获取上班补卡信息
|
||||
setReissueacardInfo(sbb, wa, 0);
|
||||
}
|
||||
if (num == 2) {
|
||||
sbb.setClockingTime(wa.getClockOutTime());
|
||||
@ -577,10 +579,38 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
if (wa.getExceptionType().contains("6")) {
|
||||
sbb.setClockingCondition(6);
|
||||
}
|
||||
// 获取下班补卡信息
|
||||
setReissueacardInfo(sbb, wa, 1);
|
||||
}
|
||||
return sbb;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置补卡信息
|
||||
*
|
||||
* @param sbb 打卡记录对象
|
||||
* @param wa 打卡记录
|
||||
* @param type 补卡类型,0 表示上班,1 表示下班
|
||||
*/
|
||||
private void setReissueacardInfo(WgzAppPunchTheCalendarRecordThree sbb, WgzAttendance wa, int type) {
|
||||
// 查询补卡信息
|
||||
List<WgzReissueacard> list = iWgzReissueacardService.list(
|
||||
Wrappers.<WgzReissueacard>lambdaQuery()
|
||||
.eq(WgzReissueacard::getRecruitId, wa.getRecruitId())
|
||||
.eq(WgzReissueacard::getUserId, wa.getUserId())
|
||||
.eq(WgzReissueacard::getAttendanceId, wa.getId())
|
||||
.eq(WgzReissueacard::getType, type)
|
||||
.ne(WgzReissueacard::getAuditorOpinion, "3")
|
||||
.orderByDesc(WgzReissueacard::getId)
|
||||
);
|
||||
|
||||
// 如果查询到补卡信息,设置补卡 ID 和状态
|
||||
if (!list.isEmpty()) {
|
||||
sbb.setReissueacardId(list.get(0).getId());
|
||||
sbb.setReissueacardStatus(list.get(0).getAuditorType());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 补卡
|
||||
*
|
||||
@ -604,7 +634,8 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
eq(WgzReissueacard::getRecruitId, wgzAttendance.getRecruitId()).
|
||||
eq(WgzReissueacard::getUserId, wgzAttendance.getUserId()).
|
||||
eq(WgzReissueacard::getAttendanceId, wgzAttendance.getId()).
|
||||
eq(WgzReissueacard::getType, type == 1 || type == 3 ? 0 : 1)
|
||||
eq(WgzReissueacard::getType, type == 1 || type == 3 ? 0 : 1).
|
||||
ne(WgzReissueacard::getAuditorOpinion, "3")
|
||||
);
|
||||
if (count == 0){
|
||||
list.add(two);
|
||||
|
@ -240,7 +240,7 @@ public class WgzDailyClockServiceImpl extends ServicePlusImpl<WgzDailyClockMappe
|
||||
WgzDailyClock dc = new WgzDailyClock();
|
||||
BeanUtils.copyProperties(req,dc);
|
||||
dc.setStatus(req.getStatus());
|
||||
dc.setRecruitId(appUserId);
|
||||
dc.setRecruitId(appById.getId());
|
||||
dc.setUserId(appUserId);
|
||||
dc.setDilyTime(now);
|
||||
dc.setAuditorUserId(appById.getUserId());
|
||||
|
@ -174,7 +174,8 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
|
||||
setRecruitName(recruit.getRecruitName()).
|
||||
setRawTime(rawTime).
|
||||
setNowTime(req.getNowTime()).
|
||||
setReason(req.getReason());
|
||||
setReason(req.getReason()).
|
||||
setAuditorUserId(recruit.getUserId());
|
||||
int insert = baseMapper.insert(wgzReissueacard);
|
||||
//6、发送消息
|
||||
WgzUser byId = wgzUserService.findByUserId(appUserId);
|
||||
|
Reference in New Issue
Block a user