From 7a2e14a72aa75d3dbdbe0944be2a05b88866150f Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期四, 22 八月 2024 17:47:19 +0800
Subject: [PATCH] 修复楼层运行状态的记录
---
repository/captureRepo.go | 2 +-
service/nvcs.go | 25 +++++++++++++------------
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/repository/captureRepo.go b/repository/captureRepo.go
index b61c727..faa4b38 100644
--- a/repository/captureRepo.go
+++ b/repository/captureRepo.go
@@ -93,7 +93,7 @@
}
// 澶勭悊姊帶濉啓鐨勬ゼ灞備俊鎭� 鏆傛椂浣跨敤otherFeature瀛楁
- if face.OtherFeature != "" {
+ if face.OtherFeature != "" && pd.CameraFloor == "" {
pd.CameraFloor, _ = pkg.RestoreFloor(face.OtherFeature)
}
diff --git a/service/nvcs.go b/service/nvcs.go
index 6ea3caf..51bbba9 100644
--- a/service/nvcs.go
+++ b/service/nvcs.go
@@ -216,14 +216,15 @@
func NVCSA2WebServer() {
// 鍏堣幏鍙栨�绘ゼ灞傛暟, 璁板綍鏈�楂樺眰
- GetA2ElevatorConfig()
- var runState string
- var iRunState int
+ //GetA2ElevatorConfig()
r := gin.Default()
r.POST("/", func(c *gin.Context) {
var req A2ElevatorData
+ var runState string
+ var iRunState int
+
err := c.BindJSON(&req)
if err != nil {
c.JSON(http.StatusBadRequest, nil)
@@ -241,15 +242,15 @@
iRunState = RunDown
}
- // 宸插埌鏈�涓嬪眰
- if req.State.Floor == A2BottomFloor {
- runState = "涓�"
- iRunState = RunUp
- }
- if req.State.Floor == A2TopFloor {
- runState = "涓�"
- iRunState = RunDown
- }
+ //// 宸插埌鏈�涓嬪眰
+ //if req.State.Floor == A2BottomFloor {
+ // runState = "涓�"
+ // iRunState = RunUp
+ //}
+ //if req.State.Floor == A2TopFloor {
+ // runState = "涓�"
+ // iRunState = RunDown
+ //}
if config.NVCSConf.OSD != "" {
floorText := fmt.Sprintf("%s%s %s", req.State.Floor, runState, config.NVCSConf.OSD)
--
Gitblit v1.8.0