From 131945ff5bc769dbc1004e12a8afc832df275c96 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期四, 16 五月 2024 10:45:40 +0800 Subject: [PATCH] 人脸通知添加ExecuteOperation --- service/nvcs.go | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/service/nvcs.go b/service/nvcs.go index 7882db5..b2e9124 100644 --- a/service/nvcs.go +++ b/service/nvcs.go @@ -6,6 +6,7 @@ "fmt" "io/ioutil" "net" + "strings" "gat1400Exchange/config" "gat1400Exchange/models" @@ -90,10 +91,19 @@ } elevator := data.Elevator[0] + + // 绋嬪簭閮ㄧ讲鍦ㄨ澶囩, 瀛楃鍙犲姞鍣ㄤ笂鎶ョ殑鍚嶇О鍏佽涓虹┖. 鍦ㄤ簯绔�, 鍚嶇О蹇呴』涓庢憚鍍忔満鐩稿悓 + if !config.ClientConf.Enable { + elevator.Name = strings.Trim(elevator.Name, " ") + if elevator.Name == "" { + continue + } + } + var d = models.Device{ - Id: elevator.Name, - Pos: elevator.Status.FloorName, - Ip: elevator.IP, + Id: elevator.Name, + Floor: elevator.Status.FloorName, + Ip: elevator.IP, } err = d.Upsert() -- Gitblit v1.8.0