|
@@ -601,7 +601,7 @@ func GetFormulaReplace(index, edbInfoId int, formulaStr string, edbInfoIdBytes [
|
|
|
}
|
|
|
|
|
|
|
|
|
-func GetFormulaMap() map[string]string {
|
|
|
+func GetFormulaMapBack() map[string]string {
|
|
|
funMap := make(map[string]string)
|
|
|
funMap["MAX"] = "[@@]"
|
|
|
funMap["MIN"] = "[@!]"
|
|
@@ -617,6 +617,23 @@ func GetFormulaMap() map[string]string {
|
|
|
return funMap
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+func GetFormulaMap() map[string]string {
|
|
|
+ funMap := make(map[string]string)
|
|
|
+ funMap["max"] = "[@@]"
|
|
|
+ funMap["min"] = "[@!]"
|
|
|
+ funMap["abs"] = "[@#]"
|
|
|
+ funMap["ceil"] = "[@$]"
|
|
|
+ funMap["cos"] = "[@%]"
|
|
|
+ funMap["floor"] = "[@^]"
|
|
|
+ funMap["mod"] = "[@&]"
|
|
|
+ funMap["pow"] = "[@*]"
|
|
|
+ funMap["round"] = "[@`]"
|
|
|
+ funMap["le"] = "[@-]"
|
|
|
+ funMap["exp"] = "[@+]"
|
|
|
+ return funMap
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
type CalculateBatchSaveReq struct {
|
|
|
EdbList []*CalculateEdbInfoItem
|
|
@@ -715,7 +732,8 @@ func CheckFormula2(edbInfoArr []*EdbInfo, formulaMap map[string]string, formulaS
|
|
|
valArr[v.EdbInfoId] = 100 + float64(k)
|
|
|
}
|
|
|
|
|
|
- formulaStr = strings.ToUpper(formulaStr)
|
|
|
+
|
|
|
+ formulaStr = strings.ToLower(formulaStr)
|
|
|
|
|
|
valArrMax := make(map[int]float64)
|
|
|
formulaFormStr := ReplaceFormula(edbInfoArr, valArr, valArrMax, formulaMap, formulaStr, edbInfoIdBytes, false)
|