package com.jwipc.finance.logic;

import com.jwipc.finance.dto.InvoicedReceiptDTO;
import com.jwipc.finance.dto.InvoicedReceiptImportDTO;
import com.jwipc.finance.model.query.InvoicedDetailQuery;
import com.jwipc.page.PageView;
import com.jwipc.security.dto.CurrentUserDTO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author shenyang.ou
 * @date 2024/3/5 13:27
 * @desc
 */
public interface InvoicedReceiptLogic {

    /**
     * 根据开票申请单ID获取关联发票数据
     * @param iaId 开票申请单ID
     * @return 关联发票数据
     */
    List<InvoicedReceiptDTO> getInvoiceReceiptListByIaId(Long iaId);

    /**
     * 关联或取消关联发票
     * @param invoicedReceiptData 发票数据
     * @param iaId 开票申请单ID
     * @param currentUser 当前用户
     */
    void operateInvoice(List<InvoicedReceiptDTO> invoicedReceiptData, Long iaId, CurrentUserDTO currentUser);

    PageView getInvoiceReceiptListByQuery(InvoicedDetailQuery query);

    List<InvoicedReceiptDTO> listAll(InvoicedDetailQuery query);

    void updateDeductionStatus(List<String> idList, String deductionStatus, String note);

    List<InvoicedReceiptImportDTO> importData(MultipartFile file);
}
