This commit is contained in:
邹宗楠
2022-11-02 10:52:47 +08:00
parent e7b8c7a510
commit 308801a465

View File

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