|
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author yangyj
|
|
* @author yangyj
|
|
@@ -34,7 +35,8 @@ public class FormulaTurnPoint implements FormulaStrategy {
|
|
this.args=args;
|
|
this.args=args;
|
|
if(Func.isNotEmpty(args)) {
|
|
if(Func.isNotEmpty(args)) {
|
|
args.forEach(k -> {
|
|
args.forEach(k -> {
|
|
- dataSourceMap.put(k, fds.stream().filter(e -> k.equals(e.getCode())).findFirst().orElseGet(null));
|
|
|
|
|
|
+ Optional<FormData> ov =fds.stream().filter(e -> k.equals(e.getCode())).findFirst();
|
|
|
|
+ ov.ifPresent(formData -> dataSourceMap.put(k, formData));
|
|
});
|
|
});
|
|
CompositeDataAccess cda = new CompositeDataAccess(dataSourceMap);
|
|
CompositeDataAccess cda = new CompositeDataAccess(dataSourceMap);
|
|
cda.cursorReset();
|
|
cda.cursorReset();
|
|
@@ -59,7 +61,7 @@ public class FormulaTurnPoint implements FormulaStrategy {
|
|
TurnPointCalculator tpc = new TurnPointCalculator();
|
|
TurnPointCalculator tpc = new TurnPointCalculator();
|
|
NextPoint nextPoint = new NextPoint(qs.stringValue(),gc.stringValue());
|
|
NextPoint nextPoint = new NextPoint(qs.stringValue(),gc.stringValue());
|
|
List<NextPoint> nextPointList= tpc.turnPoint(levelInfo,nextPoint);
|
|
List<NextPoint> nextPointList= tpc.turnPoint(levelInfo,nextPoint);
|
|
-
|
|
|
|
|
|
+ /**怎么动态插入数据?*/
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -83,4 +85,7 @@ public class FormulaTurnPoint implements FormulaStrategy {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|