1
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"net"
|
||||
"regexp"
|
||||
"time"
|
||||
@@ -441,7 +440,6 @@ func GetPrinterStatus(appID int, printNo string) (status int, err error) {
|
||||
)
|
||||
//看有没有
|
||||
printers, _ := dao.GetPrinters(db, appID, printNo, 0, 0)
|
||||
globals.SugarLogger.Debugf("---------printers := %s", utils.Format4Output(printers, false))
|
||||
if len(printers) == 0 {
|
||||
return status, fmt.Errorf("该应用下未找到该打印机!print_no : %v", printNo)
|
||||
} else {
|
||||
|
||||
@@ -368,7 +368,6 @@ func getCallbackMsgInfo(data string) (orderNo int64, printNo string) {
|
||||
}
|
||||
|
||||
func changePrinterStatus(printNo string, status int) {
|
||||
globals.SugarLogger.Debugf("---------changePrinterStatus := %s --- %d", printNo, status)
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
@@ -658,7 +657,7 @@ func Heartbeat(c net.Conn, t *TcpClient, data string, printNo string, printRemot
|
||||
if status == printerStatusOnline {
|
||||
//t.printFail()
|
||||
}
|
||||
changePrinterStatus(printNo, status)
|
||||
//changePrinterStatus(printNo, status)
|
||||
// todo 暂时关闭心跳检测
|
||||
HandleCheckTcpHeart(t, printNo)
|
||||
// todo 证明打印机已经被激活,将激活打印机存入数据库,保证用户不能无限制绑定打印机
|
||||
|
||||
Reference in New Issue
Block a user