Browse Source

丁家窑计算服务

xieshengjie 2 years ago
parent
commit
2aba9c59ad

+ 6 - 4
realtime/generation-service/src/main/java/com/gyee/generation/service/TheorypowerService.java

@@ -139,7 +139,7 @@ public class TheorypowerService {
                 PointData projectzsglpointdata = createWpPointData(projectzsglpoint, projectzsgl.get());
                 resultList.add(projectzsglpointdata);
                 Double finalprojectZbzgl = projectbzgl.get();
-               wpbzgl.updateAndGet(v -> v + finalprojectZbzgl);
+                wpbzgl.updateAndGet(v -> v + finalprojectZbzgl);
                 Double finalprojectZzsgl = projectzsgl.get();
                 wpzsgl.updateAndGet(v -> v + finalprojectZzsgl);
             });
@@ -178,15 +178,17 @@ public class TheorypowerService {
             try {
                 List<PointData> speedpoints =  edosUtil.getHistoryDatasSnap(speedPoint, begin.getTime()/1000 , date.getTime()/1000 , null, 3600l);
                 List<PointData> powerpoints = edosUtil.getHistoryDatasSnap(powerPoint, begin.getTime()/1000 , date.getTime()/1000 , null, 3600l);
+
                 for (int x = 0;x<speedpoints.size();x++){
                     PointVo vo = new PointVo();
                     vo.setX(speedpoints.get(x).getPointValueInDouble());
                     vo.setY(powerpoints.get(x).getPointValueInDouble());
                     tempList.add(vo);
                 }
-                Collections.sort(tempList.stream().filter(i->i.getY()>=0).collect(Collectors.toList()), Comparator.comparing(PointVo::getX));
-                double[] speeds = tempList.stream().map(i -> i.getX()).mapToDouble(Double::doubleValue).toArray();
-                double[] powers = tempList.stream().map(i -> i.getY()).mapToDouble(Double::doubleValue).toArray();
+                List<PointVo> collect = tempList.stream().filter(i -> i.getY() > 0 && i.getX() > 0).collect(Collectors.toList());
+                Collections.sort(collect, Comparator.comparing(PointVo::getX));
+                double[] speeds = collect.stream().map(i -> i.getX()).mapToDouble(Double::doubleValue).toArray();
+                double[] powers = collect.stream().map(i -> i.getY()).mapToDouble(Double::doubleValue).toArray();
                 pointVoList = LineBuild.buildLine(speeds, powers, speeds.length, 20, 0.01);
             } catch (Exception e) {
                 e.printStackTrace();

+ 3 - 3
realtime/generation-service/src/main/resources/application-jn.yml

@@ -85,14 +85,14 @@ logging:
 db:
   url: http://10.81.3.152:8011/ts
 #参与计算的场站
-runWindpowerstation: GJY_FDC
+runWindpowerstation: GJY_FDC,DJY_FDC
 #计算状态用ai或者di
 clauStatus:
   ai: GJY03_GC   #配置期次
-  di: GJY02_GC
+  di: GJY02_GC,DJY01_GC,DJY02_GC
 
 #判断数据终端
-second: 300
+second: 1800
 #判断降出力
 AI134: 17.4    #叶轮转速给定
 AI178: 17.4    #转矩给定