|
@@ -9,6 +9,7 @@ import org.springblade.common.utils.BaseUtils;
|
|
import org.springblade.core.tool.utils.Func;
|
|
import org.springblade.core.tool.utils.Func;
|
|
import org.springblade.manager.dto.ElementData;
|
|
import org.springblade.manager.dto.ElementData;
|
|
import org.springblade.manager.dto.FormData;
|
|
import org.springblade.manager.dto.FormData;
|
|
|
|
+import org.springblade.manager.entity.Formula;
|
|
import org.springblade.manager.formula.FormulaStrategy;
|
|
import org.springblade.manager.formula.FormulaStrategy;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
@@ -111,7 +112,7 @@ public class FormulaMileage implements FormulaStrategy {
|
|
}
|
|
}
|
|
this.cur.getFormula().setFormula("");
|
|
this.cur.getFormula().setFormula("");
|
|
}
|
|
}
|
|
- public static final Pattern MILE_P = Pattern.compile("(?<=MILE\\()([^,]+),([^,]+)(?=,)");
|
|
|
|
|
|
+ public static final Pattern MILE_P = Pattern.compile("(?<=FC.MILE\\()([^,]+),([^,]+)(?=,)");
|
|
|
|
|
|
public Map<String,String[]> getCoordinate(String tmp,List<FormData> fds,Long contractId){
|
|
public Map<String,String[]> getCoordinate(String tmp,List<FormData> fds,Long contractId){
|
|
Matcher mile=MILE_P.matcher(tmp);
|
|
Matcher mile=MILE_P.matcher(tmp);
|
|
@@ -150,11 +151,11 @@ public class FormulaMileage implements FormulaStrategy {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public boolean accept(FormData fd) {
|
|
public boolean accept(FormData fd) {
|
|
- if(Func.isEmpty(fd.getFormula())){
|
|
|
|
|
|
+ if(!fd.verify()){
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
this.cur=fd;
|
|
this.cur=fd;
|
|
- String f= fd.getFormula().getFormula();
|
|
|
|
- return StringUtils.isNotEmpty(f)&&f.startsWith("MILE-");
|
|
|
|
|
|
+ Formula f= fd.getFormula();
|
|
|
|
+ return "MILE".equals(f.getNumber());
|
|
}
|
|
}
|
|
}
|
|
}
|