package com.ruoyi.project.service.impl;
|
|
import java.util.List;
|
import com.ruoyi.common.utils.DateUtils;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import java.util.ArrayList;
|
import java.util.Map;
|
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.project.mapper.ServiceAttendancerecordsMapper;
|
import com.ruoyi.project.domain.ServiceAttendancerecords;
|
import com.ruoyi.project.service.IServiceAttendancerecordsService;
|
|
/**
|
* 考勤记录Service业务层处理
|
*
|
* @author ls
|
* @date 2025-12-28
|
*/
|
@Service
|
public class ServiceAttendancerecordsServiceImpl extends ServiceImpl<ServiceAttendancerecordsMapper, ServiceAttendancerecords> implements IServiceAttendancerecordsService
|
{
|
|
|
/**
|
* 查询考勤记录列表
|
*
|
* @param serviceAttendancerecords 考勤记录
|
* @return 考勤记录
|
*/
|
@Override
|
public List<ServiceAttendancerecords> queryList(ServiceAttendancerecords serviceAttendancerecords) {
|
LambdaQueryWrapper<ServiceAttendancerecords> wrappers = Wrappers.lambdaQuery();
|
if (StringUtils.isNotBlank(serviceAttendancerecords.getUserNo())){
|
wrappers.eq(ServiceAttendancerecords::getUserNo ,serviceAttendancerecords.getUserNo());
|
}
|
if (StringUtils.isNotBlank(serviceAttendancerecords.getUserName())){
|
wrappers.like(ServiceAttendancerecords::getUserName ,serviceAttendancerecords.getUserName());
|
}
|
if (StringUtils.isNotBlank(serviceAttendancerecords.getDeptNo())){
|
wrappers.eq(ServiceAttendancerecords::getDeptNo ,serviceAttendancerecords.getDeptNo());
|
}
|
if (StringUtils.isNotBlank(serviceAttendancerecords.getDeptName())){
|
wrappers.like(ServiceAttendancerecords::getDeptName ,serviceAttendancerecords.getDeptName());
|
}
|
if (serviceAttendancerecords.getAttendanceDate() != null){
|
wrappers.eq(ServiceAttendancerecords::getAttendanceDate ,serviceAttendancerecords.getAttendanceDate());
|
}
|
if (serviceAttendancerecords.getClockInTime() != null){
|
wrappers.eq(ServiceAttendancerecords::getClockInTime ,serviceAttendancerecords.getClockInTime());
|
}
|
if (serviceAttendancerecords.getClockOutTime() != null){
|
wrappers.eq(ServiceAttendancerecords::getClockOutTime ,serviceAttendancerecords.getClockOutTime());
|
}
|
if (StringUtils.isNotBlank(serviceAttendancerecords.getAttendanceStatus())){
|
wrappers.eq(ServiceAttendancerecords::getAttendanceStatus ,serviceAttendancerecords.getAttendanceStatus());
|
}
|
if (serviceAttendancerecords.getWorkHoursMinutes() != null){
|
wrappers.eq(ServiceAttendancerecords::getWorkHoursMinutes ,serviceAttendancerecords.getWorkHoursMinutes());
|
}
|
if (serviceAttendancerecords.getOvertimeMinutes() != null){
|
wrappers.eq(ServiceAttendancerecords::getOvertimeMinutes ,serviceAttendancerecords.getOvertimeMinutes());
|
}
|
if (StringUtils.isNotBlank(serviceAttendancerecords.getReason())){
|
wrappers.eq(ServiceAttendancerecords::getReason ,serviceAttendancerecords.getReason());
|
}
|
if (StringUtils.isNotBlank(serviceAttendancerecords.getAbnormalReason())){
|
wrappers.eq(ServiceAttendancerecords::getAbnormalReason ,serviceAttendancerecords.getAbnormalReason());
|
}
|
if (StringUtils.isNotBlank(serviceAttendancerecords.getClockInMethod())){
|
wrappers.eq(ServiceAttendancerecords::getClockInMethod ,serviceAttendancerecords.getClockInMethod());
|
}
|
if (StringUtils.isNotBlank(serviceAttendancerecords.getClockOutMethod())){
|
wrappers.eq(ServiceAttendancerecords::getClockOutMethod ,serviceAttendancerecords.getClockOutMethod());
|
}
|
if (StringUtils.isNotBlank(serviceAttendancerecords.getClockInLocation())){
|
wrappers.eq(ServiceAttendancerecords::getClockInLocation ,serviceAttendancerecords.getClockInLocation());
|
}
|
if (StringUtils.isNotBlank(serviceAttendancerecords.getClockOutLocation())){
|
wrappers.eq(ServiceAttendancerecords::getClockOutLocation ,serviceAttendancerecords.getClockOutLocation());
|
}
|
if (StringUtils.isNotBlank(serviceAttendancerecords.getDataSource())){
|
wrappers.eq(ServiceAttendancerecords::getDataSource ,serviceAttendancerecords.getDataSource());
|
}
|
return this.list(wrappers);
|
}
|
|
}
|