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
package cn.iocoder.yudao.module.mes.dal.mysql.safety;
 
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.safety.vo.material.SafetyMaterialStockPageReqVO;
import cn.iocoder.yudao.module.mes.dal.dataobject.safety.SafetyMaterialStockDO;
import org.apache.ibatis.annotations.Mapper;
 
/**
 * 安全生产 - 物资出入库流水 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface SafetyMaterialStockMapper extends BaseMapperX<SafetyMaterialStockDO> {
 
    default PageResult<SafetyMaterialStockDO> selectPage(SafetyMaterialStockPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<SafetyMaterialStockDO>()
                .eqIfPresent(SafetyMaterialStockDO::getMaterialId, reqVO.getMaterialId())
                .likeIfPresent(SafetyMaterialStockDO::getMaterialName, reqVO.getMaterialName())
                .eqIfPresent(SafetyMaterialStockDO::getCategory, reqVO.getCategory())
                .eqIfPresent(SafetyMaterialStockDO::getBizType, reqVO.getBizType())
                .betweenIfPresent(SafetyMaterialStockDO::getBizDate, reqVO.getBizDate())
                .orderByDesc(SafetyMaterialStockDO::getBizDate)
                .orderByDesc(SafetyMaterialStockDO::getId));
    }
 
}