package com.trade.service.trade.purchasecontract.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.trade.common.core.page.GridPage;
import com.trade.service.trade.filingdoc.vo.Contract4FilingDocSearch;
import com.trade.service.trade.filingdoc.vo.PurchaseContract4FilingDocVO;
import com.trade.service.trade.purchasecontract.domain.PurchaseContract;
import com.trade.service.trade.purchasecontract.dto.PurchaseContractDetailDto;
import com.trade.service.trade.purchasecontract.dto.PurchaseContractDto;
import com.trade.service.trade.purchasecontract.dto.PurchaseContractSearchBaseDto;

import java.util.List;

/**
 * 采购合同表基础表基础服务接口
 *
 * @author hlb
 * @since 2024-09-07 16:23:15
 */
public interface PurchaseContractBaseService extends IService<PurchaseContract> {

    /**
     * 获取采购合同列表
     *
     * @param searchDto 采购合同搜索条件
     * @return 采购合同列表
     */
    GridPage<PurchaseContractDto> getPurchaseContractBySearch(PurchaseContractSearchBaseDto searchDto);

    /**
     * 根据id获取采购合同详情
     * 
     * @param id
     * @return
     */
    PurchaseContractDetailDto findPurchaseContractDetailById(Long id);

    /**
     * 根据销售合同编号获取采购合同详情()
     * 
     * @param saleContractNo
     * @return
     */
    PurchaseContractDetailDto findBySaleContractNo(Long customerUserId, String saleContractNo, String vendorEntityNo);

    /**
     * 根据客户id和采购合同编号获取采购合同详情
     * 
     * @param customerUserId 客户id
     * @param purchaseContractNo 采购合同编号
     * @return 采购合同详情
     */
    PurchaseContractDetailDto findByCustomerUserIdAndPurchaseContractNo(Long customerUserId, String purchaseContractNo);

    /**
     * 备案单证查询采购合同列表
     * 
     * @param search 查询条件
     * @return 采购合同列表
     */
    List<PurchaseContract4FilingDocVO> queryList4FilingDocBySearch(Contract4FilingDocSearch search);
}
