Просмотр исходного кода

修正五项损失数据推送

shilin 5 лет назад
Родитель
Сommit
46f952d715

+ 1 - 1
src/main/java/com/gyee/frame/service/app/index/IndexDetailService.java

@@ -85,7 +85,7 @@ public class IndexDetailService extends SocketToolService{
 
 
             WindPowerStationTestingPoint2 sjgl = map.get(Constant.TPOINT_WP_SJGL);
-            WindPowerStationTestingPoint2 llgl = map.get(Constant.TPOINT_WP_ZLLGL);
+            WindPowerStationTestingPoint2 llgl = map.get(Constant.TPOINT_WP_ZZSGL);
             WindPowerStationTestingPoint2 pjfs = map.get(Constant.TPOINT_WP_SSFS);
 
             Calendar cal = Calendar.getInstance();

+ 5 - 2
src/main/java/com/gyee/frame/service/app/index/IndexService.java

@@ -1,5 +1,6 @@
 package com.gyee.frame.service.app.index;
 
+import com.gyee.frame.common.conf.redis.CacheContext;
 import com.gyee.frame.common.spring.Constant;
 import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.auto.WindPowerStationTestingPoint2;
@@ -147,7 +148,7 @@ public class IndexService extends SocketToolService{
 
             try {
                 //平均风速
-                PointData pjfs_real = mongodb.getRealData(stationPointmap.get(windpowerstation.getId()).get(Constant.TPOINT_WP_PJFS).getCode());
+                PointData pjfs_real = mongodb.getRealData(stationPointmap.get(windpowerstation.getId()).get(Constant.TPOINT_WP_SSFS).getCode());
                 pjfs = new BigDecimal(pjfs_real.getPointValueInDouble()).setScale(decimal_digit, RoundingMode.HALF_EVEN).doubleValue();
                 pointDataMap.put("pjfs_real",pjfs_real);
             }catch (Exception e){
@@ -282,8 +283,10 @@ public class IndexService extends SocketToolService{
             
             try{
                 //理论功率
-                PointData llgl_real=mongodb.getRealData(stationPointmap.get(windpowerstation.getId()).get(Constant.TPOINT_WP_ZLLGL).getCode());
+                PointData llgl_real=mongodb.getRealData(stationPointmap.get(windpowerstation.getId()).get(Constant.TPOINT_WP_ZZSGL).getCode());
                 llgl =new BigDecimal(llgl_real.getPointValueInDouble()).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                double gfsjgl = mongodb.getRealData(stationPointmap.get("-2").get(Constant.TPOINT_WP_SJGL)).getPointValueInDouble();
+                llgl=StringUtils.round(llgl+gfsjgl,2);
                 //llgl = new BigDecimal(llgl_real.getPointValueInDouble()).setScale(decimal_digit, RoundingMode.HALF_EVEN).doubleValue();
                 pointDataMap.put("llgl_real",llgl_real);
             }catch (Exception e){

+ 1 - 1
src/main/java/com/gyee/frame/service/app/windpowerstationdetail/Windspeedpowercurvedetail.java

@@ -37,7 +37,7 @@ public class Windspeedpowercurvedetail extends SocketToolService {
         Map<String, Map<String, WindPowerStationTestingPoint2>> stationPointmap = InitialRunner.stationPointmap;
         String fs = Constant.TPOINT_WP_SSFS;
         String gl = Constant.TPOINT_WP_SJGL;
-        String llgl = Constant.TPOINT_WP_ZLLGL;
+        String llgl = Constant.TPOINT_WP_ZZSGL;
         String ycgl = Constant.TPOINT_WP_YCGL;
         List<Windpowerstation> wpls = new ArrayList<>();
         for (Windpowerstation wp : InitialRunner.wpls) {

+ 4 - 3
src/main/java/com/gyee/frame/service/app/windpowerstationdetail/Windspeedpowermodule.java

@@ -57,7 +57,7 @@ public class Windspeedpowermodule extends SocketToolService {
 
             try {
                 //平均风速
-                PointData rfdl_real = mongodb.getRealData(stationPointmap.get(windpowerstation.getId()).get(Constant.TPOINT_WP_PJFS).getCode());
+                PointData rfdl_real = mongodb.getRealData(stationPointmap.get(windpowerstation.getId()).get(Constant.TPOINT_WP_SSFS).getCode());
                 pjfs = new BigDecimal(rfdl_real.getPointValueInDouble()).setScale(decimal_digit, RoundingMode.HALF_EVEN).doubleValue();
             }catch (Exception e){
                 System.out.println(e.getMessage());
@@ -202,10 +202,11 @@ public class Windspeedpowermodule extends SocketToolService {
 
             try{
                 //理论功率
-                PointData llgl_real=mongodb.getRealData(stationPointmap.get(windpowerstation.getId()).get(Constant.TPOINT_WP_ZLLGL).getCode());
+                PointData llgl_real=mongodb.getRealData(stationPointmap.get(windpowerstation.getId()).get(Constant.TPOINT_WP_ZZSGL).getCode());
                 //llgl = new BigDecimal(swdl_real.getPointValueInDouble()).setScale(decimal_digit, RoundingMode.HALF_EVEN).doubleValue();
                 llgl =new BigDecimal(llgl_real.getPointValueInDouble()).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-
+                double gfsjgl = mongodb.getRealData(stationPointmap.get("-2").get(Constant.TPOINT_WP_SJGL)).getPointValueInDouble();
+                llgl=StringUtils.round(llgl+gfsjgl,2);
             }catch (Exception e){
                 System.out.println(e.getMessage());
             }