xusl 1 năm trước cách đây
mục cha
commit
b394b9e4b9
12 tập tin đã thay đổi với 354 bổ sung130 xóa
  1. 5 0
      ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/abst/AbstractForecastPowerBase.java
  2. 48 0
      ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/entity/ForecastPowerShortTermOneHis.java
  3. 39 0
      ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/entity/ForecastPowerUltraShortTermOne.java
  4. 39 0
      ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/entity/ForecastPowerUltraShortTermOneHis.java
  5. 85 0
      ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/repository/ForecastPowerShortTermOneHisRepository.java
  6. 67 0
      ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/repository/ForecastPowerUltraShortTermOneHisRepository.java
  7. 34 0
      ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/repository/ForecastPowerUltraShortTermOneRepository.java
  8. 25 25
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/console/job/FileAnalysisJob.java
  9. 7 100
      ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/console/service/FileAnalysisService.java
  10. 3 3
      ipfcst/ipfcst-reportquery/src/main/java/com/jiayue/ipfcst/controller/DashboardController.java
  11. 1 1
      ipfcst/ipfcst-reportquery/src/main/java/com/jiayue/ipfcst/service/DashboardService.java
  12. 1 1
      ipfcst/ipfcst-reportquery/src/test/java/com/jiayue/ipfcst/service/DashboardServiceTest.java

+ 5 - 0
ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/abst/AbstractForecastPowerBase.java

@@ -54,4 +54,9 @@ public class AbstractForecastPowerBase implements Serializable {
     @Enumerated(EnumType.STRING)
     private PredictionModelEnum predictionModelEnum;
 
+    /**
+     * 场站编号
+     */
+    @Column
+    private String stationCode;
 }

+ 48 - 0
ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/entity/ForecastPowerShortTermOneHis.java

@@ -0,0 +1,48 @@
+package com.jiayue.ipfcst.common.data.entity;
+
+import com.jiayue.ipfcst.common.data.abst.AbstractForecastPowerHis;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.persistence.Entity;
+import javax.persistence.Transient;
+import java.math.BigDecimal;
+
+/**
+ * 短期预测功率实体
+ *
+ * @author zzy
+ * @version 1.0
+ * @since 2018/10/23 9:17
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@Entity
+public class ForecastPowerShortTermOneHis extends AbstractForecastPowerHis {
+
+	/**
+	 * ------------------------------------华北直调上报字段,不写入数据库--------------------------------------------
+	 */
+
+	//风速
+	@Transient
+	private BigDecimal windspeed;
+	//风向
+	@Transient
+	private BigDecimal windDir;
+	//气温
+	@Transient
+	private BigDecimal temperature;
+	//相对湿度
+	@Transient
+	private BigDecimal humidity;
+	//压力
+	@Transient
+	private BigDecimal pressure;
+	//经度
+	@Transient
+	private BigDecimal longitude;
+	//纬度
+	@Transient
+	private BigDecimal latitude;
+}

+ 39 - 0
ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/entity/ForecastPowerUltraShortTermOne.java

@@ -0,0 +1,39 @@
+package com.jiayue.ipfcst.common.data.entity;
+
+import com.jiayue.ipfcst.common.data.abst.AbstractForecastPower;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springframework.core.annotation.Order;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.validation.constraints.Digits;
+import java.math.BigDecimal;
+
+/**
+ * 超短期预测功率实体
+ *
+ * @author zzy
+ * @version 1.0
+ * @since 2019/8/1 10:56
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@Entity
+public class ForecastPowerUltraShortTermOne extends AbstractForecastPower {
+    /**
+     * 由差值计算出来的超短期(MW)
+     */
+    @Order(20)
+    @Digits(integer = 10, fraction = 2)
+    @Column
+    private BigDecimal DifferenceValue;
+
+    /**
+     * 由短期*系数计算出来的超短期(MW)
+     */
+    @Order(20)
+    @Digits(integer = 10, fraction = 2)
+    @Column
+    private BigDecimal CoefficientValue;
+}

+ 39 - 0
ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/entity/ForecastPowerUltraShortTermOneHis.java

