package com.sunxung.factoring.service.purchcontractmanagement;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sunxung.factoring.entity.GridPage;
import com.sunxung.factoring.entity.project.vo.BusinessProcessingTaskVo;
import com.sunxung.factoring.entity.project.vo.SearchBusinessProcessingTask;
import com.sunxung.factoring.entity.purchcontractmanagement.PurchContractBuyerSeller;
import com.sunxung.factoring.entity.purchcontractmanagement.PurchContractGoodsInfo;
import com.sunxung.factoring.entity.purchcontractmanagement.PurchContractManagement;
import com.sunxung.factoring.entity.purchcontractmanagement.PurchContractSupplementInfo;
import com.sunxung.factoring.entity.purchcontractmanagement.vo.PurchContractCompletedVo;
import com.sunxung.factoring.entity.purchcontractmanagement.vo.PurchContractVo;
import com.sunxung.factoring.entity.purchcontractmanagement.vo.SearchGoods;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @Description : 采购合同管理service层
 * @Author : JiaYf
 * @Date: 2021-09-14 11:51
 */

public interface PurchContractService extends IService<PurchContractManagement> {

    /**
     * 获取列表页信息
     *
     * @param id
     * @return
     */
    PurchContractManagement get(Long id);

    /**
     * 采购合同信息录入
     *
     * @param purchContractVo
     * @param purchContractVo
     */
    void add(PurchContractVo purchContractVo);


    /**
     * 采购合同已处理列表页查询
     *
     * @param search
     * @return
     */
    List<BusinessProcessingTaskVo> findMyCompletedList(SearchBusinessProcessingTask search);

    /**
     * 采购合同全部列表页查询
     *
     * @param search
     * @return
     */
    List<BusinessProcessingTaskVo> findAllList(SearchBusinessProcessingTask search);

    /**
     * 采购合同变更
     *
     * @param id
     */
    void startChangeProcess(Long id);

    List<PurchContractSupplementInfo> findByManagerId(Long id);

    /**
     * 根据业务id和供应商id的查询需方收货人或供应商发货人信息
     * @param supplierInfo
     * @return
     */
//    List<PurchContractBuyerSeller> findByBusinessInfo(BusinessSupplierInfo supplierInfo);

    /**
     * 删除合同
     * @param id
     */
    void deleteContract(Long id);

    /**
     * 一键下载
     * @param id
     * @param response
     */
    void downloadAllPurchFile(Long id , HttpServletResponse response);

    PurchContractCompletedVo getCompletedPurchContractByBusinessNumber(String businessNumber);
}
