gaoluyang
2 天以前 8c65f898ed6e5b0c7a94c792c4562f6ec831dccd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package cn.iocoder.yudao.module.mes.dal.mysql.pro.wage;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.mes.controller.admin.pro.wage.vo.MesProWageQualityRulePageReqVO;
import cn.iocoder.yudao.module.mes.dal.dataobject.pro.wage.MesProWageQualityRuleDO;
import org.apache.ibatis.annotations.Mapper;
 
import java.util.List;
 
/**
 * MES 质量工资规则 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface MesProWageQualityRuleMapper extends BaseMapperX<MesProWageQualityRuleDO> {
 
    default PageResult<MesProWageQualityRuleDO> selectPage(MesProWageQualityRulePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MesProWageQualityRuleDO>()
                .eqIfPresent(MesProWageQualityRuleDO::getProcessId, reqVO.getProcessId())
                .eqIfPresent(MesProWageQualityRuleDO::getRouteId, reqVO.getRouteId())
                .eqIfPresent(MesProWageQualityRuleDO::getRuleType, reqVO.getRuleType())
                .eqIfPresent(MesProWageQualityRuleDO::getStatus, reqVO.getStatus())
                .orderByAsc(MesProWageQualityRuleDO::getProcessId)
                .orderByDesc(MesProWageQualityRuleDO::getPriority)
                .orderByAsc(MesProWageQualityRuleDO::getMinRate));
    }
 
    default List<MesProWageQualityRuleDO> selectListByProcessId(Long processId) {
        return selectList(new LambdaQueryWrapperX<MesProWageQualityRuleDO>()
                .eq(MesProWageQualityRuleDO::getProcessId, processId)
                .orderByDesc(MesProWageQualityRuleDO::getPriority)
                .orderByAsc(MesProWageQualityRuleDO::getMinRate));
    }
 
}