aa
This commit is contained in:
@@ -192,25 +192,23 @@ func (t *TcpClient) doPrint(key string) (err error) {
|
|||||||
err = fmt.Errorf("打印机状态未知!")
|
err = fmt.Errorf("打印机状态未知!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
if err != nil {
|
||||||
err = fmt.Errorf("未查询到此printMsg")
|
globals.SugarLogger.Debugf("doPrint2 err printNo:%s, msgID:%s, err: %s", printMsg.PrintNo, printMsg.MsgID, err.Error())
|
||||||
}
|
//t.delConn(printMsg.PrintNo)
|
||||||
if err != nil {
|
printMsg.Status = printMsgErr
|
||||||
globals.SugarLogger.Debugf("doPrint2 err printNo:%s, msgID:%s, err: %s", printMsg.PrintNo, printMsg.MsgID, err.Error())
|
printMsg.Comment = err.Error()
|
||||||
//t.delConn(printMsg.PrintNo)
|
dao.UpdateEntity(db, printMsg, "Status", "Comment")
|
||||||
printMsg.Status = printMsgErr
|
} else {
|
||||||
printMsg.Comment = err.Error()
|
if c != nil {
|
||||||
dao.UpdateEntity(db, printMsg, "Status", "Comment")
|
if _, err = c.Write(data); err != nil {
|
||||||
} else {
|
globals.SugarLogger.Debugf("handleTcpMessages err [%v]", err)
|
||||||
if c != nil {
|
t.delConn(printMsg.PrintNo)
|
||||||
if _, err = c.Write(data); err != nil {
|
} else {
|
||||||
globals.SugarLogger.Debugf("handleTcpMessages err [%v]", err)
|
globals.SugarLogger.Debugf("handleTcpMessages success, data: %v", hex.EncodeToString(data))
|
||||||
t.delConn(printMsg.PrintNo)
|
dataStr := <-t.CallBackMap[printMsg.PrintNo]
|
||||||
} else {
|
a, b := getCallbackMsgInfo(dataStr)
|
||||||
globals.SugarLogger.Debugf("handleTcpMessages success, data: %v", hex.EncodeToString(data))
|
t.changePrintMsg(dataStr, a, b)
|
||||||
dataStr := <-t.CallBackMap[printMsg.PrintNo]
|
}
|
||||||
a, b := getCallbackMsgInfo(dataStr)
|
|
||||||
t.changePrintMsg(dataStr, a, b)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user