|
@@ -567,7 +567,7 @@ public class CustomFunction {
|
|
**/
|
|
**/
|
|
public static Object ladder(List<Object> data) {
|
|
public static Object ladder(List<Object> data) {
|
|
if (Func.isNotEmpty(data)) {
|
|
if (Func.isNotEmpty(data)) {
|
|
- OptionalDouble op = data.stream().map(StringUtils::handleNull).filter(StringUtils::isNumber).mapToDouble(Double::parseDouble).min();
|
|
|
|
|
|
+ OptionalDouble op = data.stream().map(StringUtils::handleNull).map(o->o.replace("%","")).filter(StringUtils::isNumber).mapToDouble(Double::parseDouble).min();
|
|
if (op.isPresent()) {
|
|
if (op.isPresent()) {
|
|
return op.getAsDouble() >= 90 ? 90 : 70;
|
|
return op.getAsDouble() >= 90 ? 90 : 70;
|
|
}
|
|
}
|
|
@@ -658,7 +658,7 @@ public class CustomFunction {
|
|
List<Object> rate =obj2ListNe(rates);
|
|
List<Object> rate =obj2ListNe(rates);
|
|
if(Func.isNotEmpty(rate)&&rate.stream().anyMatch(StringUtils::isNotEmpty)){
|
|
if(Func.isNotEmpty(rate)&&rate.stream().anyMatch(StringUtils::isNotEmpty)){
|
|
Optional<Object> op= rate.stream().filter(BaseUtils::isNumber).findAny();
|
|
Optional<Object> op= rate.stream().filter(BaseUtils::isNumber).findAny();
|
|
- return op.map(o -> StringUtils.number2String(o, 1) + "%").orElseGet(rates::toString);
|
|
|
|
|
|
+ return op.map(o -> StringUtils.number2String(o, 1) + "%").orElseGet(()->rate.get(0).toString());
|
|
}
|
|
}
|
|
return "/";
|
|
return "/";
|
|
}
|
|
}
|
|
@@ -667,7 +667,6 @@ public class CustomFunction {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
public String checkItems(List<String> items, List<Object> l1, List<Object> l2, List<Object> l3, List<Object> l4, List<Object> l5, List<Object> l6, List<Object> l7, List<Object> l8, List<Object> l9, List<Object> l10, List<Object> l11, List<Object> l12) {
|
|
public String checkItems(List<String> items, List<Object> l1, List<Object> l2, List<Object> l3, List<Object> l4, List<Object> l5, List<Object> l6, List<Object> l7, List<Object> l8, List<Object> l9, List<Object> l10, List<Object> l11, List<Object> l12) {
|
|
List<List<Object>> data = new ArrayList<>(Arrays.asList(l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12));
|
|
List<List<Object>> data = new ArrayList<>(Arrays.asList(l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12));
|
|
List<String> result = new ArrayList<>();
|
|
List<String> result = new ArrayList<>();
|