| | |
| | | .orderByDesc(HrmEmployeeContractDO::getId)); |
| | | } |
| | | |
| | | /** |
| | | * 查询当前生效、将在 [start, end] 之间到期的固定期限合同(到期提醒用) |
| | | * |
| | | * @param start 起始日期 |
| | | * @param end 截止日期 |
| | | * @return 即将到期合同列表 |
| | | */ |
| | | default List<HrmEmployeeContractDO> selectListExpiringBetween(LocalDate start, LocalDate end) { |
| | | return selectList(new LambdaQueryWrapperX<HrmEmployeeContractDO>() |
| | | .eq(HrmEmployeeContractDO::getTerminateStatus, TERMINATE_NORMAL) |
| | | .eq(HrmEmployeeContractDO::getIsCurrent, true) |
| | | .le(HrmEmployeeContractDO::getStartDate, start) |
| | | .isNotNull(HrmEmployeeContractDO::getEndDate) |
| | | .between(HrmEmployeeContractDO::getEndDate, start, end)); |
| | | } |
| | | |
| | | } |