qixiaoning
2025-08-26 2919bea2ffc28003aaefdf9619dc39cda11c1fd1
push-service/controllers/pushSet.go
@@ -1,10 +1,11 @@
package controllers
import (
   "basic.com/valib/bhomeclient.git"
   "basic.com/valib/logger.git"
   "vamicro/config"
   "vamicro/push-service/vo"
   "basic.com/valib/bhomeclient.git"
   "basic.com/valib/logger.git"
)
type PushSetController struct {
@@ -31,23 +32,37 @@
      Alias:   "camInfo",
      Checked: true,
      Children: []vo.PushSetMenu{
         {Checked: true, Id: "cameraId", Name: "摄像机ID", Alias: "cameraId"},
         {Checked: true, Id: "cameraName", Name: "摄像机名称", Alias: "cameraName"},
         {Checked: true, Id: "cameraAddr", Name: "摄像机地址", Alias: "cameraAddr"},
         {Checked: true, Id: "camera_id", Name: "摄像机ID", Alias: "camera_id"},
         {Checked: true, Id: "camera_name", Name: "摄像机名称", Alias: "camera_name"},
         {Checked: true, Id: "camera_addr", Name: "摄像机地址", Alias: "camera_addr"},
      },
   }
   sceneInfoSet := vo.PushSetMenu{
      Id:      "alarmRules", //报警规则
      Name:    "场景信息",
      Alias:   "alarmRules",
   // sceneInfoSet := vo.PushSetMenu{
   //    Id:      "alarmRules", //报警规则
   //    Name:    "场景信息",
   //    Alias:   "alarmRules",
   //    Checked: true,
   //    Children: []vo.PushSetMenu{
   //       {Checked: true, Id: "taskId", Name: "场景ID", Alias: "taskId"},
   //       {Checked: true, Id: "taskName", Name: "场景名称", Alias: "taskName"},
   //       {Checked: true, Id: "alarmRules.#.alarmLevel", Name: "事件等级", Alias: "alarmLevel"},
   //       {Checked: true, Id: "alarmRules.#.ruleText", Name: "场景描述", Alias: "groupText"},
   //       {Checked: true, Id: "alarmRules.#.linkInfo", Name: "联动信息", Alias: "linkInfo"},
   //       {Checked: true, Id: "alarmRules.#.groupId", Name: "报警规则组id", Alias: "groupId"},
   //    },
   // }
   taskInfoSet := vo.PushSetMenu{
      Id:      "aiTasks", //ai任务
      Name:    "任务信息",
      Alias:   "aiTasks",
      Checked: true,
      Children: []vo.PushSetMenu{
         {Checked: true, Id: "taskId", Name: "场景ID", Alias: "taskId"},
         {Checked: true, Id: "taskName", Name: "场景名称", Alias: "taskName"},
         {Checked: true, Id: "alarmRules.#.alarmLevel", Name: "事件等级", Alias: "alarmLevel"},
         {Checked: true, Id: "alarmRules.#.ruleText", Name: "场景描述", Alias: "groupText"},
         {Checked: true, Id: "alarmRules.#.linkInfo", Name: "联动信息", Alias: "linkInfo"},
         {Checked: true, Id: "alarmRules.#.groupId", Name: "报警规则组id", Alias: "groupId"},
         {Checked: true, Id: "task_id", Name: "任务id", Alias: "task_id"},
         {Checked: true, Id: "task_name", Name: "任务名称", Alias: "task_name"},
         {Checked: true, Id: "event_level", Name: "事件等级", Alias: "event_level"},
         {Checked: true, Id: "working_time", Name: "时间段", Alias: "working_time"},
         {Checked: true, Id: "rules", Name: "任务描述", Alias: "rules"},
         {Checked: true, Id: "task_description", Name: "备注", Alias: "task_description"},
      },
   }
   serverSet := vo.PushSetMenu{
@@ -56,9 +71,9 @@
      Alias:   "serverInfo",
      Checked: true,
      Children: []vo.PushSetMenu{
         {Checked: true, Id: "analyServerId", Name: "设备ID", Alias: "analyServerId"},
         {Checked: true, Id: "analyServerIp", Name: "设备IP", Alias: "analyServerIp"},
         {Checked: true, Id: "analyServerName", Name: "设备名称", Alias: "analyServerName"},
         {Checked: true, Id: "analy_server_id", Name: "设备ID", Alias: "analy_server_id"},
         {Checked: true, Id: "analy_server_ip", Name: "设备IP", Alias: "analy_server_ip"},
         {Checked: true, Id: "analy_server_name", Name: "设备名称", Alias: "analy_server_name"},
      },
   }
   dataSet := vo.PushSetMenu{
@@ -68,76 +83,68 @@
      Checked: true,
      Children: []vo.PushSetMenu{
         {Checked: true, Id: "id", Name: "主键ID", Alias: "id"},
         {Checked: true, Id: "isDelete", Name: "是否删除", Alias: "isDelete"},
         {Checked: true, Id: "likeDate", Name: "比对时间", Alias: "likeDate"},
         {Checked: true, Id: "picDate", Name: "抓拍时间", Alias: "picDate"},
         {Checked: true, Id: "updateTime", Name: "更新时间", Alias: "updateTime"},
         {Checked: true, Id: "picMaxUrl", Name: "告警全景图地址", Alias: "picMaxUrl"},
         {Checked: true, Id: "picSrcUrl", Name: "原始全景图地址", Alias: "picSrcUrl"},
         {Checked: true, Id: "picId", Name: "图片ID", Alias: "picId"},
         {Checked: true, Id: "picWH.picH", Name: "图片高", Alias: "picH"},
         {Checked: true, Id: "picWH.picW", Name: "图片宽", Alias: "picW"},
         {Checked: true, Id: "sdkName", Name: "sdk类型", Alias: "sdkName"},
         {Checked: true, Id: "videoUrl", Name: "录像地址", Alias: "videoUrl"},
         {Checked: true, Id: "content", Name: "场景名称", Alias: "content"},
         {Checked: true, Id: "linkTag", Name: "联动任务标志", Alias: "linkTag"},
         {Checked: true, Id: "otherLabels", Name: "其他标签", Alias: "otherLebels"},
         {Checked: true, Id: "showLabels", Name: "算法标签", Alias: "showLabels"},
         {Checked: true, Id: "version", Name: "索引版本", Alias: "version"},
         {Checked: true, Id: "isAlarm", Name: "是否报警", Alias: "isAlarm"},
         {Checked: true, Id: "detect_time", Name: "创建时间", Alias: "detect_time"},
         {Checked: true, Id: "zh_desc_class", Name: "中文描述", Alias: "zh_desc_class"},
         {Checked: true, Id: "image_path", Name: "图像地址", Alias: "image_path"},
         {Checked: true, Id: "video_path", Name: "录像地址", Alias: "video_path"},
         {Checked: true, Id: "event_level_name", Name: "事件等级", Alias: "event_level_name"},
         {Checked: true, Id: "suggestion", Name: "处理建议", Alias: "suggestion"},
         {Checked: true, Id: "risk_description", Name: "隐患描述", Alias: "risk_description"},
         {Checked: true, Id: "is_warning", Name: "是否预警", Alias: "is_warning"},
      },
   }
   detectAreaSet := vo.PushSetMenu{
      Id:      "detectAreaInfo",
      Name:    "检测区域",
      Alias:   "detectAreaInfo",
      Checked: true,
      Children: []vo.PushSetMenu{
         {Checked: true, Id: "targetInfo.#.areaId", Name: "检测区域id", Alias: "areaId"},
         {Checked: true, Id: "targetInfo.#.areaName", Name: "检测区域名称", Alias: "areaName"},
      },
   }
   targetSet := vo.PushSetMenu{
      Id:      "targetInfo",
      Name:    "目标",
      Alias:   "targetInfo",
      Checked: true,
      Children: []vo.PushSetMenu{
         {Checked: true, Id: "targetInfo.#.attribute", Name: "算法属性", Alias: "attribute"},
         {Checked: true, Id: "targetInfo.#.targetLocation", Name: "目标坐标", Alias: "targetLocation"},
         {Checked: true, Id: "targetInfo.#.targetScore", Name: "目标置信度", Alias: "targetScore"},
         {Checked: true, Id: "targetInfo.#.targetType", Name: "目标类别", Alias: "targetType"},
      },
   }
   dtSet := vo.PushSetMenu{
      Id:      "tableInfo",
      Name:    "底库信息",
      Alias:   "tableInfo",
      Checked: true,
      Children: []vo.PushSetMenu{
         {Checked: true, Id: "baseInfo.#.tableId", Name: "底库ID", Alias: "tableId"},
         {Checked: true, Id: "baseInfo.#.tableName", Name: "底库名称", Alias: "tableName"},
         {Checked: true, Id: "baseInfo.#.bwType", Name: "黑白名单", Alias: "bwType"},
         {Checked: true, Id: "baseInfo.#.targetPicUrl", Name: "目标抓拍图片", Alias: "targetPicUrl"},
         {Checked: true, Id: "baseInfo.#.compareScore", Name: "相似度", Alias: "compareScore"},
         {Checked: true, Id: "baseInfo.#.content", Name: "内容", Alias: "content"},
      },
   }
   dbpInfo := vo.PushSetMenu{
      Id:      "baseInfo",
      Name:    "底库人员信息",
      Alias:   "baseInfo",
      Checked: true,
      Children: []vo.PushSetMenu{
         {Checked: true, Id: "baseInfo.#.targetId", Name: "目标ID", Alias: "targetId"},
         {Checked: true, Id: "baseInfo.#.targetName", Name: "姓名", Alias: "targetName"},
         {Checked: true, Id: "baseInfo.#.sex", Name: "性别", Alias: "sex"},
         {Checked: true, Id: "baseInfo.#.idCard", Name: "身份证号", Alias: "idCard"},
         {Checked: true, Id: "baseInfo.#.phoneNum", Name: "手机号", Alias: "phoneNum"},
         {Checked: true, Id: "baseInfo.#.monitorLevel", Name: "人员等级", Alias: "monitorLevel"},
      },
   }
   set = append(set, camInfoSet, sceneInfoSet, serverSet, dataSet, detectAreaSet, targetSet, dtSet, dbpInfo)
   // detectAreaSet := vo.PushSetMenu{
   //    Id:      "detectAreaInfo",
   //    Name:    "检测区域",
   //    Alias:   "detectAreaInfo",
   //    Checked: true,
   //    Children: []vo.PushSetMenu{
   //       {Checked: true, Id: "targetInfo.#.areaId", Name: "检测区域id", Alias: "areaId"},
   //       {Checked: true, Id: "targetInfo.#.areaName", Name: "检测区域名称", Alias: "areaName"},
   //    },
   // }
   // targetSet := vo.PushSetMenu{
   //    Id:      "targetInfo",
   //    Name:    "目标",
   //    Alias:   "targetInfo",
   //    Checked: true,
   //    Children: []vo.PushSetMenu{
   //       {Checked: true, Id: "targetInfo.#.attribute", Name: "算法属性", Alias: "attribute"},
   //       {Checked: true, Id: "targetInfo.#.targetLocation", Name: "目标坐标", Alias: "targetLocation"},
   //       {Checked: true, Id: "targetInfo.#.targetScore", Name: "目标置信度", Alias: "targetScore"},
   //       {Checked: true, Id: "targetInfo.#.targetType", Name: "目标类别", Alias: "targetType"},
   //    },
   // }
   // dtSet := vo.PushSetMenu{
   //    Id:      "tableInfo",
   //    Name:    "底库信息",
   //    Alias:   "tableInfo",
   //    Checked: true,
   //    Children: []vo.PushSetMenu{
   //       {Checked: true, Id: "baseInfo.#.tableId", Name: "底库ID", Alias: "tableId"},
   //       {Checked: true, Id: "baseInfo.#.tableName", Name: "底库名称", Alias: "tableName"},
   //       {Checked: true, Id: "baseInfo.#.bwType", Name: "黑白名单", Alias: "bwType"},
   //       {Checked: true, Id: "baseInfo.#.targetPicUrl", Name: "目标抓拍图片", Alias: "targetPicUrl"},
   //       {Checked: true, Id: "baseInfo.#.compareScore", Name: "相似度", Alias: "compareScore"},
   //       {Checked: true, Id: "baseInfo.#.content", Name: "内容", Alias: "content"},
   //    },
   // }
   // dbpInfo := vo.PushSetMenu{
   //    Id:      "baseInfo",
   //    Name:    "底库人员信息",
   //    Alias:   "baseInfo",
   //    Checked: true,
   //    Children: []vo.PushSetMenu{
   //       {Checked: true, Id: "baseInfo.#.targetId", Name: "目标ID", Alias: "targetId"},
   //       {Checked: true, Id: "baseInfo.#.targetName", Name: "姓名", Alias: "targetName"},
   //       {Checked: true, Id: "baseInfo.#.sex", Name: "性别", Alias: "sex"},
   //       {Checked: true, Id: "baseInfo.#.idCard", Name: "身份证号", Alias: "idCard"},
   //       {Checked: true, Id: "baseInfo.#.phoneNum", Name: "手机号", Alias: "phoneNum"},
   //       {Checked: true, Id: "baseInfo.#.monitorLevel", Name: "人员等级", Alias: "monitorLevel"},
   //    },
   // }
   // set = append(set, camInfoSet, sceneInfoSet, serverSet, dataSet, detectAreaSet, targetSet, dtSet, dbpInfo)
   set = append(set, camInfoSet, taskInfoSet, serverSet, dataSet)
   return &bhomeclient.Reply{Success: true, Data: set}
}