@@ -0,0 +1,39 @@
+package com.jiayue.ipfcst.common.data.entity;
+
+import com.jiayue.ipfcst.common.data.abst.AbstractForecastPowerHis;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springframework.core.annotation.Order;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.validation.constraints.Digits;
+import java.math.BigDecimal;
+
+/**
+ * 超短期预测功率实体
+ *
+ * @author zzy
+ * @version 1.0
+ * @since 2019/8/1 10:56
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@Entity
+public class ForecastPowerUltraShortTermOneHis extends AbstractForecastPowerHis {
+    /**
+     * 由差值计算出来的超短期(MW)
+     */
+    @Order(20)
+    @Digits(integer = 10, fraction = 2)
+    @Column
+    private BigDecimal DifferenceValue;
+
+    /**
+     * 由短期*系数计算出来的超短期(MW)
+     */
+    @Order(20)
+    @Digits(integer = 10, fraction = 2)
+    @Column
+    private BigDecimal CoefficientValue;
+}

+ 85 - 0
ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/repository/ForecastPowerShortTermOneHisRepository.java

@@ -0,0 +1,85 @@
+package com.jiayue.ipfcst.common.data.repository;
+
+import com.jiayue.ipfcst.common.data.entity.ForecastPowerShortTermOneHis;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 上报短期预测功率仓储
+ *
+ * @author zzy
+ * @version 1.0
+ * @since 2019/8/2 10:57
+ */
+public interface ForecastPowerShortTermOneHisRepository extends BaseRepository<ForecastPowerShortTermOneHis, Integer> {
+
+//    /**
+//     * 根据预测时间段查询预测数据(按预测时间正序)
+//     *
+//     * @param stTime 开始时间
+//     * @param eTime  结束时间
+//     * @return @see com.jiayue.ipfcst.core.entity.power.ForecastPowerReverse
+//     */
+//    List<ForecastPowerShortTermUpload> findByKeyTimeBetweenOrderByKeyTimeAsc(Date stTime, Date eTime);
+//
+//    /**
+//     * 根据预测时间段和预测跨度查询预测数据(按预测时间正序)
+//     *
+//     * @param stTime 开始时间
+//     * @param eTime  结束时间
+//     * @param num  预测跨度[前几天预测]
+//     * @return @see com.jiayue.ipfcst.core.entity.power.ForecastPowerReverse
+//     */
+//    List<ForecastPowerShortTermUpload> findByKeyTimeBetweenAndNumOrderByKeyTimeAsc(Date stTime, Date eTime, Integer num);
+//
+//    /**
+//     * 根据上报日期查询预测数据(按预测时间正序)
+//     *
+//     * @param update 上报日期
+//     * @return @see com.jiayue.ipfcst.core.entity.power.ForecastPowerReverse
+//     */
+//    List<ForecastPowerShortTermUpload> findByKeyUpDateOrderByKeyTimeAsc(Date update);
+
+	/**
+	 * 根据时间段删除当日凌晨零点以后生成的短期历史期数据
+	 *
+	 * @param startTime 开始时间
+	 * @param endTime   结束时间
+	 */
+	@Modifying
+	@Query(value = "delete from ForecastPowerShortTermHis t where t.genDate >= CURRENT_DATE and t.forecastTime >=?1 and t.forecastTime<=?2")
+	void deleteToday(Long startTime, Long endTime);
+
+	/**
+	 * 根据提前多久,开始结束时间查询历史短期 yh
+	 *
+	 * @param startTime 开始时间
+	 * @param endTime   结束时间
+	 * @param ago       提前多久预测
+	 * @return 结果集
+	 */
+	List<ForecastPowerShortTermOneHis> findByForecastTimeBetweenAndForecastHowLongAgo(Long startTime, Long endTime, Integer ago);
+
+	/**
+	 * 根据提前多久,时间查询历史短期 yh
+	 *
+	 * @param queryTime 时间
+	 * @param ago       提前多久预测
+	 * @return 结果集
+	 */
+	ForecastPowerShortTermOneHis findByForecastTimeAndForecastHowLongAgo(Long queryTime, Integer ago);
+
+	/**
+	 * 根据时间段删除和提前多久预测删除短期数据
+	 *
+	 * @param startTime 开始时间
+	 * @param endTime   结束时间
+	 */
+	void deleteByForecastTimeBetweenAndForecastHowLongAgo(Long startTime, Long endTime,int HowLongAgo);
+
+
+	List<ForecastPowerShortTermOneHis> findByGenDateBetween(Date startTime, Date endTime);
+}

