package com.ruoyi.finance.service;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.finance.domain.TFee;
import com.ruoyi.finance.domain.TWareHouseFees;
import com.ruoyi.finance.domain.dto.FeeDTO;
import com.ruoyi.finance.domain.excel.GeneralLedgerDetailExcel;
import com.ruoyi.finance.domain.excel.GeneralLedgerExcel;
import com.ruoyi.finance.domain.vo.FeeVO;
import com.ruoyi.finance.excel.Charge;
import com.ruoyi.finance.excel.Contrast;
import com.ruoyi.finance.excel.Detailed;
import com.ruoyi.finance.excel.Payment;
import com.ruoyi.finance.shipping.*;
import com.ruoyi.reportManagement.dto.TWarehousebill;
import com.ruoyi.reportManagement.excel.Profit;
import com.ruoyi.reportManagement.excel.Receivable;
import com.ruoyi.shipping.domain.TAccount;
import com.ruoyi.shipping.domain.TFeeInvoice;
import com.ruoyi.shipping.excel.Account;
import com.ruoyi.warehouseBusiness.excel.TWareHouseExcelItem;

import java.util.List;
import java.util.Map;

/**
 * 财务数据主Service接口
 *
 * @author ruoyi
 * @date 2021-01-18
 */
public interface ITFeeService {
    /**
     * 查询财务数据主
     *
     * @param fId 财务数据主ID
     * @return 财务数据主
     */
    public Map<String, Object> selectTFeeById(Long fId);

    /**
     * 查询财务数据主
     *
     * @param fId 财务数据主ID
     * @return 财务数据主
     */
    public Map<String, Object> selectTFeeByIdNew(Long fId);

    /**
     * 查询财务数据主列表
     *
     * @param tFee 财务数据主
     * @return 财务数据主集合
     */
    public List<TFee> selectTFeeList(TFee tFee);

    public List<Map<String, Object>> selectTFeeList1(TFee tFee);

    /**
     * 凯和确认账单查询
     *
     * @param tFee
     * @return
     */
    public List<Map<String, Object>> webVersionTFee(TFee tFee);

    /**
     * 网页版对账查询明细
     *
     * @param tAccount
     * @return
     */
    public List<Map<String, Object>> webVersionDetail(TAccount tAccount);

    /**
     * 网页版发票查询
     *
     * @param tFee
     * @return
     */
    public List<Map<String, Object>> webVersionInvoice(TFee tFee);

    /**
     * 网页版发票查询明细
     *
     * @param tFee
     * @return
     */
    public List<Map<String, Object>> webVersionInvoiceDetail(TFee tFee);

    /**
     * 网页版查询数据
     *
     * @param tAccount
     * @return
     */
    public List<Map<String, Object>> webVersionList(TAccount tAccount);

    /**
     * 新增财务数据主
     *
     * @param tFee 财务数据主
     * @return 结果
     */
    public int insertTFee(TFee tFee);


    /**
     * 保存对账、收款
     *
     * @param tfee
     * @param tfeeDo
     * @param loginUser
     * @param fBilltype
     * @return
     */
    public AjaxResult insertTFeeTFeeDo(String tfee, String tfeeDo, LoginUser loginUser, String fBilltype);

    /**
     * 保存对账、收款
     *
     * @param tfee
     * @param loginUser
     * @param fBilltype
     * @return
     */
    public AjaxResult insertWebVersion(String tfee, String tfeeDo, LoginUser loginUser, String fBilltype);

    /**
     * 保存对账、收款
     *
     * @param tfee
     * @param tfeeDo
     * @param loginUser
     * @param fBilltype
     * @return
     */
    public AjaxResult insertKHTFeeTFeeDo(String tfee, String tfeeDo, String tFeeInvoice, LoginUser loginUser, String fBilltype);

    /**
     * 修改财务数据主
     *
     * @param tFee 财务数据主
     * @return 结果
     */
    public int updateTFee(TFee tFee);

    /**
     * 批量删除财务数据主
     *
     * @param fIds 需要删除的财务数据主ID
     * @return 结果
     */
    public int deleteTFeeByIds(Long[] fIds);

    /**
     * 批量删除财务数据主
     *
     * @param fIds 需要删除的财务数据主ID
     * @return 结果
     */
    public AjaxResult deleteWebVersionByIds(Long[] fIds);

    /**
     * 删除财务数据主信息
     *
     * @param fId 财务数据主ID
     * @return 结果
     */
    public int deleteTFeeById(Long fId);

    /**
     * 对账、收费、付费
     *
     * @param tWareHouseFees
     * @return
     */
    public List<Map<String, Object>> warehouseBillsFeesList(TWareHouseFees tWareHouseFees, String billsType);

