package com.sunxung.factoring.service.cashflowmanage;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sunxung.factoring.entity.GridPage;
import com.sunxung.factoring.entity.cashflowmanage.CashFlowManageBasicInfo;
import com.sunxung.factoring.entity.cashflowmanage.request.AddCashFlowRequest;
import com.sunxung.factoring.entity.cashflowmanage.vo.CashFlowDealOutInfoVo;
import com.sunxung.factoring.entity.cashflowmanage.vo.CashFlowEntryInfoVo;
import com.sunxung.factoring.entity.cashflowmanage.vo.CashFlowManageBaseVo;
import com.sunxung.factoring.entity.cashflowmanage.vo.SearchCashFlowManageVo;
import com.sunxung.factoring.web.cashflowmanage.vo.LoanRecordToTradeVo;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description : 现金流管理基础信息service
 * @Author : JiaYf
 * @Date: 2021-11-02 17:59
 */
public interface CashFlowManageBasicInfoService extends IService<CashFlowManageBasicInfo> {

    /**
     * 分页查询 现金流管理信息
     *
     * @param searchCashFlowManageVo
     * @return
     */
    GridPage<CashFlowManageBaseVo> queryPage(SearchCashFlowManageVo searchCashFlowManageVo);

    /**
     * 添加入账信息
     *
     * @param addCashFlowRequest
     * @return
     */
    void add(AddCashFlowRequest addCashFlowRequest);

    /**
     * 通过ID获取入账详细信息
     *
     * @param cashFlowManageBaseId
     * @return
     */
    CashFlowEntryInfoVo getEntryDetail(Long cashFlowManageBaseId);

    /**
     * 更新入账信息
     *
     * @param cashFlowEntryInfoVo
     * @return
     */
    void doUpdate(CashFlowEntryInfoVo cashFlowEntryInfoVo, HttpServletRequest request);

    /**
     * 通过ID获取处理出账信息页面的数据
     *
     * @param cashFlowManageBaseId
     * @return
     */
    CashFlowDealOutInfoVo getDealOut(Long cashFlowManageBaseId);

    /**
     * 处理出账信息
     *
     * @param cashFlowDealOutInfoVo
     * @return
     */
    void doDeal(CashFlowDealOutInfoVo cashFlowDealOutInfoVo);

    /**
     * 现金流出账数据同步到贸理通
     *
     * @param loanRecordToTradeVo
     */
    void syncFromSop(LoanRecordToTradeVo loanRecordToTradeVo);

    /**
     * 现金流入账信息删除
     *
     * @param id
     */
    void delete(Long id);
}
