package com.jwipc.inquiry.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.inquiry.entity.Inquiry;
import com.jwipc.inquiry.model.po.*;
import com.jwipc.inquiry.model.query.InquiryConvertContractQuery;
import com.jwipc.inquiry.model.query.InquiryQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 询价表 Mapper 接口
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-02-18
 */
public interface InquiryMapper extends BaseMapper<Inquiry> {

    List<InquiryPO> findPageByQuery(@Param("query") InquiryQuery query);

    List<InquiryPO> findPageByQuery(Page<Inquiry> dbPage, @Param("query") InquiryQuery query);

    List<InquiryMaterialQuotePO> materialQuoteList( @Param("inquiryId") Long inquiryId);

    List<InquiryEditSupplierPO> supplierListByInquiryId(@Param("inquiryId")Long inquiryId);

    InquiryDetailByIdPO formDeatilById(@Param("xjId") Long xjId);

    Map formSupplierDeatilById(@Param("xjId") Long xjId);

    List<InquiryDetailByIdDetailPO> formMaterialDeatilById(@Param("xjId") Long xjId, @Param("supplierId") String supplierId);

    List<InquiryDetailByIdDetailPO> formDetailByMaterialSupplierId(@Param("inquiryIdList") List<String> inquiryIdList, @Param("supplierId") String supplierId);

    List<InquiryDetailByIdPO> xjlistFindByList(@Param("xjId") Long xjId);

    List<InquiryPO> inquiryContractList(@Param("query") InquiryConvertContractQuery query);

    List<InquiryDetailByIdPO> getConvertedContractByInquiryId(@Param("inquiryId") Long inquiryId);

    List<InquiryCostContractPO> getInquiryCostContractList(@Param("query") InquiryConvertContractQuery query);
}
