|
@@ -9,6 +9,7 @@ import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
|
import cn.iocoder.yudao.module.relations.controller.admin.contract.vo.RelationsContractPageReqVO;
|
|
|
import cn.iocoder.yudao.module.relations.dal.dataobject.contract.RelationsContractDO;
|
|
|
import cn.iocoder.yudao.module.relations.dal.dataobject.conversion.RelationsConversionDO;
|
|
|
+import cn.iocoder.yudao.module.system.enums.common.DeletedEnum;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
|
|
|
|
@@ -38,24 +39,28 @@ public interface RelationsContractMapper extends BaseMapperX<RelationsContractDO
|
|
|
.eqIfPresent(RelationsContractDO::getEmployeeId, reqVO.getEmployeeId())
|
|
|
.eqIfPresent(RelationsContractDO::getTenantId, reqVO.getTenantId())
|
|
|
.likeIfPresent(RelationsContractDO::getCreatorEmployeeName, reqVO.getCreatorEmployeeName())
|
|
|
+ .eq(RelationsContractDO::getDeleted, DeletedEnum.FALSE)
|
|
|
.orderByDesc(RelationsContractDO::getId));
|
|
|
}
|
|
|
|
|
|
default List<RelationsContractDO> selectListByStatusAndEmployeeId(Integer status, Long employeeId) {
|
|
|
return selectList(new LambdaQueryWrapperX<RelationsContractDO>()
|
|
|
.eqIfPresent(RelationsContractDO::getStatus, status)
|
|
|
+ .eq(RelationsContractDO::getDeleted, DeletedEnum.FALSE)
|
|
|
.eqIfPresent(RelationsContractDO::getEmployeeId, employeeId));
|
|
|
}
|
|
|
|
|
|
default List<RelationsContractDO> selectListByStatusAndEffectiveDateGe(Integer status, LocalDate now) {
|
|
|
return selectList(new LambdaQueryWrapperX<RelationsContractDO>()
|
|
|
.eqIfPresent(RelationsContractDO::getStatus, status)
|
|
|
+ .eq(RelationsContractDO::getDeleted, DeletedEnum.FALSE)
|
|
|
.geIfPresent(RelationsContractDO::getContractStartDate, now));
|
|
|
}
|
|
|
|
|
|
default List<RelationsContractDO> selectListByStatusAndEmployeeIds(Integer status, Set<Long> employeeIds) {
|
|
|
return selectList(new LambdaQueryWrapperX<RelationsContractDO>()
|
|
|
.eqIfPresent(RelationsContractDO::getStatus, status)
|
|
|
+ .eq(RelationsContractDO::getDeleted, DeletedEnum.FALSE)
|
|
|
.inIfPresent(RelationsContractDO::getEmployeeId, employeeIds));
|
|
|
}
|
|
|
|