Explorar o código

调试经济运行日信息表存储

xieshengjie %!s(int64=2) %!d(string=hai) anos
pai
achega
c6541ace76

+ 5 - 4
histroy/benchmarking-histroy-new/src/main/java/com/gyee/benchmarkinghistroy/service/infoday/InfodayService.java

@@ -131,7 +131,7 @@ public class InfodayService {
                 windturbineinfoday.setMaxspeed(DoubleUtils.keepPrecision(maxspeed,2));
                 windturbineinfoday.setMaxspeed(DoubleUtils.keepPrecision(minspeed,2));
                 if (StringUtils.isNotEmpty(ssfsSnap)){
-                    windhour =  ssfsSnap.stream().filter(i->i.getPointValueInDouble()>=3 && i.getPointValueInDouble()<=25).collect(Collectors.toList()).size();
+                    windhour =  (ssfsSnap.stream().filter(i->i.getPointValueInDouble()>=3 && i.getPointValueInDouble()<=25).collect(Collectors.toList()).size())/60;
                 }
                 windturbineinfoday.setWindhours(DoubleUtils.keepPrecision(windhour,2));
 
@@ -239,9 +239,10 @@ public class InfodayService {
 
     public void saveWindpowerinfoday(String beginDate,String endDate){
         List<String> days = DateUtils.getDays(beginDate, endDate);
-        List<Line> lines = CacheContext.lines;
-        List<Project> projects = CacheContext.projects;
-        List<Windpowerstation> wplist = CacheContext.wplist;
+        List<Project> projects = CacheContext.projects.stream().filter(p->p.getWindpowerstationid().endsWith("FDC")).collect(Collectors.toList());
+        List<Line> lines = CacheContext.lines.stream().filter(line->CacheContext.lineWP.get(line.getId()).endsWith("FDC")).collect(Collectors.toList());
+        List<Windpowerstation> wplist = CacheContext.wplist.stream().filter(wp->wp.getId().endsWith("FDC")).collect(Collectors.toList());
+
         Map<String, Map<String, Windpowerstationpointnew>> lnPointmap = CacheContext.lnPointmap;
         Map<String, Map<String, Windpowerstationpointnew>> pjPointmap = CacheContext.pjPointmap;
         Map<String, Map<String, Windpowerstationpointnew>> wppointmap = CacheContext.wppointmap;

+ 2 - 2
histroy/benchmarking-histroy-new/src/test/java/com/gyee/benchmarkinghistroy/BenchmarkingHistroyMainNewTest.java

@@ -39,7 +39,7 @@ public  class BenchmarkingHistroyMainNewTest {
 
     @Test
     public void test1() throws Exception {
-        String date = "2022-07-17";
+        String date = "2022-07-18";
 //        benchmarkingHistroyService.saveEquipmentdayinfo(date,date);
 //        benchmarkingHistroyService.saveEquipmentdaydetailed(date,date);
 //        benchmarkingHistroyService.saveOperationrecord(date,date);
@@ -47,7 +47,7 @@ public  class BenchmarkingHistroyMainNewTest {
 //        benchmarkingHistroyService.saveBenchmark(date,date);
 //        infodayService.saveWindturbineinfoday(date,date);
 //        infodayService.saveWindturbineinfoday3(date,date);
-//        infodayService.saveWindpowerinfoday(date,date);
+        infodayService.saveWindpowerinfoday(date,date);
         infodayService.saveWindpowerinfoday3(date,date);
     }
 

+ 8 - 5
realtime/generation-service/src/main/java/com/gyee/generation/service/TheorypowerService.java

@@ -173,17 +173,20 @@ public class TheorypowerService {
             Map<String, Windturbinetestingpointnew> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
             Windturbinetestingpointnew speedPoint = windturbinetestingpointnewMap.get(Contant.AI022);
             Windturbinetestingpointnew powerPoint = windturbinetestingpointnewMap.get(Contant.AI130);
+            Windturbinetestingpointnew fjztPoint = windturbinetestingpointnewMap.get(Contant.FJ5T);
             List<PointVo> pointVoList = new ArrayList<>();
             List<PointVo> tempList = new ArrayList<>();
             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);
-
+                List<PointData> fjztpoints = edosUtil.getHistoryDatasSnap(fjztPoint, 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);
+                    if (fjztpoints.get(x).getPointValueInDouble()==1){
+                        PointVo vo = new PointVo();
+                        vo.setX(speedpoints.get(x).getPointValueInDouble());
+                        vo.setY(powerpoints.get(x).getPointValueInDouble());
+                        tempList.add(vo);
+                    }
                 }
                 List<PointVo> collect = tempList.stream().filter(i -> i.getY() >= 0 && i.getY() <= (CacheContext.modelpower.get(wt.getId())*1.5) && i.getX()>=0 && i.getX()<=25).collect(Collectors.toList());
                 Collections.sort(collect, Comparator.comparing(PointVo::getY));

+ 2 - 2
realtime/generation-service/src/test/java/com/gyee/generation/GenerationTest.java

@@ -52,10 +52,10 @@ public class GenerationTest {
 //        statusService.calculateStatusNumber();
 //        realtimeSpeedPowerService.calculateRealtimeSpeedPower();
 //        generationService.saveMeterpointValueRealtime();
-//        theorypowerService.fittingPower();
+        theorypowerService.fittingPower();
 //        theorypowerService.theropower();
 //        averageAndGeneratingService.saveAvespeedAndAvepowerAndScada();
-        fiveLossesService.lossesReal();
+//        fiveLossesService.lossesReal();
 //        safetyService.safetyReatimel();
 //        fiveLossesService.lossesReal();
     }