+ 67 - 0
ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/repository/ForecastPowerUltraShortTermOneHisRepository.java

@@ -0,0 +1,67 @@
+package com.jiayue.ipfcst.common.data.repository;
+
+
+import com.jiayue.ipfcst.common.data.entity.ForecastPowerUltraShortTermOneHis;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 上报超短期预测数据实体
+ *
+ * @author zzy
+ * @version 1.0
+ * @since 2019/8/2 12:53
+ */
+public interface ForecastPowerUltraShortTermOneHisRepository extends BaseRepository<ForecastPowerUltraShortTermOneHis, Integer> {
+
+	/**
+	 * 根据时间段删除当前时刻生成的超短期历史期数据
+	 *
+	 * @param startTime 开始时间
+	 * @param endTime   结束时间
+	 */
+	@Modifying
+	@Query(value = "delete from ForecastPowerUltraShortTermHis t where t.forecastTime >= ?1 and t.forecastTime<= ?2 and t.genDate = ?3 ")
+	void deleteNowMoment(Long startTime, Long endTime, Date nowMomentTime);
+
+	/**
+	 * 根据提前多久,开始结束时间查询历史超短期 yh
+	 *
+	 * @param startTime 开始时间
+	 * @param endTime   结束时间
+	 * @param ago       提前多久预测
+	 * @return 结果集
+	 */
+	List<ForecastPowerUltraShortTermOneHis> findByForecastTimeBetweenAndForecastHowLongAgo(Long startTime, Long endTime, Integer ago);
+	/**
+	 * 根据提前多久,时间查询历史超短期 yh
+	 *
+	 * @param queryTime 时间
+	 * @param ago       提前多久预测
+	 * @return 结果集
+	 */
+	ForecastPowerUltraShortTermOneHis findByForecastTimeAndForecastHowLongAgo(Long queryTime, Integer ago);
+	/**
+	 * 根据预测时间查询历史超短期 yh
+	 *
+	 * @param queryTime 时间
+
+	 * @return 结果集
+	 */
+	List<ForecastPowerUltraShortTermOneHis> findByForecastTime(Long queryTime);
+	/**
+	 * 根据提前多久,开始结束时间查询历史超短期 yh
+	 *
+	 * @param startTime 开始时间
+	 * @param endTime   结束时间
+	 * @return 结果集
+	 */
+	List<ForecastPowerUltraShortTermOneHis> findByForecastTimeBetween(Long startTime, Long endTime);
+
+
+
+	List<ForecastPowerUltraShortTermOneHis> findByForecastTimeBetweenAndGenDate(Long startTime, Long endTime,Date nowMomentTime);
+}

+ 34 - 0
ipfcst/ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/repository/ForecastPowerUltraShortTermOneRepository.java

@@ -0,0 +1,34 @@
+package com.jiayue.ipfcst.common.data.repository;
+
+
+import com.jiayue.ipfcst.common.data.entity.ForecastPowerUltraShortTermOne;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 实时超短期预测数据实体
+ *
+ * @author zzy
+ * @version 1.0
+ * @since 2019/8/2 12:53
+ */
+public interface ForecastPowerUltraShortTermOneRepository extends BaseRepository<ForecastPowerUltraShortTermOne, Serializable> {
+
+	/**
+	 * 根据预测时间段查询预测数据
+	 *
+	 * @param stTime 开始时间
+	 * @param eTime  结束时间
+	 * @return 超短期预测数据集合
+	 */
+	List<ForecastPowerUltraShortTermOne> deleteByForecastTimeBetween(Long stTime, Long eTime);
+
+	/**
+	 * 按时间段查询数据
+	 *
+	 * @param startTime
+	 * @param endTime
+	 */
+	List<ForecastPowerUltraShortTermOne> findByForecastTimeBetween(Long startTime, Long endTime);
+}

+ 25 - 25
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/console/job/FileAnalysisJob.java

@@ -35,30 +35,30 @@ public class FileAnalysisJob {
     }
 
 
