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.ErpMonthProductivePlanCheckDetailPageReqVO;
import com.zt.plat.module.base.dal.dataobject.erpmonthproductiveplancheck.ErpMonthProductivePlanCheckDetailDO;
import org.apache.ibatis.annotations.Mapper;


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

    default PageResult<ErpMonthProductivePlanCheckDetailDO> selectPage(ErpMonthProductivePlanCheckDetailPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ErpMonthProductivePlanCheckDetailDO>()
                .betweenIfPresent(ErpMonthProductivePlanCheckDetailDO::getDate, reqVO.getDate())
                .eqIfPresent(ErpMonthProductivePlanCheckDetailDO::getSort, reqVO.getSort())
                .eqIfPresent(ErpMonthProductivePlanCheckDetailDO::getValue, reqVO.getValue())
                .eqIfPresent(ErpMonthProductivePlanCheckDetailDO::getMainId, reqVO.getMainId())
                .betweenIfPresent(ErpMonthProductivePlanCheckDetailDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ErpMonthProductivePlanCheckDetailDO::getId));
    }

}