panlei
2019-06-22 847983cd82cff288e5b610d2bbcebbdb0398f1d6
ruleserver/ruleToformula.go
@@ -188,11 +188,17 @@
// 将字符串格式的坐标序列化为Point格式
func Json2points(areaPoints string) []Point {
   var pts []Point
   err := json.Unmarshal([]byte(areaPoints), &pts)
   if err != nil {
      fmt.Println("json.Unmarshal错误", err)
      panic("序列化坐标异常,程序退出")
   if areaPoints == "" {
      pts = append(pts,Point{0,0})
      pts = append(pts,Point{0,540})
      pts = append(pts,Point{960,540})
      pts = append(pts,Point{960,0})
   } else {
      err := json.Unmarshal([]byte(areaPoints), &pts)
      if err != nil {
         fmt.Println("json.Unmarshal错误", err)
         panic("序列化坐标异常,程序退出")
      }
   }
   return pts
}
@@ -311,7 +317,7 @@
         flag := splice1(&areaMap)
         if flag != "" {
            fmt.Println("强行拼凑一个人数是否大于0的结果", flag)
            completeFormula = completeFormula  + "&&" + flag
            completeFormula = flag
         }
      }
      for j := 0; j < len(groupRule.Rules); j++ {