package bwfapiao // 定义响应结构体 type UnifiedLoginResponse struct { Success bool `json:"success"` // 接口调用成功或失败的标志 Method string `json:"method"` // 接口的唯一标识 RequestId string `json:"requestId"` // 请求唯一标识 Response *LoginResponseData `json:"response,omitempty"` // 业务响应信息 ErrorResponse *ErrorResponse `json:"errorResponse,omitempty"` // 错误响应信息 } type LoginResponseData struct { DigitAccount string `json:"digitAccount"` // 数电账号 LoginType string `json:"loginType"` // 登录方式 BatchNo string `json:"batchNo"` // 批次号 (操作类型为2时返回) Status string `json:"status"` // 状态: 1-成功, 2-进行中, 3-失败 StatusMessage string `json:"statusMessage"` // 状态描述 QRCode string `json:"qrCode"` // 二维码 (操作类型为2,状态为1时返回) QRCodeId string `json:"qrCodeId"` // 二维码字符串 EndTime string `json:"endTime"` // 二维码/短信有效期截止时间 } type ErrorResponse struct { Code int `json:"code"` // 错误码 (开放平台错误码) Message string `json:"message"` // 错误信息 (开放平台错误信息) SubCode string `json:"subCode"` // 业务端返回错误码 SubMessage string `json:"subMessage"` // 业务端返回错误信息 } type SEinvoicebasicGetLoginResultResponse struct { Success bool `json:"success"` // 接口调用是否成功 Method string `json:"method"` // 接口的唯一标识 RequestID string `json:"requestId"` // 请求唯一标识 Response LoginResponse `json:"response"` // 业务响应数据 ErrorResponse ErrorResponse `json:"errorResponse"` // 错误响应信息 } // 登录状态的业务数据 type LoginResponse struct { DigitAccount string `json:"digitAccount"` // 数电账号(电子税局实名手机号) LoginStatus string `json:"loginStatus"` // 登录状态 (0-未登录, 1-已登录, 2-登录中) LoginType string `json:"loginType"` // 登录方式 (0-账号密码, 1-短信验证码, 2-税务APP扫码, 3-个税APP扫码) } type GetCertifyQrcodeResponse struct { Success bool `json:"success"` Response GetCertifyQrcodeData `json:"response"` ErrorResponse GetCertifyQrcodeError `json:"error_response"` } type GetCertifyQrcodeData struct { QRCode string `json:"qrCode"` // 二维码链接 ExpireTime string `json:"expireTime"` // 有效期截止时间 } type GetCertifyQrcodeError struct { Code int `json:"code"` Message string `json:"message"` } type GetQrcodeCertifyResultResponse struct { Success bool `json:"success"` Response QrcodeCertifyResultData `json:"response"` ErrorResponse QrcodeCertifyResultError `json:"error_response"` } type QrcodeCertifyResultData struct { TaxNo string `json:"taxNo"` // 税号 DigitAccount string `json:"digitAccount"` // 数电账号 AuthId string `json:"authId"` // 认证编号 CertificationStatus string `json:"certificationStatus"` // 认证状态 CertStatusMessage string `json:"certStatusMessage"` // 状态描述 } type QrcodeCertifyResultError struct { Code int `json:"code"` // 错误码 Message string `json:"message"` // 错误信息 SubCode string `json:"subCode"` // 子错误码 SubMessage string `json:"subMessage"` // 子错误信息 } // 公共响应参数 type CommonResponse struct { Success bool `json:"success"` // 接口调用成功或失败的标志 Method string `json:"method"` // 接口的唯一标识 RequestID string `json:"requestId"` // 请求唯一标识 Response interface{} `json:"response"` // 业务接口调用成功后的具体响应信息 ErrorResponse ErrorResponse `json:"errorResponse"` // 错误响应信息 } // 定义响应结构体 type RedAddResponse struct { Success bool `json:"success"` // 接口调用成功或失败的标志 Method string `json:"method"` // 接口的唯一标识 RequestId string `json:"requestId"` // 请求唯一标识 Response []RedAddInvoiceData `json:"response,omitempty"` // 业务响应信息 ErrorResponse ErrorResponse `json:"errorResponse,omitempty"` // 错误响应信息 } type RedAddInvoiceData struct { RedConfirmUUID string `json:"redConfirmUuid"` RedInvoiceNo string `json:"redInvoiceNo"` ConfirmState string `json:"confirmState"` RedConfirmNo string `json:"redConfirmNo"` ConfirmBillingMark string `json:"confirmBillingMark"` RedConfirmSerialNo string `json:"redConfirmSerialNo"` } // 定义响应结构体 type RedOperaResponse struct { Success bool `json:"success"` // 接口调用成功或失败的标志 Method string `json:"method"` // 接口的唯一标识 RequestId string `json:"requestId"` // 请求唯一标识 Response []RedOperaInvoiceData `json:"response,omitempty"` // 业务响应信息 ErrorResponse ErrorResponse `json:"errorResponse,omitempty"` // 错误响应信息 } type RedOperaInvoiceData struct { RedConfirmUUID string `json:"redConfirmUuid"` RedInvoiceNo string `json:"redInvoiceNo"` ConfirmState string `json:"confirmState"` RedConfirmNo string `json:"redConfirmNo"` ConfirmBillingMark string `json:"confirmBillingMark"` RedConfirmSerialNo string `json:"redConfirmSerialNo"` } type InvoiceIssueResponse struct { Method string `json:"method"` Success bool `json:"success"` RequestID string `json:"requestId"` Response InvoiceIssueResponseData `json:"response"` ErrorResponse ErrorResponse `json:"errorResponse,omitempty"` // 错误响应信息 } type InvoiceIssueResponseData struct { Fail []InvoiceIssueFailData `json:"fail"` Success []InvoiceIssueSuccessData `json:"success"` } type InvoiceIssueFailData struct { InvoiceTotalPrice float64 `json:"invoiceTotalPrice"` InvoiceTotalTax float64 `json:"invoiceTotalTax"` InvoiceTotalPriceTax float64 `json:"invoiceTotalPriceTax"` SerialNo string `json:"serialNo"` InvoiceDetailsList []InvoiceDetailsFailItemData `json:"invoiceDetailsList"` } type InvoiceDetailsFailItemData struct { PriceTaxMark string `json:"priceTaxMark"` GoodsTaxRate float64 `json:"goodsTaxRate"` InvoiceLineNature string `json:"invoiceLineNature"` GoodsTotalPrice float64 `json:"goodsTotalPrice"` GoodsSpecification string `json:"goodsSpecification"` GoodsPrice float64 `json:"goodsPrice"` FreeTaxMark string `json:"freeTaxMark"` GoodsQuantity string `json:"goodsQuantity"` GoodsUnit string `json:"goodsUnit"` GoodsTotalTax float64 `json:"goodsTotalTax"` GoodsCode string `json:"goodsCode"` PreferentialMark string `json:"preferentialMark"` GoodsName string `json:"goodsName"` GoodsLineNo string `json:"goodsLineNo"` VatSpecialManagement string `json:"vatSpecialManagement"` } type InvoiceIssueSuccessData struct { PaperInvoiceCode string `json:"paperInvoiceCode"` EInvoiceUrl string `json:"eInvoiceUrl"` InvoiceTotalTax float64 `json:"invoiceTotalTax"` InvoiceDate string `json:"invoiceDate"` InvoiceCode string `json:"invoiceCode"` InvoiceTotalPriceTax float64 `json:"invoiceTotalPriceTax"` SerialNo string `json:"serialNo"` MulPurchaserList []MulPurchaserItemData `json:"mulPurchaserList"` TaxControlCode string `json:"taxControlCode"` InvoiceCheckCode string `json:"invoiceCheckCode"` InvoiceQrCode string `json:"invoiceQrCode"` InvoiceTotalPrice float64 `json:"invoiceTotalPrice"` InvoiceDetailsList []InvoiceDetailsSuccessItemData `json:"invoiceDetailsList"` InvoiceTypeCode string `json:"invoiceTypeCode"` PaperInvoiceNo string `json:"paperInvoiceNo"` InvoiceNo string `json:"invoiceNo"` MulPurchaserMark string `json:"mulPurchaserMark"` } type MulPurchaserItemData struct { Purchaser string `json:"purchaser"` CertificateNo string `json:"certificateNo"` CertificateType string `json:"certificateType"` } type InvoiceDetailsSuccessItemData struct { PriceTaxMark string `json:"priceTaxMark"` GoodsTaxRate float64 `json:"goodsTaxRate"` GoodsSpecification string `json:"goodsSpecification"` GoodsPrice float64 `json:"goodsPrice"` GoodsQuantity float64 `json:"goodsQuantity"` GoodsUnit string `json:"goodsUnit"` GoodsTotalTax float64 `json:"goodsTotalTax"` GoodsCode string `json:"goodsCode"` GoodsName string `json:"goodsName"` GoodsLineNo int `json:"goodsLineNo"` GoodsTotalPrice float64 `json:"goodsTotalPrice"` } // 定义响应结构体 type BanShiResponse struct { Success bool `json:"success"` // 接口调用成功或失败的标志 Method string `json:"method"` // 接口的唯一标识 RequestId string `json:"requestId"` // 请求唯一标识 Response BanShiInvoiceData `json:"response,omitempty"` // 业务响应信息 ErrorResponse ErrorResponse `json:"errorResponse,omitempty"` // 错误响应信息 } type BanShiInvoiceData struct { EInvoiceUrl string `json:"eInvoiceUrl"` FileType string `json:"fileType"` ConfirmState string `json:"confirmState"` UrlMap Urls `json:"urlMap"` } type Urls struct { PdfUrl string `json:"pdfUrl"` OfdUrl string `json:"ofdUrl"` XmlUrl string `json:"xmlUrl"` }