package com.inkasso.factoring.purchManagement.service;

import com.inkasso.auth.response.ResponseJson;
import com.inkasso.factoring.common.entity.GridPage;
import com.inkasso.factoring.purchManagement.entity.CPurchContractBasicInfo;
import com.inkasso.factoring.purchManagement.entity.CPurchContractGoodsInfo;
import com.inkasso.factoring.purchManagement.entity.CPurchContractManagement;
import com.baomidou.mybatisplus.extension.service.IService;
import com.inkasso.factoring.purchManagement.entity.CPurchContractRetentionInfo;
import com.inkasso.factoring.purchManagement.entity.vo.PurchContractCompletedVo;
import com.inkasso.factoring.purchManagement.entity.vo.PurchContractVo;
import com.inkasso.factoring.purchManagement.entity.vo.SearchGoods;
import com.inkasso.factoring.salesManagement.entity.CSalesContractSupplementGoodsInfo;
import com.inkasso.factoring.salesManagement.entity.SearchSalesBasic;
import com.inkasso.factoring.salesManagement.entity.vo.SalesContractListVo;
import com.inkasso.factoring.system.user.service.UserService;

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

/**
 * <p>
 * 采购合同管理表 服务类
 * </p>
 *
 * @author yafan
 * @since 2023-12-02
 */
public interface ICPurchContractManagementService extends IService<CPurchContractManagement> {

    /**
     * 采购合同 选择货物
     * @param searchGoods
     * @return
     */
    GridPage<CSalesContractSupplementGoodsInfo> selectGoods(SearchGoods searchGoods);

    /**
     * 计算采购暂定单价
     * @param searchGoods
     * @return
     */
    List<CPurchContractGoodsInfo> calculateGoods(SearchGoods searchGoods);


    /**
     * 新增采购合同
     * @param purchContractVo
     */
    void doAdd(PurchContractVo purchContractVo);

    PurchContractVo add(Long id);

    /**
     * 根据销售合同Id查询质保金信息
     * @param businessNumber
     * @return
     */
    CPurchContractRetentionInfo getRetentionByBusinessNumber(String businessNumber);

    /**
     * 获取当前用户下通过的采购合同
     * @return
     */
    PurchContractCompletedVo getCompletedPurchContractByBusinessNumber(String businessNumber);


    /**
     * 列表
     * @param searchSalesBasic
     * @return
     */
    GridPage<CPurchContractBasicInfo> list(SearchSalesBasic searchSalesBasic);

    /**
     * 下载文件
     * @param id
     */
    void downloadFile(Long id, HttpServletResponse response);



}
