zhangzengfei
2024-08-22 7a2e14a72aa75d3dbdbe0944be2a05b88866150f
修复楼层运行状态的记录
2个文件已修改
27 ■■■■ 已修改文件
repository/captureRepo.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/nvcs.go 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
repository/captureRepo.go
@@ -93,7 +93,7 @@
            }
            // 处理梯控填写的楼层信息 暂时使用otherFeature字段
            if face.OtherFeature != "" {
            if face.OtherFeature != "" && pd.CameraFloor == "" {
                pd.CameraFloor, _ = pkg.RestoreFloor(face.OtherFeature)
            }
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)