panlei
2019-11-13 466947c1eeda6938ab6ef11497f6c8a96a574920
ruleserver/ruleToformula.go
@@ -2,21 +2,15 @@
import (
   "basic.com/pubsub/protomsg.git"
   "basic.com/valib/logger.git"
   "github.com/knetic/govaluate"
   "plugin"
   "ruleprocess/cache"
   "ruleprocess/structure"
   "ruleprocess/logger"
   "ruleprocess/structure"
   "sort"
   "strconv"
   "strings"
   "sync"
   "time"
   "basic.com/pubsub/protomsg.git"
   "github.com/knetic/govaluate"
)
@@ -196,7 +190,7 @@
                  }
               }
            }
            //logger.Debug("------locations的内容:", locations)
            logger.Debug("------locations的内容:", locations)
            var islink bool
            if groupRule.SetType == "linkTask" {
               islink = true
@@ -436,6 +430,7 @@
// 如果有持续时间条件维护开启一个定时器
func duration(rule *protomsg.Rule, groupId string, am *structure.AreaMap, args *structure.SdkDatas, message *protomsg.SdkMessage) string{
   cacheId := ""
   if rule.PolygonId == am.AreaId { // 首先规则所对应的区域id要跟区域数据的id对的上  配置的算法要对的上
      if rule.SdkArgAlias == "duration" { //
         //logger.Info("当前小规则是:---------", rule)