package com.inkasso.factoring.salesManagement.dao;

import com.inkasso.factoring.salesManagement.entity.CSalesContractManagement;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.inkasso.factoring.salesManagement.entity.SearchSalesBasic;
import com.inkasso.factoring.salesManagement.entity.vo.SalesContractBasicVo;
import com.inkasso.factoring.salesManagement.entity.vo.SalesContractListVo;

import java.util.List;

/**
 * <p>
 * 销售合同管理表 Mapper 接口
 * </p>
 *
 * @author yafan
 * @since 2023-11-28
 */
public interface CSalesContractManagementMapper extends BaseMapper<CSalesContractManagement> {

    /**
     * 通过销售合同管理表id获取项目基础信息
     * @param id
     * @return
     */
    SalesContractBasicVo getBasicInfoById(Long id);

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

    List<SalesContractListVo> findBySearch(SearchSalesBasic searchSalesBasic);

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

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



}