    public List<FeeVO> warehouseBillsFeesList(TWareHouseFees tWareHouseFees);

    public List<Map<String, Object>> warehouseBillsFeesProfitList(TWareHouseFees tWareHouseFees);

    /**
     * 财务： 对账、收费、付费   流程确认
     *
     * @param tfee
     * @param tfeeDo
     * @param loginUser
     * @param fBilltype
     * @return
     */
    public AjaxResult confirm(String tfee, String tfeeDo, LoginUser loginUser, String fBilltype);

    /**
     * @param fIds
     * @return
     */
    public AjaxResult webVersionConfirm(Long[] fIds, String billsType, LoginUser loginUser);

    /**
     * 凯和
     *
     * @param tfee
     * @param tfeeDo
     * @param tFeeInvoice
     * @param loginUser
     * @param fBilltype
     * @return
     */
    public AjaxResult confirmKaiHe(String tfee, String tfeeDo, String tFeeInvoice, LoginUser loginUser, String fBilltype);

    public AjaxResult revoke(String tfee, String tfeeDo, LoginUser loginUser, String fBilltype);

    public AjaxResult queryRemove(Long fId);

    public AjaxResult remove(Long fId);

    /**
     * 导出计算明细
     *
     * @param fId
     * @return
     */
    public List<TWareHouseExcelItem> selectTWarehousebillsItemsList(Long fId);

    public String findCtrlcorpid(Long fId);

    public List<Receivable> receivableExport(TWareHouseFees tWareHouseFees) throws Exception;

    public List<GeneralLedgerExcel> payableExport(TWareHouseFees tWareHouseFees) throws Exception;

    public List<Profit> profitExport(TWareHouseFees tWareHouseFees) throws Exception;

    public List<Contrast> contrastExport(TFee tFee) throws Exception;

    public List<Payment> paymentExport(TFee tFee) throws Exception;

    public List<Charge> chargeExport(TFee tFee) throws Exception;

    /**
     * 凯和网页版对账下载
     *
     * @param tFee
     * @return
     * @throws Exception
     */
    public List<Account> accountExport(TFee tFee) throws Exception;

    public List<Detailed> selectDetailedList(Long fId);

    List<Map<String, Object>> selectdetailedList(TWarehousebill tWarehousebill);

    /**
     * 网页版申请发票审核
     *
     * @param tFee
     * @return
     */
    public AjaxResult webVersionApplyFP(TFee tFee, LoginUser loginUser, String billType, TFeeInvoice tFeeInvoice);

    /**
     * 网页版申请发票提交
     *
     * @param tFee
     * @return
     */
    public AjaxResult webVersionSubmitApplyFP(TFee tFee, LoginUser loginUser, String billType);

    /**
     * 网页版申请发票提交
     *
     * @param tFee
     * @return
     */
    public AjaxResult webVersionUpdateApplyFP(TFee tFee, LoginUser loginUser, String billType);

    /**
     * 凯和查询财务信息列表
     *
     * @param tFee
     * @return
     */
    public List<FinancialTFee> selectFinancialTFeeList(TFee tFee);

    /**
     * 对账、收费、付费
     *
     * @param tWareHouseFees
     * @return
     */
    public List<Map<String, Object>> FinancialFeesList(TWareHouseFees tWareHouseFees);

    /**
     * 凯和获取财务数据详情
     *
     * @param fId
     * @return
     */
    public Map<String, Object> selectFinancialTFeeId(Long fId);

    /**
     * 导出费用明细
     */
    public List<FinancialTFeeDoExcel> FinancialTFeeDoExcel(Long fId);

    /**
     * 导出财务对账数据
     *
     * @param fId
     * @return
     */
    public AjaxResult exportFinancial(Long fId);

    /**
     * 凯和查询应收总账
     * @param tWareHouseFees
     * @return
     */
    public List<ReceivableExcel> receivable(TWareHouseFees tWareHouseFees);

    /**
     * 凯和查询利润统计
     * @param tWareHouseFees
     * @return
     */
    public List<ProfitExcel> profit(TWareHouseFees tWareHouseFees);

    /**
     * 凯和查询应付总账
     * @param tWareHouseFees
     * @return
     */
    public List<HandleExcel> handle(TWareHouseFees tWareHouseFees);

    /**
     * 根据结算单位、费用状态、审核日期查询应付总帐明细
     *
     * @param feeDTO
     * @return
     */
    AjaxResult financialLedgerDetails(FeeDTO feeDTO);

    /**
     * 查询应付总帐明细
     *
     * @param feeDTO
     * @return
     */
    List<GeneralLedgerDetailExcel> financialLedgerDetailsExport(FeeDTO feeDTO);
}
