| | |
| | | import cn.iocoder.yudao.module.hrm.dal.dataobject.attendance.HrmAttendanceExceptionDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | /** |
| | | * 考勤异常申请 Mapper |
| | | * |
| | | * @author 芋道源码 |
| | | * @author 超级管理员 |
| | | */ |
| | | @Mapper |
| | | public interface HrmAttendanceExceptionMapper extends BaseMapperX<HrmAttendanceExceptionDO> { |
| | | |
| | | default PageResult<HrmAttendanceExceptionDO> selectPage(HrmAttendanceExceptionPageReqVO reqVO) { |
| | | return selectPage(reqVO, new LambdaQueryWrapperX<HrmAttendanceExceptionDO>() |
| | | LambdaQueryWrapperX<HrmAttendanceExceptionDO> query = new LambdaQueryWrapperX<HrmAttendanceExceptionDO>() |
| | | .likeIfPresent(HrmAttendanceExceptionDO::getNo, reqVO.getNo()) |
| | | .eqIfPresent(HrmAttendanceExceptionDO::getUserId, reqVO.getUserId()) |
| | | .eqIfPresent(HrmAttendanceExceptionDO::getDeptId, reqVO.getDeptId()) |
| | | .eqIfPresent(HrmAttendanceExceptionDO::getType, reqVO.getType()) |
| | | .eqIfPresent(HrmAttendanceExceptionDO::getStatus, reqVO.getStatus()) |
| | | .orderByDesc(HrmAttendanceExceptionDO::getId)); |
| | | .eqIfPresent(HrmAttendanceExceptionDO::getStatus, reqVO.getStatus()); |
| | | // 异常日期区间筛选 |
| | | LocalDate[] dateRange = reqVO.getDate(); |
| | | if (dateRange != null && dateRange.length >= 2 && dateRange[0] != null && dateRange[1] != null) { |
| | | query.between(HrmAttendanceExceptionDO::getExceptionDate, dateRange[0], dateRange[1]); |
| | | } |
| | | return selectPage(reqVO, query.orderByDesc(HrmAttendanceExceptionDO::getId)); |
| | | } |
| | | |
| | | default HrmAttendanceExceptionDO selectByNo(String no) { |