|
@@ -1,10 +1,9 @@
|
|
|
package com.gyee.frame.service.peranalysis;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.alibaba.fastjson.TypeReference;
|
|
|
import com.gyee.frame.common.cache.IGlobalCache;
|
|
|
+import com.gyee.frame.common.spring.InitialRunner;
|
|
|
import com.gyee.frame.model.auto.Freedom;
|
|
|
-import com.gyee.frame.model.auto.Windpowerstationpointnew;
|
|
|
+import com.gyee.frame.model.auto.Windturbine;
|
|
|
import com.gyee.frame.model.auto.Windturbinetestingpointnew;
|
|
|
import com.gyee.frame.model.custom.PointData;
|
|
|
import com.gyee.frame.model.custom.PointPerSisVo;
|
|
@@ -34,15 +33,11 @@ public class PointPerSisService {
|
|
|
String[] wtids = wtid.split(",");
|
|
|
for (String w : wtids) {
|
|
|
String[] codes = uniformcodes.split(",");
|
|
|
-
|
|
|
- String wpString = (String) (globalCache.get(w));
|
|
|
-
|
|
|
- Map<String, Windturbinetestingpointnew> windturbinetestingpointnewMap = JSONObject.parseObject(wpString, new TypeReference<Map<String, Windturbinetestingpointnew>>() {
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
+ Map<String, Windturbinetestingpointnew> windturbinetestingpointnewMap = InitialRunner.wtPointmap.get(w);
|
|
|
PointPerSisVo vo = new PointPerSisVo();
|
|
|
vo.setWtid(w);
|
|
|
+ Windturbine windturbines = InitialRunner.wtmap.get(w);
|
|
|
+ vo.setName(windturbines.getName());
|
|
|
|
|
|
Map<String, List<PointData>> pointDataMap = new HashMap<>();
|
|
|
for (int i = 0; i < codes.length; i++) {
|
|
@@ -50,6 +45,9 @@ public class PointPerSisService {
|
|
|
if (StringUtils.isNotNull(windturbinetestingpointai)) {
|
|
|
try {
|
|
|
List<PointData> historyDatas = realApiUtil.getHistoryDatasSnap(windturbinetestingpointai, beginDate / 1000, endDate / 1000, null, interval * 60l);
|
|
|
+ historyDatas.stream().forEach(p->{
|
|
|
+ p.setPointName(windturbinetestingpointai.getName());
|
|
|
+ });
|
|
|
pointDataMap.put(codes[i], historyDatas);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|