-    @Scheduled(cron = "10 0/1 * * * *")
-    public void zxglFileAnalysis() {
-        log.debug("文件解析定时任务执行开始");
-
-        this.fileAnalysisService.analysisJobZxgl();
-
-        log.debug("文件解析定时任务执行完成");
-
-    }
-
-    @Scheduled(cron = "30 0/1 * * * *")
-    public void sdpowerplanFileAnalysis() {
-        try {
-            ElectricField electricField = fileAnalysisService.getElectricField();
-            if(electricField.getProvinceEnum().getCode() == 37){
-                log.debug("山东发电计划文件解析定时任务执行开始");
-
-                this.fileAnalysisService.analysisJobSDPowerPlan();
-
-                log.debug("山东发电计划文件解析定时任务执行完成");
-            }
-        } catch (BusinessException e) {
-            log.error("场站信息查询出错",e);
-        }
-    }
+//    @Scheduled(cron = "10 0/1 * * * *")
+//    public void zxglFileAnalysis() {
+//        log.debug("文件解析定时任务执行开始");
+//
+//        this.fileAnalysisService.analysisJobZxgl();
+//
+//        log.debug("文件解析定时任务执行完成");
+//
+//    }
+
+//    @Scheduled(cron = "30 0/1 * * * *")
+//    public void sdpowerplanFileAnalysis() {
+//        try {
+//            ElectricField electricField = fileAnalysisService.getElectricField();
+//            if(electricField.getProvinceEnum().getCode() == 37){
+//                log.debug("山东发电计划文件解析定时任务执行开始");
+//
+//                this.fileAnalysisService.analysisJobSDPowerPlan();
+//
+//                log.debug("山东发电计划文件解析定时任务执行完成");
+//            }
+//        } catch (BusinessException e) {
+//            log.error("场站信息查询出错",e);
+//        }
+//    }
 
 }

+ 7 - 100
ipfcst/ipfcst-console/src/main/java/com/jiayue/ipfcst/console/service/FileAnalysisService.java

@@ -185,15 +185,12 @@ public class FileAnalysisService extends BaseService {
                   if (firstRow.length==2){
                     // 获取场站名称
                     String czmc = firstRow[0].split("::")[1];
-                    if ("龙阜风电场".equals(czmc)){
+                    if ("光伏电场".equals(czmc)){
                       ycbs = 0;
                     }
-                    if ("龙阜风电场一期".equals(czmc)){
+                    if ("风电场".equals(czmc)){
                       ycbs = 1;
                     }
-                    else if ("龙阜风电场二期".equals(czmc)){
-                      ycbs = 2;
-                    }
                   }
                   break;
                 }
@@ -249,40 +246,11 @@ public class FileAnalysisService extends BaseService {
                     forecastPowerShortTermOneService.deleteBetweenAndGenTime(startTime, endTime, listDq);
                     flag = true;
                   } catch (Exception e) {
-                    log.error("一期文件保存短期数据报错", e);
-                    flag = false;
-                  }
-                } else {
-                  log.info(file.getName() + "一期文件数据内容为空、不能正常解析 、移除该文件、执行数据修正功能");
-                  flag = false;
-                }
-              }
-              else if (ycbs==2){
-                // 二期短期文件
-                List<ForecastPowerShortTermTwo> listDq = fileAnalysisShortTermTwo(file, currentDate);
-                ForecastPowerShortTermTwo forecastPowerShortTermTwo = null;
-                if (listDq != null && listDq.size() > 0) {
-                  //如果数据不全,进行补入
-                  while (listDq.get(listDq.size() - 1).getForecastTime() < DateTimeUtil.getMillisecondsSubDay() + 4 * 24 * 60 * 60 * 1000 - timeD) {
-                    forecastPowerShortTermTwo = new ForecastPowerShortTermTwo();
-                    forecastPowerShortTermTwo.setFpValue(listDq.get(listDq.size() - 96).getFpValue());//修正前值
-                    forecastPowerShortTermTwo.setGenDate(new Date()); //装机容量
-                    forecastPowerShortTermTwo.setForecastTime(currentDate);
-                    forecastPowerShortTermTwo.setPredictionModelEnum(PredictionModelEnum.E1);
-                    listDq.add(forecastPowerShortTermTwo);
-                  }
-                  try {
-                    //短期数据修正
-                    Long startTime = listDq.get(0).getForecastTime();
-                    Long endTime = listDq.get(listDq.size() - 1).getForecastTime();//删除相同时间数据
-                    forecastPowerShortTermTwoService.deleteBetweenAndGenTime(startTime, endTime, listDq);
-                    flag = true;
-                  } catch (Exception e) {
-                    log.error("二期文件保存短期数据报错", e);
+                    log.error("风电文件保存短期数据报错", e);
                     flag = false;
                   }
                 } else {
-                  log.info(file.getName() + "二期文件数据内容为空、不能正常解析 、移除该文件、执行数据修正功能");
+                  log.info(file.getName() + "风电文件数据内容为空、不能正常解析 、移除该文件、执行数据修正功能");
                   flag = false;
                 }
               }
