|
@@ -168,6 +168,8 @@ func (u *InvoiceService) InvoiceDownload(swno string, saleTax string, isRed stri
|
|
|
//排队中
|
|
|
//dat.ReturnMsg.MsgCode="1089"
|
|
|
|
|
|
+ //设备不在线
|
|
|
+ dat.ReturnMsg.MsgCode = "22"
|
|
|
//失败
|
|
|
//dat.ReturnMsg.MsgCode = "1000"
|
|
|
util.Loger.Println("发票下载:", "流水号:", swno, "结果:", dat)
|
|
@@ -181,28 +183,22 @@ func (u *InvoiceService) InvoiceDownload(swno string, saleTax string, isRed stri
|
|
|
fmt.Println(swno1)
|
|
|
pdfData := make(map[string]interface{})
|
|
|
path := util.ImgHandle(dat.FpMsgs[0].PdfContent, swno, saleTax, swno1)
|
|
|
- //path := "/c/v/c/v"
|
|
|
pdfData["path"] = path
|
|
|
pdfData["fpdm"] = dat.FpMsgs[0].Fpdm
|
|
|
pdfData["fphm"] = dat.FpMsgs[0].Fphm
|
|
|
pdfData["swno"] = swno
|
|
|
return pdfData, 0, dat.ReturnMsg.Msg
|
|
|
- //} else if dat.ReturnMsg.MsgCode == entity.LineUpCode || dat.ReturnMsg.MsgCode == entity.SealCode || dat.ReturnMsg.MsgCode == "20" || dat.ReturnMsg.MsgCode == entity.WaitCode {
|
|
|
- // if isLoop == 0 {
|
|
|
- // u.Timer(swno, saleTax, isRed, isfeedback, changed, resType, orderCode)
|
|
|
- // }
|
|
|
- // return nil, 2, dat.ReturnMsg.Msg
|
|
|
- //} else {
|
|
|
- // arr := strings.Split(entity.WarningEmail, ",")
|
|
|
- // util.SendPdf(arr, true, swno, "发票下载时出现问题,"+dat.ReturnMsg.Msg)
|
|
|
- // return nil, 1, dat.ReturnMsg.Msg
|
|
|
- //}
|
|
|
- } else {
|
|
|
+ } else if dat.ReturnMsg.MsgCode == entity.LineUpCode || dat.ReturnMsg.MsgCode == entity.SealCode || dat.ReturnMsg.MsgCode == "20" || dat.ReturnMsg.MsgCode == entity.WaitCode || dat.ReturnMsg.MsgCode == "22" {
|
|
|
if isLoop == 0 {
|
|
|
u.Timer(swno, saleTax, isRed, isfeedback, changed, resType, orderCode)
|
|
|
}
|
|
|
return nil, 2, dat.ReturnMsg.Msg
|
|
|
+ } else {
|
|
|
+ arr := strings.Split(entity.WarningEmail, ",")
|
|
|
+ util.SendPdf(arr, true, swno, "发票下载时出现问题,"+dat.ReturnMsg.Msg)
|
|
|
+ return nil, 1, dat.ReturnMsg.Msg
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// 发票是否存在
|