| | |
| | | import ( |
| | | "encoding/json" |
| | | "fmt" |
| | | "log" |
| | | "sort" |
| | | "strconv" |
| | | "strings" |
| | |
| | | func singleTask(aml *AreaMapList, arg *ArgsFromSdk, groupRule *protomsg.GroupRule, taskId string) bool { |
| | | var completeFormula string = "" |
| | | for _, areaMap := range aml.areaMapList { |
| | | fmt.Println("当前规则组为---------:",groupRule) |
| | | //fmt.Println("当前规则组为---------:",groupRule) |
| | | for j := 0; j < len(groupRule.Rules); j++ { |
| | | // 先过完条件数据 |
| | | filterRule(groupRule.Rules[j], &areaMap) |
| | |
| | | // 冗余拼接 |
| | | func splice1(am *AreaMap) string { |
| | | args := am.targetNum |
| | | log.Println("看看区域内目标数量:----------",args) |
| | | formula := strconv.Itoa(args) + " " + ">" + "0" |
| | | expression, _ := govaluate.NewEvaluableExpression(formula) // 得到数学公式 |
| | | result, _ := expression.Evaluate(nil) // 得到数学公式的结果 |