1
This commit is contained in:
@@ -231,10 +231,6 @@ func doPrint(t *TcpClient, key string) (err error) {
|
|||||||
if t.TimeoutMap[key] == true {
|
if t.TimeoutMap[key] == true {
|
||||||
select {
|
select {
|
||||||
case printMsg, ok := <-t.MsgMap[key]:
|
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 {
|
if !ok {
|
||||||
globals.SugarLogger.Debugf("doPrint err !ok ...")
|
globals.SugarLogger.Debugf("doPrint err !ok ...")
|
||||||
return
|
return
|
||||||
@@ -309,7 +305,7 @@ func doPrint(t *TcpClient, key string) (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} 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()
|
t.Clients[b].StatusTime = time.Now()
|
||||||
|
|||||||
@@ -670,6 +670,7 @@ func Heartbeat(c net.Conn, t *TcpClient, data string, printNo string) {
|
|||||||
//状态不一致再更新状态(可能缺纸了,过热了等)
|
//状态不一致再更新状态(可能缺纸了,过热了等)
|
||||||
t.setPrintStatus(printNo, status)
|
t.setPrintStatus(printNo, status)
|
||||||
changePrinterStatus(printNo, status)
|
changePrinterStatus(printNo, status)
|
||||||
|
doPrint(t, printNo)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Callback 打印成功回调
|
// Callback 打印成功回调
|
||||||
|
|||||||
Reference in New Issue
Block a user