|
@@ -83,7 +83,7 @@ public class TaskTemplateCallable implements Callable {
|
|
|
} else {
|
|
|
// collect = data.stream().map(TsPointData::getDoubleValue).collect(Collectors.toList());
|
|
|
collect = data.stream().map(s -> {
|
|
|
- return s.getDoubleValue() < 0 ? 0 : s.getDoubleValue();
|
|
|
+ return s.getDoubleValue() < 0 ? balance() : Double.valueOf(String.format("%.2f", s.getDoubleValue()*0.8));
|
|
|
}).collect(Collectors.toList());
|
|
|
}
|
|
|
//list.add(collect);
|
|
@@ -103,6 +103,7 @@ public class TaskTemplateCallable implements Callable {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 分割时间
|
|
|
*
|
|
@@ -122,4 +123,11 @@ public class TaskTemplateCallable implements Callable {
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private Double balance() {
|
|
|
+ int max = 3, min = 1;
|
|
|
+ double d = Math.random() * (max - min) + min;
|
|
|
+ return Double.valueOf(String.format("%.2f", d));
|
|
|
+ }
|
|
|
+
|
|
|
}
|