Browse Source

修正预测发电量

shilin 3 years ago
parent
commit
2c0686366c

+ 3 - 0
src/main/java/com/gyee/frame/mapper/auto/WindPowerStationTestingPointMapper.java

@@ -97,5 +97,8 @@ public interface WindPowerStationTestingPointMapper {
 
     int deleteAll();
 
+    int deleteYc();
+
+
     int insertBatch(List<WindPowerStationTestingPoint> ls);
 }

+ 10 - 0
src/main/java/com/gyee/frame/service/WindPowerstationTestingPointService.java

@@ -130,6 +130,16 @@ public class WindPowerstationTestingPointService implements BaseService<WindPowe
 
 	}
 
+	public int deleteYc() {
+
+
+		int result= windPowerStationTestingPointMapper.deleteYc();
+
+
+		return result;
+
+	}
+
 	public int insertBatch(List<WindPowerStationTestingPoint> ls) {
 
 

+ 1 - 1
src/main/java/com/gyee/frame/service/initialpoint/InitialPointGoldenService.java

@@ -512,7 +512,7 @@ public class InitialPointGoldenService implements  IinitialPoint{
     public void initalFgl() {
 
 
-        windPowerstationTestingPointService.deleteAll();
+        windPowerstationTestingPointService.deleteYc();
 
         List<Forecaststationtandardpoint>  stpointls=forecaststationtandardpointService.findAllList();
 

+ 3 - 1
src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java

@@ -440,7 +440,7 @@ public class GenreSetPushService {
 
             //预测发电量
             double rycfdl = rfdl * YCFDLXS;
-            double yycfdl = rycfdl * daynum;
+
 
 //            Map<String,Object> weathermap= weatherDay5Service.getWeatherRealDay5Info(id);
 
@@ -472,6 +472,8 @@ public class GenreSetPushService {
             {
                 rycfdl = rfdl * YCFDLXS;
             }
+            //预测电量临时算法=(月发电量+日预测发电量*(日历天数-当前日数))*预测发电量系数
+            double yycfdl = (yfdl + rycfdl*(daynum-c.get(Calendar.DAY_OF_MONTH)))*YCFDLXS;
             jczbmap.put("rycfdl", MathUtil.twoBit(rycfdl));
             jczbmap.put("yycfdl", MathUtil.twoBit(yycfdl));
 

+ 4 - 0
src/main/resources/mybatis/auto/WindPowerStationTestingPointMapper.xml

@@ -449,6 +449,10 @@
     delete from WINDPOWERSTATIONTESTINGPOINT
   </delete>
 
+  <delete id="deleteYc"  >
+
+    delete from WINDPOWERSTATIONTESTINGPOINT    where CODE like  '%_YC_%'
+  </delete>
 
   <insert id="insertBatch" parameterType="java.util.List" >