Commit 1cda7a75 by hzc

运算公式abs换math.abs

parent d691a580
...@@ -400,6 +400,10 @@ public class IndScorecardService { ...@@ -400,6 +400,10 @@ public class IndScorecardService {
Map<String, Object> env = Maps.newHashMap(); Map<String, Object> env = Maps.newHashMap();
String formulaTmp=""; String formulaTmp="";
double fValue = 0; double fValue = 0;
//是否有绝对值
if(formula.indexOf("ABS")>=0){
formula.replace("ABS","math.abs");
}
//求公式最大值FMAX //求公式最大值FMAX
if(formula.indexOf("FMAX")>=0){ if(formula.indexOf("FMAX")>=0){
int maxIndex = formula.indexOf("FMAX"); int maxIndex = formula.indexOf("FMAX");
...@@ -418,10 +422,7 @@ public class IndScorecardService { ...@@ -418,10 +422,7 @@ public class IndScorecardService {
fValue = getFValue(formulaTmp,currentDriveResult,acsType,false); fValue = getFValue(formulaTmp,currentDriveResult,acsType,false);
formula.replace(formulaTmp,String.valueOf(fValue)); formula.replace(formulaTmp,String.valueOf(fValue));
} }
//是否有绝对值
if(formula.indexOf("ABS")>=0){
formula.replace("ABS","math.abs");
}
//解析X,MIN,MAX,AVG //解析X,MIN,MAX,AVG
if(formula.indexOf("X")>=0) { if(formula.indexOf("X")>=0) {
//获取指标值 //获取指标值
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment