瀏覽代碼

监视页面单位显示异常处理

shilin 1 年之前
父節點
當前提交
e6e7caa2a3

+ 2 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/MatrixService.java

@@ -178,7 +178,7 @@ public class MatrixService {
                     });
                     ycgl.updateAndGet(v -> {
                         try {
-                            return new Double((double) (v + edosUtil.getRealData(ycglPoint).getPointValueInDouble()));
+                            return new Double((double) (v + edosUtil.getHistMatrix(ycglPoint.getNemCode(),new Date().getTime()/1000).getPointValueInDouble()));
                         } catch (Exception e) {
                             e.printStackTrace();
                         }
@@ -392,7 +392,7 @@ public class MatrixService {
                     });
                     ycgl.updateAndGet(v -> {
                         try {
-                            return new Double((double) (v + edosUtil.getRealData(ycglPoint).getPointValueInDouble()));
+                            return new Double((double) (v + edosUtil.getHistMatrix(ycglPoint.getNemCode(),new Date().getTime()/1000).getPointValueInDouble()));
                         } catch (Exception e) {
                             e.printStackTrace();
                         }

+ 56 - 18
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/StationMonitorService.java

@@ -16,6 +16,8 @@ import com.gyee.runeconomy.util.realtimesource.IEdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -139,9 +141,15 @@ public class StationMonitorService {
         resultMap.put("lxts",realData.get(18).getPointValueInDouble());
         resultMap.put("zclxts",realData.get(19).getPointValueInDouble());
         resultMap.put("wzlxts",realData.get(20).getPointValueInDouble());
-        resultMap.put("rfdl",realData.get(21).getPointValueInDouble());
-        resultMap.put("yfdl",realData.get(22).getPointValueInDouble());
-        resultMap.put("nfdl",realData.get(23).getPointValueInDouble());
+        double rfdl=realData.get(21).getPointValueInDouble();
+        rfdl = new BigDecimal(rfdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("rfdl",rfdl);
+        double yfdl=realData.get(22).getPointValueInDouble();
+        yfdl = new BigDecimal(yfdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("yfdl",yfdl);
+        double nfdl=realData.get(23).getPointValueInDouble();
+        nfdl = new BigDecimal(nfdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("nfdl",nfdl);
         resultMap.put("sspjfsgzd",realData.get(24).getPointValueInDouble());
         resultMap.put("yggl",realData.get(25).getPointValueInDouble());
         resultMap.put("fhl",(proBasicPowerstation.getJrwindCapacity()+proBasicPowerstation.getJrCapacity())!=0?realData.get(25).getPointValueInDouble()/(proBasicPowerstation.getJrwindCapacity()+proBasicPowerstation.getJrCapacity())*100:0);
@@ -149,23 +157,53 @@ public class StationMonitorService {
         resultMap.put("nlyxs",realData.get(27).getPointValueInDouble());
         resultMap.put("yfgnlyl",realData.get(28).getPointValueInDouble());
         resultMap.put("ysbklyl",realData.get(29).getPointValueInDouble());
-        resultMap.put("rgzssdl",realData.get(30).getPointValueInDouble()+realData.get(31).getPointValueInDouble());
-        resultMap.put("rwhssdl",realData.get(32).getPointValueInDouble()+realData.get(33).getPointValueInDouble());
-        resultMap.put("rxnssdl",realData.get(34).getPointValueInDouble()+realData.get(35).getPointValueInDouble()+realData.get(36).getPointValueInDouble()+realData.get(37).getPointValueInDouble());
-        resultMap.put("rxdssdl",realData.get(38).getPointValueInDouble()+realData.get(39).getPointValueInDouble());
-        resultMap.put("rslssdl",realData.get(40).getPointValueInDouble()+realData.get(41).getPointValueInDouble());
+        double rgzssdl=realData.get(30).getPointValueInDouble()+realData.get(31).getPointValueInDouble();
+        rgzssdl = new BigDecimal(rgzssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("rgzssdl",rgzssdl);
+        double rwhssdl=realData.get(32).getPointValueInDouble()+realData.get(33).getPointValueInDouble();
+        rwhssdl = new BigDecimal(rwhssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("rwhssdl",rwhssdl);
+        double rxnssdl=realData.get(34).getPointValueInDouble()+realData.get(35).getPointValueInDouble()+realData.get(36).getPointValueInDouble()+realData.get(37).getPointValueInDouble();
+        rxnssdl = new BigDecimal(rxnssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("rxnssdl",rxnssdl);
+        double rxdssdl=realData.get(38).getPointValueInDouble()+realData.get(39).getPointValueInDouble();
+        rxdssdl = new BigDecimal(rxdssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("rxdssdl",rxdssdl);
+        double rslssdl=realData.get(40).getPointValueInDouble()+realData.get(41).getPointValueInDouble();
+        rslssdl = new BigDecimal(rslssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("rslssdl",rslssdl);
 
-        resultMap.put("ygzssdl",realData.get(42).getPointValueInDouble()+realData.get(43).getPointValueInDouble());
-        resultMap.put("ywhssdl",realData.get(44).getPointValueInDouble()+realData.get(45).getPointValueInDouble());
-        resultMap.put("yxnssdl",realData.get(46).getPointValueInDouble()+realData.get(47).getPointValueInDouble()+realData.get(48).getPointValueInDouble()+realData.get(49).getPointValueInDouble());
-        resultMap.put("yxdssdl",realData.get(50).getPointValueInDouble()+realData.get(51).getPointValueInDouble());
-        resultMap.put("yslssdl",realData.get(52).getPointValueInDouble()+realData.get(53).getPointValueInDouble());
+        double ygzssdl=realData.get(42).getPointValueInDouble()+realData.get(43).getPointValueInDouble();
+        ygzssdl = new BigDecimal(ygzssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("ygzssdl",ygzssdl);
+        double ywhssdl=realData.get(44).getPointValueInDouble()+realData.get(45).getPointValueInDouble();
+        ywhssdl = new BigDecimal(ywhssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("ywhssdl",ywhssdl);
+        double yxnssdl=realData.get(46).getPointValueInDouble()+realData.get(47).getPointValueInDouble()+realData.get(48).getPointValueInDouble()+realData.get(49).getPointValueInDouble();
+        yxnssdl = new BigDecimal(yxnssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("yxnssdl",yxnssdl);
+        double yxdssdl=realData.get(50).getPointValueInDouble()+realData.get(51).getPointValueInDouble();
+        yxdssdl = new BigDecimal(yxdssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("yxdssdl",yxdssdl);
+        double yslssdl=realData.get(52).getPointValueInDouble()+realData.get(53).getPointValueInDouble();
+        yslssdl = new BigDecimal(yslssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("yslssdl",yslssdl);
 
-        resultMap.put("ngzssdl",realData.get(54).getPointValueInDouble()+realData.get(55).getPointValueInDouble());
-        resultMap.put("nwhssdl",realData.get(56).getPointValueInDouble()+realData.get(57).getPointValueInDouble());
-        resultMap.put("nxnssdl",realData.get(58).getPointValueInDouble()+realData.get(59).getPointValueInDouble()+realData.get(60).getPointValueInDouble()+realData.get(61).getPointValueInDouble());
-        resultMap.put("nxdssdl",realData.get(62).getPointValueInDouble()+realData.get(63).getPointValueInDouble());
-        resultMap.put("nslssdl",realData.get(64).getPointValueInDouble()+realData.get(65).getPointValueInDouble());
+        double ngzssdl=realData.get(54).getPointValueInDouble()+realData.get(55).getPointValueInDouble();
+        ngzssdl = new BigDecimal(ngzssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("ngzssdl",ngzssdl);
+        double nwhssdl=realData.get(56).getPointValueInDouble()+realData.get(57).getPointValueInDouble();
+        nwhssdl = new BigDecimal(nwhssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("nwhssdl",nwhssdl);
+        double nxnssdl=realData.get(58).getPointValueInDouble()+realData.get(59).getPointValueInDouble()+realData.get(60).getPointValueInDouble()+realData.get(61).getPointValueInDouble();
+        nxnssdl = new BigDecimal(nxnssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("nxnssdl",nxnssdl);
+        double nxdssdl=realData.get(62).getPointValueInDouble()+realData.get(63).getPointValueInDouble();
+        nxdssdl = new BigDecimal(nxdssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("nxdssdl",nxdssdl);
+        double nslssdl=realData.get(64).getPointValueInDouble()+realData.get(65).getPointValueInDouble();
+        nslssdl = new BigDecimal(nslssdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        resultMap.put("nslssdl",nslssdl);
 
         resultMap.put("aqts",realData.get(66).getPointValueInDouble());
         resultMap.put("czmc",proBasicPowerstation.getAname());