package com.inkasso.factoring.acceptanceManagement.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.inkasso.factoring.acceptanceManagement.entity.AcceptanceSearch;
import com.inkasso.factoring.acceptanceManagement.entity.CAcceptanceBasicInfo;
import com.inkasso.factoring.acceptanceManagement.entity.vo.AcceptanceListVo;
import com.inkasso.factoring.purchManagement.entity.vo.PurchContractCompletedVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 下游验收单-基础信息表 Mapper 接口
 * </p>
 *
 * @author yafan
 * @since 2023-11-30
 */
public interface CAcceptanceBasicInfoMapper extends BaseMapper<CAcceptanceBasicInfo> {


    PurchContractCompletedVo getPurchContractByBusinessNumber(Long userId, String businessNumber);


    List<AcceptanceListVo> getBySearch(AcceptanceSearch search);

    /**
     * 选择验收单货物
     *
     * @param basicInfo
     * @param financing 验收单货物是否融资
     * @return
     */
    List<CAcceptanceBasicInfo> findByCondition(@Param("basicInfo") CAcceptanceBasicInfo basicInfo, @Param("financing") Boolean financing);
}
