From eac932eb827c93e2e998ac1210c3f5e548af0dbf Mon Sep 17 00:00:00 2001
From: qixiaoning <jony.kee@outlook.com>
Date: 星期四, 28 八月 2025 09:10:14 +0800
Subject: [PATCH] 推送回显地址bug,实时监控接口摄像机名称直接取video_point_name,

---
 chanmanage-service/service/pollSetService.go |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/chanmanage-service/service/pollSetService.go b/chanmanage-service/service/pollSetService.go
index 3fb386b..32c0845 100644
--- a/chanmanage-service/service/pollSetService.go
+++ b/chanmanage-service/service/pollSetService.go
@@ -176,12 +176,15 @@
 		}
 	}
 
+	//鑾峰彇鐫f煡浠诲姟
+	tasks := models.GetTasks()
+
 	rTotal := 0
 	pTotal := 0
 	for _, c := range camMap {
 		if c.RunType == bhomeclient.TYPE_RUNTYPE_REALTIME {
 			rTotal++
-			if crInfo, ok := ruleM[c.Id]; ok && crInfo.Rules != nil && len(crInfo.Rules) > 0 {
+			if taskInfo, ok := tasks[c.Id]; ok && taskInfo != nil && len(taskInfo) > 0 {
 				v.RealValidCount++
 			} else {
 				v.RealInvalidCount++
@@ -202,17 +205,22 @@
 			// }
 		}
 	}
+
+	//鎬荤畻閲屾殏鏃跺彧缁熻瀹炴椂绠楀姏
+	v.ChannelTotal = rTotal
+
 	v.RealTotal = rTotal
 	v.PollTotal = pTotal
 	logger.Debug("statisticRunInfo 鑾峰彇瀹孍xistRunningTask鑰楁椂锛�", time.Since(timeStart))
 	timeStart = time.Now()
 
-	//杞閫氶亾鏁伴噺浠庤疆璇㈤厤缃腑鑾峰彇
-	var pollConf models.PollConfig
-	pcE, err2 := pollConf.GetOne()
-	if err2 == nil {
-		v.PollChannelCount = pcE.PollChannelCount
-	}
+	//杞閫氶亾鏁伴噺浠庤疆璇㈤厤缃腑鑾峰彇20250724绉婚櫎
+	// var pollConf models.PollConfig
+	// pcE, err2 := pollConf.GetOne()
+	// if err2 == nil {
+	// 	v.PollChannelCount = pcE.PollChannelCount
+	// }
+
 	//tmpPC := v.RealTotal - v.StackTotal
 	//if tmpPC < 0  {
 	//    v.PollChannelCount = 0

--
Gitblit v1.8.0