package com.sunxung.factoring.service.businessmanagement;

import com.sunxung.factoring.entity.GridPage;
import com.sunxung.factoring.entity.businessmanagement.BusinessBasicInfo;
import com.sunxung.factoring.entity.vo.ConditionVo;

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

/**
 * @author liutao
 */
public interface BusinessManagementService {



    /**
     * 新建业务
     * @param businessBasicInfo 业务基本信息
     */
    void add(BusinessBasicInfo businessBasicInfo) ;

    /**
     * 修改业务
     * @param businessBasicInfo 业务基本信息
     * @throws IOException
     */
    void update(BusinessBasicInfo businessBasicInfo);

    /**
     * 查询详情
     * @param businessBasicInfoId 业务基本信息
     * @return 需要查询的业务信息
     */
    BusinessBasicInfo findDetail(long businessBasicInfoId);

    /**
     * 【供应商+核心企业+业务名称】对应的业务编号
     * @param supplierId
     * @param customerId
     * @return
     */
    List<BusinessBasicInfo> getLocalUserBusinessList(Long supplierId, Long customerId,String businessName);

    /**
     * 【供应商+核心企业】对应的业务名称
     * @param supplierId
     * @param customerId
     * @param name
     * @return
     */
    List<BusinessBasicInfo> getLocalUserBusinessNameList(Long supplierId, Long customerId, String name);

    /**
     * 【核心企业】对应的业务编号
     * @param customerId
     * @return
     */
    List<BusinessBasicInfo> getBusinessListByCustomer(Long customerId);

    /**
     * 任务移交
     * @param businessBasicInfoId
     * @param userId
     */
    void transferAssignee(Long businessBasicInfoId,Long userId);

    /**
     * 结算单  底层【供应商+核心企业】对应的业务编号
     * @param
     * @param businessName
     * @return
     */
    List<BusinessBasicInfo> getLocalUserBusinessListByAcceptance(Long supplierId, Long customerId, String businessName);

    /**
     * 发票 获取业务【核心企业】对应的业务编号
     * @param customerId
     * @return
     */
    List<BusinessBasicInfo> getBusinessListByCustomerInvoice(Long customerId);

    /**
     * 删除业务
     * @param businessBasicInfoId
     */
    void delete(Long businessBasicInfoId);

    /**
     * 查询没有流程的历史数据
     * @param conditionVo
     * @return
     */
    GridPage findOldByCondition(ConditionVo conditionVo);

    /**
     * 下载
     * @param id
     * @param response
     */
//    void downloadAllBusinessFile(Long id, HttpServletResponse response);
}
