编写工资结算

This commit is contained in:
2025-02-21 16:15:49 +08:00
parent 1fa1862e77
commit 081f1f23d8
15 changed files with 240 additions and 8 deletions

View File

@ -114,5 +114,9 @@ public interface IWgzAttendanceService extends IServicePlus<WgzAttendance> {
*/
BgtAttendanceVO attendanceDetail(BgtAttendanceDTO dto);
/**
* 考勤详情,查询指定用户指定项目的指定天数考勤情况统计如若用户输入20但实际只有2天出勤
*/
Integer attendanceDetail(Long userId,Long recruitId, Integer num);
}

View File

@ -309,6 +309,20 @@ public class WgzAttendanceServiceImpl extends ServicePlusImpl<WgzAttendanceMappe
return null;
}
@Override
public Integer attendanceDetail(Long userId,Long recruitId, Integer num){
LambdaQueryWrapper<WgzAttendance> apply = new LambdaQueryWrapper<WgzAttendance>().
eq(WgzAttendance::getUserId, userId).
eq(WgzAttendance::getRecruitId, recruitId).and(wrapper -> wrapper
.isNotNull(WgzAttendance::getClockInTime)
.or()
.isNotNull(WgzAttendance::getClockOutTime)
);
apply.orderByAsc(WgzAttendance::getDate);
apply.last("LIMIT " + num);
return baseMapper.selectCount(apply);
}
@Override
public List<BgtAttendanceCountVO> countByTaskId(Long taskId, LocalDate beginDate, LocalDate endDate) {
return baseMapper.countByTaskId(taskId, beginDate, endDate);