1
This commit is contained in:
@@ -38,8 +38,11 @@ func (p PrinterHandler) PrintMsg(ctx *jxcontext.Context, sn, copies, voice, msgC
|
|||||||
if sn != "" {
|
if sn != "" {
|
||||||
//if globals.EnableStoreWrite {
|
//if globals.EnableStoreWrite {
|
||||||
printOrderID, err1 := api.TrendITAPI.Print(sn, msgContent, voice)
|
printOrderID, err1 := api.TrendITAPI.Print(sn, msgContent, voice)
|
||||||
|
globals.SugarLogger.Debugf("------err1 := %s", utils.Format4Output(err1, false))
|
||||||
if err1 == nil && printOrderID != "" {
|
if err1 == nil && printOrderID != "" {
|
||||||
printerStatus, err = p.GetPrinterStatus(ctx, sn, "")
|
printerStatus, err = p.GetPrinterStatus(ctx, sn, "")
|
||||||
|
globals.SugarLogger.Debugf("-printerStatus-----err1 := %s", utils.Format4Output(printerStatus, false))
|
||||||
|
globals.SugarLogger.Debugf("---err---err1 := %s", utils.Format4Output(err, false))
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
//} else {
|
//} else {
|
||||||
@@ -117,6 +120,8 @@ func (p PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store, s
|
|||||||
count := 0
|
count := 0
|
||||||
for {
|
for {
|
||||||
printerStatus, err := p.PrintMsg(ctx, store.PrinterSN, "", trenditapi.VoiceNewShort, content)
|
printerStatus, err := p.PrintMsg(ctx, store.PrinterSN, "", trenditapi.VoiceNewShort, content)
|
||||||
|
globals.SugarLogger.Debugf("------printerStatus := %s", utils.Format4Output(printerStatus, false))
|
||||||
|
globals.SugarLogger.Debugf("------err := %s", utils.Format4Output(err, false))
|
||||||
if (store.PrinterFontSize == partner.PrinterFontSizeBig2 || store.PrinterFontSize == partner.PrinterFontSizeNormal2) && count < 1 {
|
if (store.PrinterFontSize == partner.PrinterFontSizeBig2 || store.PrinterFontSize == partner.PrinterFontSizeNormal2) && count < 1 {
|
||||||
count += 1
|
count += 1
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user