This commit is contained in:
suyl
2021-07-09 15:35:10 +08:00
parent 65f3ac6330
commit 1441394923

View File

@@ -206,23 +206,6 @@ func handleConn(c net.Conn) {
)
if printMsg != nil {
if err = checkPrintMsg(printMsg); err == nil {
if tcpClient.Clients[printMsg.PrintNo] != nil {
if tcpClient.Clients[printMsg.PrintNo].C != nil {
c = tcpClient.Clients[printMsg.PrintNo].C
data, err = buildMsg(printMsg)
}
}
}
}
if err != nil {
printMsg.Status = printMsgErr
printMsg.Comment = err.Error()
dao.UpdateEntity(db, printMsg, "Status", "Comment")
delete(tcpClient.Clients, printMsg.PrintNo)
if c != nil {
c.Close()
}
} else {
if c != nil {
if _, err = c.Write(data); err != nil {
globals.SugarLogger.Debugf("handleTcpMessages err [%v]", err)
@@ -236,6 +219,7 @@ func handleConn(c net.Conn) {
}
}
}
}
} else {
//改变打印机状态
//changePrinterStatus(printNo, printerStatusOnline)