package com.jwipc.inquiry.mapper;

import com.jwipc.inquiry.entity.InquiryMaterial;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jwipc.inquiry.model.po.AssistantMaterialSupplierPO;
import com.jwipc.inquiry.model.po.InquiryMaterialPO;
import com.jwipc.inquiry.model.query.InquiryMaterialQuery;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 询价物料表 Mapper 接口
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-02-21
 */
public interface InquiryMaterialMapper extends BaseMapper<InquiryMaterial> {

    List<InquiryMaterialPO> listAll(@Param("query") InquiryMaterialQuery query);

    List<AssistantMaterialSupplierPO> getAssistantMaterialByInquiryId(@Param("inquiryId") Long inquiryId);

    BigDecimal getPurchaseNumAmountByBillNoAndCode(@Param("purchaseBillCode") String purchaseBillCode, @Param("purchaseBillItemCode") String purchaseBillItemCode, @Param("id") Long id);
}
