package com.gci.boot.modules.finance.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gci.boot.modules.finance.entity.BaseFinance;
import com.gci.boot.modules.finance.entity.FinanceVehicleCost;
import com.gci.boot.modules.finance.vo.*;
import com.gci.boot.modules.vehicles.vo.RepairInfoListVO;

import java.util.List;

public interface IBaseFinanceService extends IService<BaseFinance> {

    /**
     * 测算
     * @param baseFinance
     */
    CalculateResultObjectVO calculate(BaseFinance baseFinance);

    /**
     * 计算租金
     */
    FinanceItemVO calculateRent(List<FinanceVehicleCost> vehicleCostList);

    /**
     * 管理、运维、保险费用计算
     */
    List<FinanceItemVO> calculateManage(BaseFinance baseFinance);

    /**
     * 计算收入与税金
     */
    FinanceItemVO calculateIncomeAndTax(BaseFinance baseFinance,FinanceItemVO rentVO, List<FinanceItemVO> manageList);

    /**
     * 融资费用计算
     */
    List<FinanceItemVO> calculateFinancing(BaseFinance baseFinance);

    /**
     * 成本与利润计算
     */
    List<FinanceItemVO> calculateCostandProfit(BaseFinance baseFinance,FinanceItemVO rentVO, List<FinanceItemVO> manageList, FinanceItemVO incomeAndTaxVO,List<FinanceItemVO> financeList);

    /**
     * 自有资金现金流量表
     */
    List<FinanceItemVO> calculateOwnFunds(BaseFinance baseFinance,FinanceItemVO rentVO, List<FinanceItemVO> manageList,
                                          FinanceItemVO incomeAndTaxVO,List<FinanceItemVO> financeList,List<FinanceItemVO> costAndProfitList);

    /**
     *测算结果
     */
    CalculateResultVO calculateResult(BaseFinance baseFinance,FinanceItemVO rentVO,FinanceItemVO incomeAndTax,
                                      List<FinanceItemVO> manageList,List<FinanceItemVO> costAndProfitList,List<FinanceItemVO> financeList);


    /**
     *保存
     */
    String addDetail(DetailObjectVO detail);

    /**
     * 分页查
     * @param page
     * @param paramVO
     * @return
     */
    Page getCalcutatePage(Page page, CalculateParamVO paramVO);

    /**
     * 查详情
     *
     */
    DetailObjectVO getDetailById(String id);

    /**
     * 删除
     */
    void deleteDetailById(String id);
}
