From 482e48304c9670382c48f228692bc5c56f4326ba Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Tue, 29 Jun 2021 13:45:08 +0800 Subject: [PATCH] a --- business/jxstore/event/event_tcp.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index 336af57a2..8580a8a14 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -22,10 +22,11 @@ const ( printErrWithoutPaper = "05" - printMsgSuccess = 1 //打印成功 - printMsgWait = 0 //待打印 - printMsgFail = -1 //打印失败(打印机报出) - printMsgErr = -2 //京西报出 + printMsgAlreadySend = 2 //已经发出打印消息 + printMsgSuccess = 1 //打印成功 + printMsgWait = 0 //待打印 + printMsgFail = -1 //打印失败(打印机报出) + printMsgErr = -2 //京西报出 heartErrWithoutPaper = "04" //心跳错,缺纸 heartErrHot = "08" //过热 @@ -184,6 +185,8 @@ func HandleTcpMessages() { c.Close() } else { globals.SugarLogger.Debugf("handleTcpMessages success, data: %v", hex.EncodeToString(data)) + printMsg.Status = printMsgAlreadySend + dao.UpdateEntity(db, printMsg, "Status", "Comment") } } }