浏览代码

驾驶舱 海子井风速温度 测点修改

wangchangsheng 3 年之前
父节点
当前提交
fcab99523c

+ 2 - 2
src/main/java/com/gyee/frame/common/spring/ConstantTR.java

@@ -314,8 +314,8 @@ public class ConstantTR {
 	/******************************************** 宣和风电场 *****************************************/
 
 	/******************************************** 海子井风电场 *****************************************/
-	public static final String HZJWD = "HZJGDCJSFW.NX_GD_HZJG_XX_XX_XXX_XXX_CI0134"; // 宣和测风塔温度
-	public static final String HZJPJFS = "HZJGDCJSFW.NX_GD_HZJG_XX_XX_XXX_XXX_CI0134"; // 宣和平均风速
+	public static final String HZJWD = "HZJGGL.NX_GD_HZJG_YC_P1_L1_001_QXZ005"; // 海子井测风塔温度
+	public static final String HZJPJFS = "HZJGGL.NX_GD_HZJG_YC_P1_L1_001_QXZ007"; // 海子井平均风速
 	/******************************************** 海子井风电场 *****************************************/
 
 	/******************************************** 香山风电场 *****************************************/

+ 4 - 3
src/main/java/com/gyee/frame/schdule/weather/TaskWeatherGather.java

@@ -8,6 +8,7 @@ import com.gyee.frame.service.weather.WfnwpdataService;
 import com.gyee.frame.util.DateUtils;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
@@ -18,7 +19,7 @@ import java.util.*;
 /**
  * 采集风速到weatherfd表
  */
-//@Component
+@Component
 public class TaskWeatherGather {
 
     //默认预测数据 40 天
@@ -42,8 +43,8 @@ public class TaskWeatherGather {
     /**
      * 延时1分钟  每天凌晨1点执行一次
      */
-//    @Scheduled(initialDelay = 60 * 1000, cron = "0 0 1 * * ")
-    @Scheduled(initialDelay = 30 * 1000, fixedRate = 2 * 86400 * 1000)
+    @Scheduled(cron = "0 0 1 * * ?")
+//    @Scheduled(initialDelay = 30 * 1000, fixedRate = 2 * 86400 * 1000)
     public void gatherTask() {
         for (int key : wp_map.keySet()) {
             String[] value = wp_map.get(key).split("#");

+ 2 - 2
src/main/java/com/gyee/frame/service/weather/WeatherParsing.java

@@ -38,7 +38,7 @@ public class WeatherParsing {
     /**
      * 定时获取预测天气
      */
-    @Scheduled(cron = "0 20 1 * * ?")
+    //@Scheduled(cron = "0 20 1 * * ?")
     //@Scheduled(fixedRate = 15000)
     public void getWeatherDay5() {
 
@@ -199,7 +199,7 @@ public class WeatherParsing {
                         //填补后一个月的预测数据
                         Calendar cal = Calendar.getInstance();
                         cal.setTime(new Date());
-                        cal.add(Calendar.MONTH, +2);//设置获取1个月后的时间
+                        cal.add(Calendar.MONTH, +1);//设置获取1个月后的时间
                         long prDate = cal.getTimeInMillis();
                         System.out.println(df.format(prDate));//
                         long prday =  (prDate - e) /(1000 * 3600 * 24);//计算需要填补预测天气的天数