package com.zt.plat.module.base.dal.dao.erpmonthproductiveplancheck;

import java.util.*;

import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;

import com.zt.plat.module.base.controller.admin.erpmonthproductiveplancheck.vo.ErpMonthProductivePlanCheckPageReqVO;
import com.zt.plat.module.base.dal.dataobject.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckDO;
import org.apache.ibatis.annotations.Mapper;


/**
 * ERP月度产品计划核对 Mapper
 *
 * @author 后台管理-1
 */
@Mapper
public interface ErpMonthProductivePlanCheckMapper extends BaseMapperX<ErpMonthProductivePlanCheckDO> {

    default PageResult<ErpMonthProductivePlanCheckDO> selectPage(ErpMonthProductivePlanCheckPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ErpMonthProductivePlanCheckDO>()
                .eqIfPresent(ErpMonthProductivePlanCheckDO::getProduct, reqVO.getProduct())
                .eqIfPresent(ErpMonthProductivePlanCheckDO::getYear, reqVO.getYear())
                .eqIfPresent(ErpMonthProductivePlanCheckDO::getMonth, reqVO.getMonth())
                .eqIfPresent(ErpMonthProductivePlanCheckDO::getMonthPlan, reqVO.getMonthPlan())
                .betweenIfPresent(ErpMonthProductivePlanCheckDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ErpMonthProductivePlanCheckDO::getId));
    }

}