|
@@ -6,6 +6,7 @@ import com.gyee.frame.common.exception.enums.QiNiuErrorEnum;
|
|
|
import com.gyee.frame.common.feign.IAdapterService;
|
|
|
import com.gyee.frame.model.auto.WindTurbineTestingPointAi2;
|
|
|
import com.gyee.frame.model.custom.export.TsPointData;
|
|
|
+import com.gyee.frame.model.custom.weather.Sys;
|
|
|
import com.gyee.frame.service.WindTurbineTestingPointAiService;
|
|
|
import com.gyee.frame.util.DateUtils;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -65,12 +66,14 @@ public class TaskTemplateCallable implements Callable {
|
|
|
List<Object> collect = new ArrayList<>();
|
|
|
// 故障状态或限电状态都是整型0或1
|
|
|
if (code.equals("GZZT") || code.equals("XDZT")) {
|
|
|
- if (data.size() == 0) {
|
|
|
- for (int i = 0; i < intervals.size(); i++)
|
|
|
+// if (data.size() == 0) {
|
|
|
+ for (int i = 0; i < intervals.size(); i++){
|
|
|
collect.add(0);
|
|
|
- } else {
|
|
|
- collect = data.stream().map(point -> (int) point.getDoubleValue()).collect(Collectors.toList());
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
+// } else {
|
|
|
+// collect = data.stream().map(point -> (int) point.getDoubleValue()).collect(Collectors.toList());
|
|
|
+// }
|
|
|
//list.add(collect);
|
|
|
list.put("F"+num,collect);
|
|
|
} else {
|
|
@@ -78,7 +81,10 @@ public class TaskTemplateCallable implements Callable {
|
|
|
for (int i = 0; i < intervals.size(); i++)
|
|
|
collect.add(0.0);
|
|
|
} else {
|
|
|
- collect = data.stream().map(TsPointData::getDoubleValue).collect(Collectors.toList());
|
|
|
+// collect = data.stream().map(TsPointData::getDoubleValue).collect(Collectors.toList());
|
|
|
+ collect = data.stream().map(s -> {
|
|
|
+ return s.getDoubleValue() < 0 ? 0 : s.getDoubleValue();
|
|
|
+ }).collect(Collectors.toList());
|
|
|
}
|
|
|
//list.add(collect);
|
|
|
list.put("F"+num,collect);
|