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 6ad35b5..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鏍囩 // 鏈�鍚庢垚鍔熸姤璀︽墠鎶婄鍚堟潯浠剁殑浜鸿劯鏁版嵁濉炶繘缁撴灉鏍囩閲� // 閰嶄簡浜鸿劯鐨勭畻娉曟墠鎶婁汉鑴哥殑鏁版嵁鐢╁嚭鏉ユ墦鏍囩 @@ -286,11 +289,9 @@ labelTypes = append(labelTypes,1) } // 缁欐寔缁椂闂寸殑绗竴寮犺祴浜堢紦瀛樻暟鎹紙閬嶅巻澶嶅埗锛� - logger.Info("缂撳瓨id涓猴細",cacheId) if 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