package cn.superdesk.uniorder.dubbo.facade.invoice.customer.state;

import cn.superdesk.uniorder.common.exception.UnifiedOrderRuntimeException;
import cn.superdesk.uniorder.common.security.dto.LoginSysUser;
import cn.superdesk.uniorder.dao.entity.invoice.customer.InvoiceApply;
import cn.superdesk.uniorder.dao.entity.sys.notify.SysNotify;
import cn.superdesk.uniorder.dto.param.thirdpart.szhtxx.common.singleBilling.SzhtxxInvoiceFptxxOpSingleBillingForm;
import cn.superdesk.uniorder.dto.param.thirdpart.szhtxx.common.singleSelect.SzhtxxInvoiceFptxxOpSingleSelectForm;
import cn.superdesk.uniorder.dto.vo.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxListItemVo;
import cn.superdesk.uniorder.openapicall.thirdpart.szhtxx.electronicInvoice.dto.request.SingleBillingRequestBodyKpContent;
import cn.superdesk.uniorder.openapicall.thirdpart.szhtxx.paperInvoice.dto.request.SID17SingleSelect.SID17SingleSelectRequestBody;
import cn.superdesk.uniorder.openapicall.thirdpart.szhtxx.paperInvoice.dto.request.SID1SingleBilling.SID1SingleBillingRequestBody;

/**
 * @Description: 简易状态机 星型结构
 * @Author: linjinyu
 * @CreateDate: 10/12/20 4:28 PM
 * @UpdateUser: linjinyu
 * @UpdateDate: 10/12/20 4:28 PM
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
public interface DubboInvoiceApplyFieldMakeInvoiceStatusService {

    /****************************************** 状态机 外部使用 类门面 start ******************************************/

    // 状态流转为 待开票(0, "待开票")
    SysNotify opInit(InvoiceApply entity, LoginSysUser loginSysUser);

    // 状态流转为 已作废(2, "已作废")
    SysNotify opBecomeInvalid(InvoiceApply entity, LoginSysUser loginSysUser);


    /**************************************** 电子普通发票-深圳航信电子发票 start ****************************************/

    // 状态流转为 开票中(10, "开票中")
    SingleBillingRequestBodyKpContent opOngoingInvoiceTypeEq1InvoiceModeEqSzhtxxElectronicInvoice(
            SzhtxxInvoiceFptxxOpSingleBillingForm form,
            InvoiceApply entity,
            LoginSysUser loginSysUser);

    //
    String exportOngoingInvoiceTypeEq1InvoiceModeEqSzhtxxElectronicInvoice(
            SzhtxxInvoiceFptxxOpSingleBillingForm form, InvoiceApply entity, LoginSysUser loginSysUser);

    SingleBillingRequestBodyKpContent opOngoingInvoiceTypeEq1InvoiceModeEqSzhtxxElectronicInvoiceRedWrite(
            SzhtxxInvoiceFptxxOpSingleBillingForm form,
            SzhtxxElectronicInvoiceFptxxListItemVo fptxxListItemVo,
            InvoiceApply entity,
            LoginSysUser loginSysUser) throws UnifiedOrderRuntimeException;

    // 状态流转为 开票中(10, "开票中")
    SysNotify opOngoing(SzhtxxInvoiceFptxxOpSingleBillingForm form, InvoiceApply entity, LoginSysUser loginSysUser);

    /**************************************** 电子普通发票-深圳航信电子发票   end ****************************************/


    /**************************************** 纸质专用发票-深圳航信纸质发票 start ****************************************/

    SID1SingleBillingRequestBody opOngoingInvoiceTypeEq2InvoiceModeEqSzhtxxPaperInvoice(
            SzhtxxInvoiceFptxxOpSingleBillingForm form,
            InvoiceApply entity,
            LoginSysUser loginSysUser);

    SID17SingleSelectRequestBody opCompleteInvoiceTypeEq2InvoiceModeEqSzhtxxPaperInvoiceRequest(
            SzhtxxInvoiceFptxxOpSingleSelectForm form,
            InvoiceApply entity,
            LoginSysUser loginSysUser);

    SysNotify opCompleteInvoiceTypeEq2InvoiceModeEqSzhtxxPaperInvoiceResponse(
            SzhtxxInvoiceFptxxOpSingleSelectForm form,
            InvoiceApply entity,
            LoginSysUser loginSysUser);

    /**************************************** 纸质专用发票-深圳航信纸质发票   end ****************************************/


    // 状态流转为 已开票(11, "已开票")
    SysNotify opComplete(InvoiceApply entity, LoginSysUser loginSysUser);

    /****************************************** 状态机 外部使用 类门面   end ******************************************/

}
