This commit is contained in:
邹宗楠
2024-07-10 10:35:10 +08:00
parent 0a9699d764
commit eee469ca48
2 changed files with 2 additions and 5 deletions

View File

@@ -231,10 +231,6 @@ func doPrint(t *TcpClient, key string) (err error) {
if t.TimeoutMap[key] == true {
select {
case printMsg, ok := <-t.MsgMap[key]:
if key == "120220915001467" {
globals.SugarLogger.Debugf("=msgMap=%s", utils.Format4Output(printMsg, false))
globals.SugarLogger.Debugf("=msgMapok=%s", utils.Format4Output(ok, false))
}
if !ok {
globals.SugarLogger.Debugf("doPrint err !ok ...")
return
@@ -309,7 +305,7 @@ func doPrint(t *TcpClient, key string) (err error) {
}
}
} else {
globals.SugarLogger.Debugf("查询打印机扣费记录错误 %s %d %s", err, a, b)
globals.SugarLogger.Debugf("查询打印机扣费记录错误 %s %d %s", err.Error(), a, b)
}
// 回调重置打印机状态时间
t.Clients[b].StatusTime = time.Now()

View File

@@ -670,6 +670,7 @@ func Heartbeat(c net.Conn, t *TcpClient, data string, printNo string) {
//状态不一致再更新状态(可能缺纸了,过热了等)
t.setPrintStatus(printNo, status)
changePrinterStatus(printNo, status)
doPrint(t, printNo)
}
// Callback 打印成功回调