@@ -345,15 +313,12 @@ public class FileAnalysisService extends BaseService {
                   if (firstRow.length==2){
                     // 获取场站名称
                     String czmc = firstRow[0].split("::")[1];
-                    if ("龙阜风电场".equals(czmc)){
+                    if ("光伏电场".equals(czmc)){
                       ycbs = 0;
                     }
-                    if ("龙阜风电场一期".equals(czmc)){
+                    if ("风电场".equals(czmc)){
                       ycbs = 1;
                     }
-                    else if ("龙阜风电场二期".equals(czmc)){
-                      ycbs = 2;
-                    }
                   }
                   break;
                 }
@@ -468,7 +433,7 @@ public class FileAnalysisService extends BaseService {
                   }
                 } else {
                   flag = false;
-                  log.info(file.getName() + "一期NWP文件数据内容为空、不能正常解析 、移除该文件、执行数据修正功能");
+                  log.info(file.getName() + "风电NWP文件数据内容为空、不能正常解析 、移除该文件、执行数据修正功能");
                 }
                 //保存NWP实时数据
                 Long startTime = listNwp.get(0).getPreTime();
@@ -476,64 +441,6 @@ public class FileAnalysisService extends BaseService {
                 nwpOneService.deleteBetweenAndPreTime(startTime, endTime, listNwp);
                 flag = true;
               }
-              else if (ycbs==2) {
-                // 二期
-                List<NwpTwo> listNwp = fileAnalysisNwpTwo(file);
-                NwpTwo nwpData = null;
-                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-                if (listNwp != null && listNwp.size() > 0) {
-                  while (listNwp.get(listNwp.size() - 1).getPreTime() < DateTimeUtil.getMillisecondsSubDay() + 4 * 24 * 60 * 60 * 1000 - timeD) {
-                    nwpData = new NwpTwo();
-                    long time = 0;
-                    try {
-                      time = sdf.parse(listNwp.get(listNwp.size() - 96).getPreDate()).getTime() + 24 * 60 * 60 * 1000;
-                    } catch (ParseException e) {
-                      e.printStackTrace();
-                    }
-                    nwpData.setFarmId(listNwp.get(listNwp.size() - 96).getFarmId());
-                    nwpData.setScDate(listNwp.get(listNwp.size() - 96).getScDate());
-                    nwpData.setScTime(listNwp.get(listNwp.size() - 96).getScTime());
-                    nwpData.setPreDate(sdf.format(time));
-                    nwpData.setPreTime(listNwp.get(listNwp.size() - 1).getPreTime() + timeD);
-                    nwpData.setT(listNwp.get(listNwp.size() - 96).getT());//温度
-                    nwpData.setRh(listNwp.get(listNwp.size() - 96).getRh());//湿度
-                    nwpData.setPressure(listNwp.get(listNwp.size() - 96).getPressure());//气压
-                    nwpData.setSwr(listNwp.get(listNwp.size() - 96).getSwr());//辐射
-                    nwpData.setLwr(listNwp.get(listNwp.size() - 96).getLwr());//辐射
-                    nwpData.setDiffuseRadiation(listNwp.get(listNwp.size() - 96).getDiffuseRadiation());//散接辐射
-                    nwpData.setDirectRadiation(listNwp.get(listNwp.size() - 96).getDirectRadiation());//直接辐射
-
-                    nwpData.setSenf(listNwp.get(listNwp.size() - 96).getSenf());//热感通量
-
-                    nwpData.setWs10(listNwp.get(listNwp.size() - 96).getWs10());//10 m 风速
-                    nwpData.setWs30(listNwp.get(listNwp.size() - 96).getWs30());//30 m 风速
-                    nwpData.setWs50(listNwp.get(listNwp.size() - 96).getWs50());//50 m 风速
-                    nwpData.setWs70(listNwp.get(listNwp.size() - 96).getWs70());//70 m 风速
-                    nwpData.setWs80(listNwp.get(listNwp.size() - 96).getWs80());//80 m 风速
-                    nwpData.setWs90(listNwp.get(listNwp.size() - 96).getWs90());//90 m 风速
-                    nwpData.setWs100(listNwp.get(listNwp.size() - 96).getWs100());//100 m 风速
-                    nwpData.setWs170(listNwp.get(listNwp.size() - 96).getWs170());//170 m 风速
-
-                    nwpData.setWd10(listNwp.get(listNwp.size() - 96).getWd10());//10 m 风向
-                    nwpData.setWd30(listNwp.get(listNwp.size() - 96).getWd30());//30 m 风向
-                    nwpData.setWd50(listNwp.get(listNwp.size() - 96).getWd50());//50 m 风向
-                    nwpData.setWd70(listNwp.get(listNwp.size() - 96).getWd70());//70 m 风向
-                    nwpData.setWd80(listNwp.get(listNwp.size() - 96).getWd80());//80 m 风向
-                    nwpData.setWd90(listNwp.get(listNwp.size() - 96).getWd90());//90 m 风向
-                    nwpData.setWd100(listNwp.get(listNwp.size() - 96).getWd100());//100 m 风向
-                    nwpData.setWd170(listNwp.get(listNwp.size() - 96).getWd170());//170 m 风向
-                    listNwp.add(nwpData);
-                  }
-                } else {
-                  flag = false;
-                  log.info(file.getName() + "二期NWP文件数据内容为空、不能正常解析 、移除该文件、执行数据修正功能");
-                }
-                //保存NWP实时数据
-                Long startTime = listNwp.get(0).getPreTime();
-                Long endTime = listNwp.get(listNwp.size() - 1).getPreTime();//删除相同时间数据
-                nwpTwoService.deleteBetweenAndPreTime(startTime, endTime, listNwp);
-                flag = true;
-              }
 						} catch (Exception e) {
 							log.error("解析NWP文件失败", e);
 							flag = false;

+ 3 - 3
ipfcst/ipfcst-reportquery/src/main/java/com/jiayue/ipfcst/controller/DashboardController.java

@@ -72,9 +72,9 @@ public class DashboardController {
    * 获取首页短期、超短期、实际功率数据
    * @return
    */
-  @RequestMapping(value = "/getCompositeData")
-  public ResponseVO getCompositeData() {
-    return ResponseVO.success(dashboardService.getCompositeData());
+  @RequestMapping(value = "/getCompositeData/{efiType}")
+  public ResponseVO getCompositeData(@PathVariable final String efiType) {
+    return ResponseVO.success(dashboardService.getCompositeData(efiType));
   }
 
   /**

+ 1 - 1
ipfcst/ipfcst-reportquery/src/main/java/com/jiayue/ipfcst/service/DashboardService.java

@@ -1036,7 +1036,7 @@ public class DashboardService extends BaseService {
    *
    * @return
    */
-  public Map<String, List> getCompositeData() {
+  public Map<String, List> getCompositeData(String efiType) {
     Date d = new Date();
     Long startDateTime = DateMomentUtil.getDayStartTime(d.getTime());
     Long endDateTime = DateMomentUtil.getDayLastTime(d.getTime());

+ 1 - 1
ipfcst/ipfcst-reportquery/src/test/java/com/jiayue/ipfcst/service/DashboardServiceTest.java

@@ -45,7 +45,7 @@ class DashboardServiceTest extends BaseTest {
 
   @Test
   void getUploadFileInfo() {
-    dashboardService.getCompositeData();
+//    dashboardService.getCompositeData();
   }
 
   public static void main(String[] args) {