package com.dayou.service;
import com.dayou.dto.PersonalClaimDTO;
import com.dayou.dto.RealFundAssetsStatDTO;
import com.dayou.dto.history.HisClaimProd;
import com.dayou.entity.FinanceClaim;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dayou.entity.OrderFund;
import com.dayou.vo.*;
import org.springframework.web.multipart.MultipartFile;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 实收款认领 服务类
 * </p>
 *
 * @author wucl
 * @since 2023-12-08
 */
public interface IFinanceClaimService extends IService<FinanceClaim> {

        Page<FinanceClaim> selectPage(Page page,FinanceClaim financeClaim);

        FinanceClaim detail(Long id);

        Boolean add(FinanceClaim financeClaim);

        Boolean doClaim(FinanceClaim financeClaim);

        Boolean update(FinanceClaim financeClaim);

        Boolean doClaimUpdate(FinanceClaim financeClaim);

        Boolean delete(Long id);

    List<FinanceClaimVO> getList(Long realFundId);

        BigDecimal getTotalClaimAmountByProductionFundId(Long id);

        BigDecimal getTotalClaimAmountByOrderFundId(Long id);

    Boolean personalClaimByTemplate(MultipartFile file,Long financeFundId);

    Boolean doClaimByTemplateDTO(List<PersonalClaimDTO> personalClaimDTOS, Long financeFundId, BigDecimal residueAmount);

    /**
     * 检查实收款剩余金额
     * @param financeFundId
     * @return
     */
    BigDecimal checkFinanceFound(Long financeFundId);

    /**
     * 获取实收款剩余金额
     * @param financeFundId
     * @return
     */
    BigDecimal residueAmount(Long financeFundId);


    Page<RealFundMajorStatVO> majorStat(Page page, RealFundMajorStatVO majorStat,String keyword);

    List<RealFundMajorStatVO> majorStatExport(RealFundMajorStatVO majorStat,String keyword);

    /**
     * 分页查询资产实收款统计
     * @param page 分页信息
     * @param dto 查询dto
     * @return Page<RealFundAssetsStatVO>
     */
    Page<RealFundAssetsStatVO> assetsSate(Page page, RealFundAssetsStatDTO dto,String keyword);

    /**
     * 资产实收款统计导出
     * @param dto 查询dto
     * @return Page<RealFundAssetsStatVO>
     */
    List<RealFundAssetsStatVO> assetsSateExport(RealFundAssetsStatDTO dto,String keyword);

    Page<RealFundPersonalVO> personalStat(Page page, RealFundPersonalVO personalVO);

    List<RealFundPersonalVO> personalStatExport(RealFundPersonalVO personalVO);

    List<OrderFund> queryOrderTotalAmount();

    Page<FinanceClaimsVO> financeClaimsList(Page page, FinanceClaimsVO financeClaimVO,String keyword);

    List<FinanceClaimsVO> exportList(FinanceClaimsVO financeClaimVO, String keyword);

    List<HisClaimProd> updateClaimProductionId(String businessType);
}
