package com.ruoyi.finance.mapper;

import com.ruoyi.finance.domain.TFee;
import com.ruoyi.finance.domain.TWareHouseFees;
import com.ruoyi.finance.domain.dto.FeeDTO;
import com.ruoyi.finance.domain.vo.FeeVO;
import com.ruoyi.finance.excel.Detailed;
import com.ruoyi.finance.shipping.FinancialTFee;
import com.ruoyi.finance.shipping.HandleExcel;
import com.ruoyi.finance.shipping.ProfitExcel;
import com.ruoyi.finance.shipping.ReceivableExcel;
import com.ruoyi.reportManagement.dto.TWarehousebill;
import com.ruoyi.shipping.excel.ExportFinancial;
import com.ruoyi.warehouseBusiness.excel.TWareHouseExcelItem;
import org.apache.ibatis.annotations.Param;

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

/**
 * 财务数据主Mapper接口
 *
 * @author ruoyi
 * @date 2021-01-18
 */
public interface TFeeMapper {
    /**
     * 查询财务数据主
     *
     * @param fId 财务数据主ID
     * @return 财务数据主
     */
    public TFee selectTFeeById(Long fId);
    /**
     * 查询财务数据主
     *
     * @param fId 财务数据主ID
     * @return 财务数据主
     */
    public TFee selectTFeeByIdNew(Long fId);

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

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

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

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

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

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

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

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

    /**
     *  查询 对账、 收费 数据
     * @return
     */
    public List<Map<String, Object>> warehouseBillsFeesList(@Param("map") Map<String, Object> map);

    public List<Map<String, Object>> warehouseBillsFeesListAccamount(@Param("map") Map<String, Object> map);
    //发票申请查询
    public List<Map<String, Object>> warehouseApplyFPFeesList(@Param("map") Map<String, Object> map);
    //开发票查询
    public List<Map<String, Object>> warehouseInvoiceFPFeesList(@Param("map") Map<String, Object> map);

    public List<Map<String, Object>> warehouseBillsKHFeesListAccamount(@Param("map") Map<String, Object> map);

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

    /**
     *  查询应收、应付总帐
     * @param tWareHouseFees
     * @return
     */
    List<FeeVO> selectFinancialLedgerList(TWareHouseFees tWareHouseFees);

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

    /**
     * 查询详情主表列表
     * @param fid
     * @return 详情主表集合
     */
    public List<TWareHouseExcelItem> selectTWarehousebillsItemsList(@Param("fId") Long fid);

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

    public List<Detailed> selectDetailedList(@Param("fId") Long fid);

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

    /**
     * 网页版发票查询
     * @param tFee
     * @return
     */
    public List<Map<String, Object>> webVersionInvoice(TFee tFee);
    /**
     *  凯和检索 对账、 收费 付费信息
     * @return
     */
    public List<Map<String, Object>> FinancialFeesList(@Param("map") Map<String, Object> map);

    /**
     * 凯和获取费用详情
     * @param fId
     * @return
     */
    FinancialTFee selectFinancialTFeeId (Long fId);

    /**
     * 凯和查询对账信息
     * @param id
     * @return
     */
    List<ExportFinancial> exportFinancial(@Param("id") Long id);

    /**
     * 查询发票数据
     * @param map
     * @return
     */
    List<Map<String, Object>> queryApplyInvoiceFeesList(@Param("map") Map<String, Object> map);

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

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

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

}
