From 59dcc2bba3b294b2679beb4f177b835552798ed5 Mon Sep 17 00:00:00 2001
From: panlei <2799247126@qq.com>
Date: 星期四, 07 十一月 2019 16:28:53 +0800
Subject: [PATCH] 持续时间第一张画框完成

---
 ruleserver/ruleToformula.go |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ruleserver/ruleToformula.go b/ruleserver/ruleToformula.go
index 774516a..f6ea348 100644
--- a/ruleserver/ruleToformula.go
+++ b/ruleserver/ruleToformula.go
@@ -224,14 +224,17 @@
 					if ipcId == sdkData.IpcId {
 						for _, areaMap := range sdkData.AreaMapList {
 							// 鍘诲紑鍚竴涓畾鏃跺櫒
-							cacheId = duration(groupRule.Rules[j], groupRule.GroupId, areaMap, args, message)
+							cacheid := duration(groupRule.Rules[j], groupRule.GroupId, areaMap, args, message)
+							if cacheid != "" {
+								cacheId = cacheid
+							}
 						}
 					}
 				}
 			}
 			// 杩涜瀹氭椂鍣ㄧ殑澶勭悊鍜屽垽鏂�
 			timeFlag := TimerAlarm(&label, groupRule.GroupId, result.(bool))
-			if timeFlag == "01" || timeFlag == "10" || timeFlag == "11" { // 娌℃湁瀹氭椂鍣ㄦ垨鑰呮弧瓒冲畾鏃跺櫒鏉′欢
+			if timeFlag == "01" || timeFlag == "10" || timeFlag == "11" || cacheId != ""{ // 娌℃湁瀹氭椂鍣ㄦ垨鑰呮弧瓒冲畾鏃跺櫒鏉′欢
 				// 鎵撲汉鑴告爣绛惧拰yolo鏍囩
 				// 鏈�鍚庢垚鍔熸姤璀︽墠鎶婄鍚堟潯浠剁殑浜鸿劯鏁版嵁濉炶繘缁撴灉鏍囩閲�
 				// 閰嶄簡浜鸿劯鐨勭畻娉曟墠鎶婁汉鑴哥殑鏁版嵁鐢╁嚭鏉ユ墦鏍囩
@@ -287,10 +290,8 @@
 				}
 				// 缁欐寔缁椂闂寸殑绗竴寮犺祴浜堢紦瀛樻暟鎹紙閬嶅巻澶嶅埗锛�
 				if cacheId != "" { // 鏈夎繖甯ф暟鎹殑缂撳瓨
-					logger.Info("缂撳瓨id涓猴細",cacheId)
 					tempMap := make(map[string]interface{})
 					for k, result := range args.RuleResult {
-						logger.Info("缂撳瓨key涓猴細",k)
 						if k == "yolo" {
 							tempMap[k] = []structure.Result{}
 							for _, res := range result.([]structure.Result) {
@@ -304,7 +305,6 @@
 							}
 						}
 					}
-					logger.Info("缂撳瓨瑙勫垯涓猴細",tempMap)
 					rw.Lock()
 					TimeEleList[cacheId].CacheSdkData.RuleResult = tempMap
 					rw.Unlock()

--
Gitblit v1.8.0