| | |
| | | } |
| | | } |
| | | if rule.Operator == "unsatisfy" || rule.Operator == "!="{ // 不满足所选的时间规则 |
| | | formula := timeSlot.Start + " < " + am.time |
| | | formula := "'"+timeSlot.Start + "'" + " < " + "'" + am.time + "'" |
| | | log.Println("-----------------时间规则不满足的公式start:",formula) |
| | | expression, _ := govaluate.NewEvaluableExpression(formula) // 得到数学公式 |
| | | result, _ := expression.Evaluate(nil) // 得到数学公式的结果 |
| | | |
| | | formula1 := timeSlot.End + " > " + am.time |
| | | formula1 := "'"+timeSlot.End +"'"+ " > " +"'" + am.time+ "'" |
| | | log.Println("-----------------时间规则不满足的公式end:",formula1) |
| | | expression1, _ := govaluate.NewEvaluableExpression(formula1) // 得到数学公式 |
| | | result1, _ := expression1.Evaluate(nil) // 得到数学公式的结果 |