gaoluyang
昨天 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
39
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.MesProProcessWageRulePageReqVO;
import cn.iocoder.yudao.module.mes.dal.dataobject.pro.wage.MesProProcessWageRuleDO;
import org.apache.ibatis.annotations.Mapper;
 
import java.util.List;
 
/**
 * MES 工序工资单价规则 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface MesProProcessWageRuleMapper extends BaseMapperX<MesProProcessWageRuleDO> {
 
    default PageResult<MesProProcessWageRuleDO> selectPage(MesProProcessWageRulePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MesProProcessWageRuleDO>()
                .eqIfPresent(MesProProcessWageRuleDO::getProcessId, reqVO.getProcessId())
                .eqIfPresent(MesProProcessWageRuleDO::getRouteId, reqVO.getRouteId())
                .eqIfPresent(MesProProcessWageRuleDO::getMachineryId, reqVO.getMachineryId())
                .eqIfPresent(MesProProcessWageRuleDO::getBillingType, reqVO.getBillingType())
                .eqIfPresent(MesProProcessWageRuleDO::getStatus, reqVO.getStatus())
                .orderByAsc(MesProProcessWageRuleDO::getProcessId)
                .orderByDesc(MesProProcessWageRuleDO::getPriority)
                .orderByDesc(MesProProcessWageRuleDO::getId));
    }
 
    default List<MesProProcessWageRuleDO> selectListByProcessId(Long processId) {
        return selectList(new LambdaQueryWrapperX<MesProProcessWageRuleDO>()
                .eq(MesProProcessWageRuleDO::getProcessId, processId)
                .orderByDesc(MesProProcessWageRuleDO::getPriority)
                .orderByDesc(MesProProcessWageRuleDO::getId));
    }
 
}