package com.inkasso.factoring.financingmanagement.service;

import com.inkasso.factoring.acceptanceManagement.entity.CAcceptanceGoodsInfo;
import com.inkasso.factoring.common.entity.GridPage;
import com.inkasso.factoring.financingmanagement.entity.CFinancingAccountsReceivableInfo;
import com.inkasso.factoring.financingmanagement.entity.CFinancingApplicantInfo;
import com.inkasso.factoring.financingmanagement.entity.vo.*;

import java.util.List;

/**
 * @Description : 融资申请Service
 * @Author : L.Jia
 * @Date: 2023-12-20 11:21
 */
public interface FinancingApplyService {

    /**
     * 列表页查询
     *
     * @param financingSearch
     * @return
     */
    GridPage<FinancingApplyListVo> list(FinancingSearch financingSearch);

    /**
     * 选择已验收货物
     *
     * @param goodsSearch
     * @return
     */
    GridPage<AcceptanceGoodsInfoVo> findGoodsByAcceptance(GoodsSearch goodsSearch);

    /**
     * 生成应收账款信息
     *
     * @param goodsInfoList
     * @return
     */
    List<CFinancingAccountsReceivableInfo> generateAccountsReceivable(List<CAcceptanceGoodsInfo> goodsInfoList);

    /**
     * 获取联系人信息
     *
     * @param businessNumber
     * @return
     */
    CFinancingApplicantInfo getApplicantInfo(String businessNumber);

    /**
     * 融资申请提交
     *
     * @param financingApplyVo
     */
    void apply(FinancingApplyVo financingApplyVo);

    /**
     * 详情页
     *
     * @param id
     * @return
     */
    FinancingApplyVo getDetail(Long id);

    /**
     * 查询sop对应最新收放款计划
     *
     * @param id
     * @return
     */
    PaymentCollectionBasic getViewLatestPlan(Long id);
}
