package com.yc.ship.module.trade.service.invoice;


import com.yc.ship.framework.common.pojo.CommonResult;
import com.yc.ship.framework.common.pojo.PageResult;
import com.yc.ship.module.trade.api.invoice.dto.InvoicingReqDTO;
import com.yc.ship.module.trade.controller.admin.invoice.vo.InvoicePageReqVO;
import com.yc.ship.module.trade.controller.admin.invoice.vo.InvoiceRespVO;
import com.yc.ship.module.trade.dal.dataobject.invoice.InvoiceDO;

import java.util.List;


/**
 * 电子发票 Service 接口
 *
 * @author 管理员
 */
public interface InvoiceService {

    /**
     * 开票
     */
    CommonResult applyInvoicing(InvoicingReqDTO reqDTO);
    CommonResult applyReInvoicing(InvoicingReqDTO reqDTO);



    List<InvoiceDO> queryInvoiceOrder(String orderNo);

    String queryGroupInvoiceUrl(InvoiceDO invoice);

    /**
     * 获得电子发票
     *
     * @param id 编号
     * @return 电子发票
     */
    InvoiceDO getInvoice(Long id);

    List<InvoiceDO> getInvoices();

    /**
     * 获得电子发票分页
     *
     * @param pageReqVO 分页查询
     * @return 电子发票分页
     */
    PageResult<InvoiceRespVO> getInvoicePage(InvoicePageReqVO pageReqVO);

    void updateInvoice(InvoiceDO invoiceDO);

    PageResult<InvoiceDO> getAppInvoicePage(InvoicePageReqVO pageReqVO);

    InvoiceDO queryInvoice(Long id);

    InvoiceDO redInvoice(Long id);
}
