package com.fjhx.purchase.mapper.purchase;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.purchase.entity.purchase.dto.PurchaseDto;
import com.fjhx.purchase.entity.purchase.po.Purchase;
import com.fjhx.purchase.entity.purchase.vo.PurchaseVo;
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 PurchaseMapper extends BaseMapper<Purchase> {

    /**
     * 采购分页
     */
    Page<PurchaseVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<Purchase> wrapper);

    /**
     * 查询货款账单
     * @param query
     * @return
     */
    Page<PurchaseDto> paymentBill(@Param("page") Page<Object> page,@Param("ew") QueryWrapper<Object> query);

    /**
     * 查询到货金额
     * @param query
     * @return
     */
    List<PurchaseDto> arrivalAmount(@Param("ew") QueryWrapper<Object> query);

    /**
     * 查询已付款金额
     * @param wrapper
     * @return
     */
    List<PurchaseDto> paidAmount(@Param("ew") QueryWrapper<Object> wrapper);

    /**
     * 获取采购头部统计
     */
    PurchaseVo getPurchaseHead(@Param("ew") IWrapper<Purchase> wrapper);
}
