package com.fjhx.purchase.mapper.purchase;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.purchase.entity.purchase.po.PurchaseDetail;
import com.fjhx.purchase.entity.purchase.vo.PurchaseDetailVo;
import com.ruoyi.common.utils.wrapper.IWrapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * <p>
 * 采购单明细 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2023-04-06
 */
public interface PurchaseDetailMapper extends BaseMapper<PurchaseDetail> {

    /**
     * 申购单分页
     */
    Page<PurchaseDetailVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<PurchaseDetail> wrapper);

    /**
     * 获取外销合同总采购量
     * @param dataResourceIds
     * @return
     */
    List<PurchaseDetailVo> getSumCountInDataResourceId(@Param("dataResourceIds") List<Long> dataResourceIds);


    /**
     * 获取外销合同总采购量审批通过的
     *
     * @param dataResourceIds
     * @return
     */
    List<PurchaseDetailVo> getSumCountInDataResourceIds(@Param("dataResourceIds") List<Long> dataResourceIds);

    /**
     * 获取明细列表
     */
    List<PurchaseDetailVo> getPurchaseDetailList(@Param("ew") IWrapper<PurchaseDetail> wrapper);

}
