From 308801a465a07d83c73ff14d674178ed01a2e4ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 2 Nov 2022 10:52:47 +0800 Subject: [PATCH] 1 --- business/jxstore/event/event_tcp_utils.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/business/jxstore/event/event_tcp_utils.go b/business/jxstore/event/event_tcp_utils.go index 529bcda1d..df9b551db 100644 --- a/business/jxstore/event/event_tcp_utils.go +++ b/business/jxstore/event/event_tcp_utils.go @@ -40,6 +40,7 @@ const ( printerStatusOnlineWithoutPaper = 2 //在线缺纸 printerStatusOnline = 1 //在线 printerStatusOffline = -1 //离线 + printerStatusOfflineAll = -9 //其他异常状态 PrintSoundMaxNumber = 16 // 十六进制最大补位 PlaceFillingParam = "0" // 补位参数 @@ -195,7 +196,7 @@ func (t *TcpClient) getPrintStatus(key string) int { if t.Clients[key] != nil { return t.Clients[key].Status } else { - return printerStatusOffline + return printerStatusOfflineAll } } @@ -340,7 +341,7 @@ func changePrinterStatus(printNo string, status int) { db = dao.GetDB() ) if printer, err := dao.GetPrinter(db, printNo); err == nil && printer != nil { - feilds := []string{} + var feilds []string if printer.Status != status { printer.Status = status feilds = append(feilds, "Status")