1
This commit is contained in:
@@ -40,6 +40,7 @@ const (
|
|||||||
printerStatusOnlineWithoutPaper = 2 //在线缺纸
|
printerStatusOnlineWithoutPaper = 2 //在线缺纸
|
||||||
printerStatusOnline = 1 //在线
|
printerStatusOnline = 1 //在线
|
||||||
printerStatusOffline = -1 //离线
|
printerStatusOffline = -1 //离线
|
||||||
|
printerStatusOfflineAll = -9 //其他异常状态
|
||||||
|
|
||||||
PrintSoundMaxNumber = 16 // 十六进制最大补位
|
PrintSoundMaxNumber = 16 // 十六进制最大补位
|
||||||
PlaceFillingParam = "0" // 补位参数
|
PlaceFillingParam = "0" // 补位参数
|
||||||
@@ -195,7 +196,7 @@ func (t *TcpClient) getPrintStatus(key string) int {
|
|||||||
if t.Clients[key] != nil {
|
if t.Clients[key] != nil {
|
||||||
return t.Clients[key].Status
|
return t.Clients[key].Status
|
||||||
} else {
|
} else {
|
||||||
return printerStatusOffline
|
return printerStatusOfflineAll
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,7 +341,7 @@ func changePrinterStatus(printNo string, status int) {
|
|||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
)
|
)
|
||||||
if printer, err := dao.GetPrinter(db, printNo); err == nil && printer != nil {
|
if printer, err := dao.GetPrinter(db, printNo); err == nil && printer != nil {
|
||||||
feilds := []string{}
|
var feilds []string
|
||||||
if printer.Status != status {
|
if printer.Status != status {
|
||||||
printer.Status = status
|
printer.Status = status
|
||||||
feilds = append(feilds, "Status")
|
feilds = append(feilds, "Status")
|
||||||
|
|||||||
Reference in New Issue
Block a user