package com.dayou.service;
import com.dayou.dto.OrderReportDTO;
import com.dayou.dto.PersonalClaimDTO;
import com.dayou.entity.FinanceClaim;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dayou.vo.FinanceClaimVO;
import com.dayou.vo.RealFundMajorStatVO;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
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);

    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);

    List<RealFundMajorStatVO> majorStatExport(RealFundMajorStatVO majorStat);
}
