package com.jwipc.sys.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jwipc.sys.entity.BusinessAttachment;
import com.jwipc.sys.model.po.BusinessAttachmentPO;
import com.jwipc.sys.model.query.BusinessAttachmentQuery;

import java.util.List;

/**
 * <p>
 *  业务附件关系表 服务类
 * </p>
 *
 * @author Chen Tianshi
 * @since 2025/9/11 12:12
 */
public interface IBusinessAttachmentService extends IService<BusinessAttachment> {
    List<BusinessAttachmentPO> queryByPage(Page<BusinessAttachment> dbPage, BusinessAttachmentQuery query);
    List<BusinessAttachmentPO> queryByPageByCodes(Page<BusinessAttachment> dbPage, BusinessAttachmentQuery query);

    List<String> findInvoiceByFileId(Long id);

    List<BusinessAttachmentPO> getListByBusinessId(Long businessId);

    BusinessAttachment getAccountByFileIdAndNotEqId(Long fileId, Long id);
    BusinessAttachment getPurchaseByFileIdAndNotEqId(Long fileId, Long id);
    BusinessAttachment getCustomsByFileIdAndNotEqId(Long fileId, Long id);
    BusinessAttachment getPaymentNoticeByFileIdAndNotEqId(Long fileId, Long id);

    BusinessAttachmentPO getDeliveryByPurchaseCode(String businessCode);
}
