malijun il y a 1 an
Parent
commit
40f8ea1199

+ 2 - 2
electricity/meter/src/main/java/com/gyee/gaia/meter/service/meter/GetView.java

@@ -232,13 +232,13 @@ public class GetView {
         sisViewVO.setYfdl(oneFCYFDL.getValue().add(oneGFYFDL.getValue()));
 
         //月利用小时
-        sisViewVO.setYlyxs(oneFCYFDL.getValue().add(oneGFYFDL.getValue()).divide(BigDecimal.valueOf(786.56), 2, RoundingMode.HALF_EVEN));
+        sisViewVO.setYlyxs(oneFCYFDL.getValue().add(oneGFYFDL.getValue()).divide(BigDecimal.valueOf(78.656), 2, RoundingMode.HALF_EVEN));
 
         //年发电量
         sisViewVO.setNfdl(oneFCNFDL.getValue().add(oneGFNFDL.getValue()));
 
         //年利用小时
-        sisViewVO.setNlyxs(oneFCNFDL.getValue().add(oneGFNFDL.getValue()).divide(BigDecimal.valueOf(786.56), 2, RoundingMode.HALF_EVEN));
+        sisViewVO.setNlyxs(oneFCNFDL.getValue().add(oneGFNFDL.getValue()).divide(BigDecimal.valueOf(78.656), 2, RoundingMode.HALF_EVEN));
 
         //日上网电量
         sisViewVO.setSwdl(oneFCSWDL.getValue().add(oneGFSWDL.getValue()));

+ 6 - 0
electricity/meter/src/main/java/com/gyee/gaia/meter/service/saveHistory/SaveMeterInfoHistoryDay.java

@@ -460,6 +460,9 @@ class SaveMeterInfoHistoryDay {
                                 rfdl = (bigDecimal20.subtract(bigDecimalGrow2).add(bigDecimalGrow1).subtract(bigDecimal10)).divide(meterPoint.getXs(), 4, RoundingMode.HALF_EVEN).multiply(meterPoint.getMagnification());
                             }
                         }
+                        if ( rfdl.doubleValue() < 0) {
+                            rfdl= BigDecimal.valueOf(-1);
+                        }
                     }
 
                     MeterInfoBottomcode meterInfoBottomcode = new MeterInfoBottomcode();
@@ -1605,6 +1608,9 @@ class SaveMeterInfoHistoryDay {
                                     rfdl = (bigDecimal2.subtract(bigDecimalGrow2).add(bigDecimalGrow1).subtract(bigDecimal1)).multiply(meterPoint.getMagnification());
                                 }
                             }
+                            if ( rfdl.doubleValue() < 0) {
+                                rfdl= BigDecimal.valueOf(-1);
+                            }
                         }
 
                         MeterInfoBottomcode meterInfoBottomcode = new MeterInfoBottomcode();

+ 11 - 1
electricity/meter/src/main/java/com/gyee/gaia/meter/service/saveHistory/SaveMeterInfoHistoryDayTest.java

@@ -461,6 +461,10 @@ class SaveMeterInfoHistoryDayTest {
                                 rfdl = (bigDecimal20.subtract(bigDecimalGrow2).add(bigDecimalGrow1).subtract(bigDecimal10)).divide(meterPoint.getXs(), 4, RoundingMode.HALF_EVEN).multiply(meterPoint.getMagnification());
                             }
                         }
+                        if ( rfdl.doubleValue() < 0) {
+                            rfdl= BigDecimal.valueOf(-1);
+                        }
+
                     }
 
                     MeterInfoBottomcode meterInfoBottomcode = new MeterInfoBottomcode();
@@ -578,6 +582,9 @@ class SaveMeterInfoHistoryDayTest {
                                 rfdl = (bigDecimal20.subtract(bigDecimalGrow2).add(bigDecimalGrow1).subtract(bigDecimal10)).divide(meterPoint.getXs(), 4, RoundingMode.HALF_EVEN).multiply(meterPoint.getMagnification());
                             }
                         }
+                        if ( rfdl.doubleValue() < 0) {
+                            rfdl= BigDecimal.valueOf(-1);
+                        }
                     }
 
                     MeterInfoBottomcode meterInfoBottomcode = new MeterInfoBottomcode();
@@ -896,7 +903,7 @@ class SaveMeterInfoHistoryDayTest {
 
         List<MeterPoint> meterPointJSDList = meterPointService.list(new QueryWrapper<MeterPoint>()
                 .eq("property", "JSD")
-                .eq("windpowerstation_id", "NX_GDDL_MHS_FDC_STA")
+                .eq("windpowerstation_id", "NX_GDDL_QS_FDC_STA")
                 .ne("formula", ""));
 
 
@@ -2455,6 +2462,9 @@ class SaveMeterInfoHistoryDayTest {
                                     rfdl = (bigDecimal2.subtract(bigDecimalGrow2).add(bigDecimalGrow1).subtract(bigDecimal1)).multiply(meterPoint.getMagnification());
                                 }
                             }
+                            if ( rfdl.doubleValue() < 0) {
+                                rfdl= BigDecimal.valueOf(-1);
+                            }
                         }
 
                         MeterInfoBottomcode meterInfoBottomcode = new MeterInfoBottomcode();