package com.jwipc.finance.logic;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.finance.dto.StatementItemDTO;
import com.jwipc.finance.entity.AccountStatementDetail;
import com.jwipc.finance.model.po.InvoicedApplyItemPO;
import com.jwipc.finance.model.query.*;
import com.jwipc.page.PageView;
import org.springframework.web.multipart.MultipartFile;

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

/**
 * @author shenyang.ou
 * @date 2024/3/4 11:39
 * @desc
 */
public interface AccountStatementDetailLogic {
    PageView findByStatementIdPage(Long asId);
    PageView findByStatementIdAndFactoryCodePage(Long asId,String factoryCode,String removeLists);

    /**
     * 提供创建开票申请时获取对账单明细数据
     *
     * @param query 查询条件
     * @return 结果
     */
    PageView provideCreateInvoicedApply(CreateInvoicedApplyQuery query);

    /**
     * 提供创建开票申请时获取对账单明细数据(根据对账单id分页)
     *
     * @param query 对账单id
     * @return 结果
     */
    PageView provideCreateInvoicedApplyAsId(CreateInvoicedApplyPageQuery query);
    /**
     * 实时获取物料凭证中已开票数量
     *
     * @param query 查询参数
     * @param params 返回数据
     */
    void realTimeReceiveVoucher(ReceiveVoucherQuery query, List<StatementItemDTO> params);

    /**
     * 快速创建开票申请的对账单明细列表查询
     * @param query 查询条件
     * @return 结果
     */
    PageView selectFastDataByQuery(AccountStatementDetailQuery query);

    List<StatementItemDTO> findByStatementId(Long id,String factoryCode);

    /**
     * 批量修改价格
     * @param ids 对账明细id
     * @param receiveIds 物料凭证ids
     */
    void updatePrice(BigDecimal deductionRatio, String ids, String receiveIds,Long asId);

    void priceImport(MultipartFile file);

    List<InvoicedApplyItemPO> provideCreateInvoicedApplyPage(Page<AccountStatementDetail> dbPage, CreateInvoicedApplyPageQuery query);

}
