package com.inkasso.factoring.salesManagement.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.inkasso.factoring.salesManagement.entity.CSalesContractBasicInfo;
import com.inkasso.factoring.common.entity.GridPage;
import com.inkasso.factoring.salesManagement.entity.CSalesContractManagement;
import com.inkasso.factoring.salesManagement.entity.SearchSalesBasic;
import com.inkasso.factoring.salesManagement.entity.vo.SalesContractBasicVo;
import com.inkasso.factoring.salesManagement.entity.vo.SalesContractListVo;
import org.apache.catalina.User;

import java.util.List;

/**
 * <p>
 * 销售合同管理表 服务类
 * </p>
 *
 * @author yafan
 * @since 2023-11-28
 */
public interface ICSalesContractManagementService extends IService<CSalesContractManagement> {

    /**
     * 获取列表页信息
     *
     * @param searchSalesBasic
     * @return
     */
    GridPage<SalesContractListVo> list(SearchSalesBasic searchSalesBasic);

    /**
     * 获取详情
     *
     * @param id
     * @return
     */
    SalesContractBasicVo getView(Long id);


    /**
     * 销售合同创建
     *
     * @param salesContractManagement
     */
    void doAdd(CSalesContractManagement salesContractManagement);

    CSalesContractBasicInfo findByBusinessNumber(String businessNumber);

    /**
     * 获取当前用户授信决议通过的项目/招投标，中标且已经完成的项目
     *
     * @return
     */
    List<SalesContractBasicVo> getCreditProject();


    /**
     * 获取当前用户下，销售合同审核通过的项目
     * @return
     */
    List<SalesContractBasicVo> getCompletedSales();

    /**
     * 根据业务编号获取基础信息
     * @return
     */
    SalesContractBasicVo getCompletedSalesByBusinessNumber(String businessNumber);


    CSalesContractManagement getByBusinessNumber(String businessNumber);
}
