3.13优化版本
This commit is contained in:
@ -41,7 +41,10 @@ public class WgzAppUserReplacementCardRecordDetailsRes implements Serializable {
|
||||
private String recruitName;
|
||||
|
||||
@ApiModelProperty("原打卡时间")
|
||||
private String rawTime;
|
||||
private LocalDateTime rawTime;
|
||||
|
||||
@ApiModelProperty("星期")
|
||||
private String week;
|
||||
|
||||
@ApiModelProperty("现补卡时间")
|
||||
private LocalDateTime nowTime;
|
||||
@ -69,7 +72,6 @@ public class WgzAppUserReplacementCardRecordDetailsRes implements Serializable {
|
||||
@ApiModelProperty("同意|拒绝时间")
|
||||
private LocalDateTime auditorTime;
|
||||
|
||||
|
||||
@ApiModelProperty("创建时间|申请时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class WgzReissueacard implements Serializable {
|
||||
/** 原打卡时间 */
|
||||
@Excel(name = "原打卡时间")
|
||||
@ApiModelProperty("原打卡时间")
|
||||
private String rawTime;
|
||||
private LocalDateTime rawTime;
|
||||
|
||||
/** 现补卡时间 */
|
||||
@Excel(name = "现补卡时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
|
@ -330,7 +330,7 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
//下班
|
||||
if (wa.getClockOutTime() != null || wa.getMissedOut()== 1) {
|
||||
two.setNum(2);
|
||||
if (wa.getClockOutTime() != null && wa.getClockOutTime() != null ) {
|
||||
if (wa.getClockInTime() != null && wa.getClockOutTime() != null ) {
|
||||
two.setManHour(calculateWorkingHours(wa.getClockInTime(), wa.getClockOutTime()));
|
||||
}
|
||||
two.setXb(sbOrXb(wa, 2));
|
||||
@ -381,10 +381,12 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
addRecord(wgzAttendance, 2, wgzAttendance.getClockOutTime(), list);
|
||||
}
|
||||
if (exceptionType.contains("3")) { // 上班缺卡
|
||||
addRecord(wgzAttendance, 3, LocalDateTime.from(appById.getBeginWorkTime()), list);
|
||||
LocalDateTime dateTime = LocalDateTime.of(LocalDate.now(), appById.getBeginWorkTime());
|
||||
addRecord(wgzAttendance, 3,dateTime, list);
|
||||
}
|
||||
if (exceptionType.contains("4")) { // 下班缺卡
|
||||
addRecord(wgzAttendance, 4, LocalDateTime.from(appById.getEndWorkTime()), list);
|
||||
LocalDateTime dateTime = LocalDateTime.of(LocalDate.now(), appById.getEndWorkTime());
|
||||
addRecord(wgzAttendance, 4, dateTime, list);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -667,14 +669,14 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
|
||||
.setFillingData(date)
|
||||
.setWeek(chineseWeekday)
|
||||
.setFillingDataTime(fillingDataTime);
|
||||
//判断当前数据是否存在在补卡申请表中,不存在责添加到列表中
|
||||
//判断当前数据是否存在在补卡申请表中,不存在则添加到列表中
|
||||
int count = iWgzReissueacardService.count(
|
||||
Wrappers.<WgzReissueacard>lambdaQuery().
|
||||
eq(WgzReissueacard::getRecruitId, wgzAttendance.getRecruitId()).
|
||||
eq(WgzReissueacard::getUserId, wgzAttendance.getUserId()).
|
||||
eq(WgzReissueacard::getAttendanceId, wgzAttendance.getId()).
|
||||
eq(WgzReissueacard::getType, type == 1 || type == 3 ? 0 : 1).
|
||||
ne(WgzReissueacard::getAuditorOpinion, "3")
|
||||
ne(WgzReissueacard::getAuditorType, "3")
|
||||
);
|
||||
if (count == 0){
|
||||
list.add(two);
|
||||
|
@ -17,6 +17,7 @@ import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
||||
import com.ruoyi.common.constants.WgzAndBgtMessageConstant;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.util.LocalDateToChineseWeekday;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.wgz.bo.WgzReissueacardQueryBo;
|
||||
@ -37,6 +38,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
@ -159,11 +162,11 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
|
||||
if (Objects.isNull(attendanceInfo)) {
|
||||
throw new RuntimeException("打卡信息不存在");
|
||||
}
|
||||
String rawTime = "";
|
||||
LocalDateTime rawTime = null;
|
||||
if (attendanceInfo.getClockInTime() == null) {
|
||||
rawTime = "缺卡";
|
||||
rawTime = LocalDateTime.of(LocalDate.now(), recruit.getEndWorkTime());
|
||||
} else {
|
||||
rawTime = attendanceInfo.getClockInTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
rawTime = attendanceInfo.getClockInTime();
|
||||
}
|
||||
//5、组装补卡申请数据
|
||||
WgzReissueacard wgzReissueacard = new WgzReissueacard().
|
||||
@ -205,7 +208,7 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
|
||||
setHeadline(WgzAndBgtMessageConstant.wgzMessage(mp, "207")).
|
||||
setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp, "208")).
|
||||
setTableId(wgzReissueacard.getId()).
|
||||
setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()).
|
||||
setTableName(SqlHelper.table(WgzReissueacard.class).getTableName()).
|
||||
setMessageLargeType(BGT_LARGE_OTHER).
|
||||
setMessageSmallType(BGT_SMALL_MAKE_UP);
|
||||
if (!iBgtMessageService.sendAMessage(bgtMessage)) {
|
||||
@ -290,6 +293,8 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM
|
||||
|
||||
@Override
|
||||
public WgzAppUserReplacementCardRecordDetailsRes userReplacementCardRecordDetails(Long id) {
|
||||
return baseMapper.userReplacementCardRecordDetails(id);
|
||||
WgzAppUserReplacementCardRecordDetailsRes info = baseMapper.userReplacementCardRecordDetails(id);
|
||||
info.setWeek( LocalDateToChineseWeekday.getChineseWeekday(info.getRawTime().toLocalDate()));
|
||||
return info;
|
||||
}
|
||||
}
|
||||
|
@ -63,8 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="appQueryPageList" resultType="com.ruoyi.wgz.bo.res.WgzReplacementCardRecordRes">
|
||||
SELECT
|
||||
a.*,
|
||||
b.username,
|
||||
b.avatar_name,
|
||||
b.username as auditorname,
|
||||
b.avatar_name as auditorHead,
|
||||
c.username as userName
|
||||
FROM
|
||||
wgz_reissueacard a
|
||||
|
Reference in New Issue
Block a user