瀏覽代碼

所有的forecast_time改为time,并且调整了解析云端文件的功能,文件名称必须包含场站编码

tl 8 月之前
父節點
當前提交
79172333a7

+ 2 - 2
cpp-admin/src/main/java/com/cpp/web/service/cloud/impl/ForecastPowerShortTermCloudServiceImpl.java

@@ -33,7 +33,7 @@ public class ForecastPowerShortTermCloudServiceImpl extends ServiceImpl<Forecast
             wrapper.eq("station_code", stationCode);
             wrapper.eq("station_code", stationCode);
         }
         }
         if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
         if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
-            wrapper.between("forecast_time", startTime, endTime);
+            wrapper.between("time", startTime, endTime);
         }
         }
 
 
         return baseMapper.selectList(wrapper);
         return baseMapper.selectList(wrapper);
@@ -46,7 +46,7 @@ public class ForecastPowerShortTermCloudServiceImpl extends ServiceImpl<Forecast
             wrapper.eq("station_code", stationCode);
             wrapper.eq("station_code", stationCode);
         }
         }
         if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
         if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
-            wrapper.between("forecast_time", startTime, endTime);
+            wrapper.between("time", startTime, endTime);
         }
         }
         if (forecastManufactor != null && !forecastManufactor.equals("")) {
         if (forecastManufactor != null && !forecastManufactor.equals("")) {
             wrapper.eq("forecast_manufactor", forecastManufactor);
             wrapper.eq("forecast_manufactor", forecastManufactor);

+ 2 - 2
cpp-admin/src/main/java/com/cpp/web/service/cloud/impl/ForecastPowerUltraShortTermCloudServiceImpl.java

@@ -26,7 +26,7 @@ public class ForecastPowerUltraShortTermCloudServiceImpl extends ServiceImpl<For
             wrapper.eq("station_code", stationCode);
             wrapper.eq("station_code", stationCode);
         }
         }
         if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
         if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
-            wrapper.between("forecast_time", startTime, endTime);
+            wrapper.between("time", startTime, endTime);
         }
         }
         return baseMapper.selectList(wrapper);
         return baseMapper.selectList(wrapper);
     }
     }
@@ -35,7 +35,7 @@ public class ForecastPowerUltraShortTermCloudServiceImpl extends ServiceImpl<For
     public List<ForecastPowerUltraShortTermCloud> findByForecastTimeBetweenAndHowLongAgo(Date startTime, Date endTime, int ago) {
     public List<ForecastPowerUltraShortTermCloud> findByForecastTimeBetweenAndHowLongAgo(Date startTime, Date endTime, int ago) {
         QueryWrapper<ForecastPowerUltraShortTermCloud> wrapper = new QueryWrapper<>();
         QueryWrapper<ForecastPowerUltraShortTermCloud> wrapper = new QueryWrapper<>();
         if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
         if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
-            wrapper.between("forecast_time", startTime, endTime);
+            wrapper.between("time", startTime, endTime);
         }
         }
         wrapper.eq("forecast_how_long_ago", ago);
         wrapper.eq("forecast_how_long_ago", ago);
 
 

+ 87 - 54
cpp-admin/src/main/java/com/cpp/web/service/cloud/CloudFileParsing.java → cpp-admin/src/main/java/com/cpp/web/service/datafactory/CloudFileParsing.java

@@ -1,4 +1,4 @@
-package com.cpp.web.service.cloud;
+package com.cpp.web.service.datafactory;
 
 
 import com.cpp.common.utils.StringUtils;
 import com.cpp.common.utils.StringUtils;
 import com.cpp.web.domain.BaseForecastEntity;
 import com.cpp.web.domain.BaseForecastEntity;
@@ -9,6 +9,8 @@ import com.cpp.web.domain.datafactory.enums.FileTypeEnum;
 import com.cpp.web.domain.enums.AlarmEnum;
 import com.cpp.web.domain.enums.AlarmEnum;
 import com.cpp.web.domain.enums.DataSourcesEnum;
 import com.cpp.web.domain.enums.DataSourcesEnum;
 import com.cpp.web.service.alarm.AbnormalAlarmService;
 import com.cpp.web.service.alarm.AbnormalAlarmService;
+import com.cpp.web.service.cloud.ForecastPowerShortTermCloudService;
+import com.cpp.web.service.cloud.NwpCloudService;
 import com.cpp.web.service.datafactory.ParsingLogService;
 import com.cpp.web.service.datafactory.ParsingLogService;
 import com.cpp.web.service.overhaulplan.OverhaulPlanService;
 import com.cpp.web.service.overhaulplan.OverhaulPlanService;
 import com.cpp.web.utils.*;
 import com.cpp.web.utils.*;
@@ -28,6 +30,8 @@ import java.nio.file.Files;
 import java.text.ParseException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 
 /**
 /**
  * ftp文件解析
  * ftp文件解析
@@ -41,15 +45,10 @@ import java.util.*;
 public class CloudFileParsing {
 public class CloudFileParsing {
 
 
     private final ParsingLogService parsingLogService;
     private final ParsingLogService parsingLogService;
-
     private final ForecastPowerShortTermCloudService forecastPowerShortTermCloudService;
     private final ForecastPowerShortTermCloudService forecastPowerShortTermCloudService;
     private final NwpCloudService nwpCloudService;
     private final NwpCloudService nwpCloudService;
-
     private final File fileNewDir = ParsingFileUtil.checkGetPath(ParsingFileUtil.getOutDownload() + File.separator + "new");
     private final File fileNewDir = ParsingFileUtil.checkGetPath(ParsingFileUtil.getOutDownload() + File.separator + "new");
-
     private final ThreadPoolTaskExecutor executor;
     private final ThreadPoolTaskExecutor executor;
-
-
     private final OverhaulPlanService overhaulPlanService;
     private final OverhaulPlanService overhaulPlanService;
 
 
     /**
     /**
@@ -98,77 +97,94 @@ public class CloudFileParsing {
                 parsingLog.setParsingTime(new Date());
                 parsingLog.setParsingTime(new Date());
                 parsingLog.setFileName(fileName);
                 parsingLog.setFileName(fileName);
 
 
-                // 如果文件不是当的,删除文件
+                // 如果文件不是当的,删除文件
                 if (!fileName.contains(dayStr)) {
                 if (!fileName.contains(dayStr)) {
                     file.delete();
                     file.delete();
                     log.warn(fileName + "不是当天的文件,删除!");
                     log.warn(fileName + "不是当天的文件,删除!");
                     break;
                     break;
                 }
                 }
                 // 如果文件名长度符合规则
                 // 如果文件名长度符合规则
-                if (fileName.length() < 30) {
+                if (fileName.length() < 31) {
                     // 如果是短期文件
                     // 如果是短期文件
                     if (file.getName().startsWith("DQ")) {
                     if (file.getName().startsWith("DQ")) {
-                        try {
-                            parsingLog.setFileType(FileTypeEnum.dq);
-                            // 解析短期文件
-                            List<BaseForecastEntity> listDq = new ArrayList<>();
-                            listDq.addAll(fileAnalysisShortTerm(file, new Date(currentDate)));
-                            if (!listDq.isEmpty()) {
-                                try {
-                                    String stationCode = listDq.get(0).getStationCode();
-                                    parsingLog.setStationCode(stationCode);
-                                    forecastPowerShortTermCloudService.saveBatch(overhaulPlanService.getCorrectionData(listDq, FileTypeEnum.dq.name(), fileName, stationCode));
-                                    flag = true;
-                                } catch (Exception e) {
-                                    log.error("保存短期数据报错:" + fileName, e);
-                                    parsingLog.setParsingDescribe("保存短期数据报错:" + fileName);
-                                    LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "保存短期数据报错:" + fileName, null);
+                        String stationCode = findStationCode(fileName);
+                        if (!stationCode.equals("null")) {
+                            try {
+                                //标准格式DQ_J01100_202410170118030.RB
+                                parsingLog.setFileType(FileTypeEnum.dq);
+                                // 解析短期文件
+                                List<BaseForecastEntity> listDq = new ArrayList<>();
+                                listDq.addAll(fileAnalysisShortTerm(file, new Date(currentDate)));
+                                if (!listDq.isEmpty()) {
+                                    try {
+                                        parsingLog.setStationCode(stationCode);
+                                        forecastPowerShortTermCloudService.saveBatch(overhaulPlanService.getCorrectionData(listDq, FileTypeEnum.dq.name(), fileName, stationCode));
+                                        flag = true;
+                                    } catch (Exception e) {
+                                        log.error("保存短期数据报错:" + fileName, e);
+                                        parsingLog.setParsingDescribe("保存短期数据报错:" + fileName);
+                                        LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "保存短期数据报错:" + fileName, null);
+                                        flag = false;
+                                    }
+                                } else {
+                                    log.info(file.getName() + "文件数据内容为空、不能正常解析 、移除该文件:" + fileName);
+                                    parsingLog.setParsingDescribe("文件数据内容为空、不能正常解析 、移除该文件:" + fileName);
+                                    LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "文件数据内容为空、不能正常解析 、移除该文件::" + fileName, null);
                                     flag = false;
                                     flag = false;
                                 }
                                 }
-                            } else {
-                                log.info(file.getName() + "文件数据内容为空、不能正常解析 、移除该文件:" + fileName);
-                                parsingLog.setParsingDescribe("文件数据内容为空、不能正常解析 、移除该文件:" + fileName);
-                                LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "文件数据内容为空、不能正常解析 、移除该文件::" + fileName, null);
-                                flag = false;
-                            }
 
 
 
 
-                        } catch (Exception e) {
+                            } catch (Exception e) {
+                                flag = false;
+                                parsingLog.setParsingDescribe("解析DQ文件异常:" + fileName);
+                                LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "解析DQ文件失败:" + fileName, null);
+                                log.error("解析DQ文件失败:" + fileName, e);
+                            }
+                        }else {
                             flag = false;
                             flag = false;
-                            parsingLog.setParsingDescribe("解析DQ文件异常:" + fileName);
-                            LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "解析DQ文件失败:" + fileName, null);
-                            log.error("解析DQ文件失败:" + fileName, e);
+                            parsingLog.setParsingDescribe("解析DQ文件异常:" + fileName + "==无法获取场站编码");
+                            LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "解析DQ文件失败:" + fileName + "==无法获取场站编码", null);
+                            log.error("解析DQ文件失败:" + fileName + "==无法获取场站编码");
                         }
                         }
                     }
                     }
 
 
 
 
                     if (file.getName().startsWith("NWP")) {
                     if (file.getName().startsWith("NWP")) {
-                        try {
-                            parsingLog.setFileType(FileTypeEnum.nwp);
-                            List<NwpCloud> listNwp = fileAnalysisNwp(file, new Date(currentDate));
-                            if (!listNwp.isEmpty()) {
-                                try {
-                                    parsingLog.setStationCode(listNwp.get(0).getStationCode());
-                                    nwpCloudService.saveBatch(listNwp);
-                                    flag = true;
-                                } catch (Exception e) {
-                                    LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "保存NWP数据报错:" + fileName, null);
-                                    log.error("保存NWP数据报错:" + fileName, e);
-                                    parsingLog.setParsingDescribe("保存NWP数据报错:" + fileName);
+                        String stationCode = findStationCode(fileName);
+                        if (!stationCode.equals("null")) {
+                            try {
+                                parsingLog.setFileType(FileTypeEnum.nwp);
+                                List<NwpCloud> listNwp = fileAnalysisNwp(file, new Date(currentDate));
+                                if (!listNwp.isEmpty()) {
+                                    try {
+                                        parsingLog.setStationCode(listNwp.get(0).getStationCode());
+                                        nwpCloudService.saveBatch(listNwp);
+                                        flag = true;
+                                    } catch (Exception e) {
+                                        LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "保存NWP数据报错:" + fileName, null);
+                                        log.error("保存NWP数据报错:" + fileName, e);
+                                        parsingLog.setParsingDescribe("保存NWP数据报错:" + fileName);
+                                        flag = false;
+                                    }
+                                } else {
+                                    LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "文件数据内容为空、不能正常解析 、移除该文件:" + fileName, null);
+                                    parsingLog.setParsingDescribe("文件数据内容为空、不能正常解析 、移除该文件:" + fileName);
+                                    log.info(file.getName() + "文件数据内容为空、不能正常解析 、移除该文件");
                                     flag = false;
                                     flag = false;
                                 }
                                 }
-                            } else {
-                                LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "文件数据内容为空、不能正常解析 、移除该文件:" + fileName, null);
-                                parsingLog.setParsingDescribe("文件数据内容为空、不能正常解析 、移除该文件:" + fileName);
-                                log.info(file.getName() + "文件数据内容为空、不能正常解析 、移除该文件");
+                            } catch (Exception e) {
+                                LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "解析NWP文件失败:" + fileName, null);
+                                log.error("解析NWP文件失败:" + fileName, e);
+                                parsingLog.setParsingDescribe("解析NWP文件失败:" + fileName);
                                 flag = false;
                                 flag = false;
                             }
                             }
-                        } catch (Exception e) {
-                            LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "解析NWP文件失败:" + fileName, null);
-                            log.error("解析NWP文件失败:" + fileName, e);
-                            parsingLog.setParsingDescribe("解析NWP文件失败:" + fileName);
+                        } else {
                             flag = false;
                             flag = false;
+                            LogUtil.info(DataSourcesEnum.E2, AlarmEnum.E4, "解析NWP文件失败:" + fileName + "==无法获取场站编码", null);
+                            log.error("解析NWP文件失败:" + fileName + "==无法获取场站编码");
+                            parsingLog.setParsingDescribe("解析NWP文件失败:" + fileName + "==无法获取场站编码");
                         }
                         }
+
                     }
                     }
 
 
 
 
@@ -360,7 +376,10 @@ public class CloudFileParsing {
      * @param currentDate 当前时间
      * @param currentDate 当前时间
      * @return 样例集合
      * @return 样例集合
      */
      */
-    private List<ForecastPowerShortTermCloud> fileAnalysisShortTerm(File file, Date currentDate) {
+    private List<ForecastPowerShortTermCloud> fileAnalysisShortTerm(
+            File file,
+            Date currentDate
+    ) {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         List<ForecastPowerShortTermCloud> forecastPowerShortTerm = new ArrayList<>();
         List<ForecastPowerShortTermCloud> forecastPowerShortTerm = new ArrayList<>();
         // 当文件未被使用时,进行解析上报
         // 当文件未被使用时,进行解析上报
@@ -552,4 +571,18 @@ public class CloudFileParsing {
             log.error(file.getName() + "文件解析失败", e);
             log.error(file.getName() + "文件解析失败", e);
         }
         }
     }
     }
+
+
+    public String findStationCode(String fileName) {
+        String regex = "_([^_]+)_"; // 匹配两个下划线之间的内容
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(fileName);
+
+        if (matcher.find()) {
+            String result = matcher.group(1); // 获取第一个捕获组的内容
+            return result;
+        } else {
+            return "null";
+        }
+    }
 }
 }

+ 3 - 3
cpp-admin/src/main/java/com/cpp/web/service/datafactory/impl/ParsingRcdqServiceImpl.java

@@ -92,7 +92,7 @@ public class ParsingRcdqServiceImpl implements ParsingInterface {
                                     forecastPowerUltraShortTermRegulationList.add(forecastPowerUltraShortTermRegulation);
                                     forecastPowerUltraShortTermRegulationList.add(forecastPowerUltraShortTermRegulation);
                                     time = new Date(time.getTime() + 900000L);//递增15分钟
                                     time = new Date(time.getTime() + 900000L);//递增15分钟
                                 }
                                 }
-                                scheduleAddCache(forecastPowerUltraShortTermRegulationList,stationCode);
+                                scheduleAddCache(forecastPowerUltraShortTermRegulationList, stationCode);
                                 forecastPowerUltraShortTermRegulationService.saveBatch(forecastPowerUltraShortTermRegulationList);
                                 forecastPowerUltraShortTermRegulationService.saveBatch(forecastPowerUltraShortTermRegulationList);
                                 log.info("解析 调控后CDQ文件:{} 成功! O(∩_∩)O", file.getName());
                                 log.info("解析 调控后CDQ文件:{} 成功! O(∩_∩)O", file.getName());
                                 parsingResultDto.setStatus("success");
                                 parsingResultDto.setStatus("success");
@@ -233,8 +233,8 @@ public class ParsingRcdqServiceImpl implements ParsingInterface {
         //未来四小时
         //未来四小时
         Date endTime = new Date(startTime.getTime() + 4 * 60 * 60000L);
         Date endTime = new Date(startTime.getTime() + 4 * 60 * 60000L);
 
 
-        List<ForecastPowerUltraShortTermRegulation> forecastPowerUltraShortTermRegulations = forecastPowerUltraShortTermRegulationList.stream().filter(f->f.getTime().getTime() >= startTime.getTime() && f.getTime().getTime() < endTime.getTime()).collect(Collectors.toList());
-        if (forecastPowerUltraShortTermRegulations.size() >= 16) {
+        List<ForecastPowerUltraShortTermRegulation> forecastPowerUltraShortTermRegulations = forecastPowerUltraShortTermRegulationList.stream().filter(f -> f.getTime().getTime() >= startTime.getTime() && f.getTime().getTime() < endTime.getTime()).collect(Collectors.toList());
+        if (forecastPowerUltraShortTermRegulations.size() >= 16 - ago) {
             scheduledHelper.scheduleTaskAtFixedDate(startTime, new Runnable() {
             scheduledHelper.scheduleTaskAtFixedDate(startTime, new Runnable() {
                 @Override
                 @Override
                 public void run() {
                 public void run() {

+ 2 - 2
cpp-admin/src/main/java/com/cpp/web/service/station/impl/ForecastPowerShortTermRegulationServiceImpl.java

@@ -26,7 +26,7 @@ public class ForecastPowerShortTermRegulationServiceImpl extends ServiceImpl<For
             wrapper.eq("station_code", stationCode);
             wrapper.eq("station_code", stationCode);
         }
         }
         if (startTime != null && endTime != null) {
         if (startTime != null && endTime != null) {
-            wrapper.between("forecast_time", new Date(startTime), new Date(endTime));
+            wrapper.between("time", new Date(startTime), new Date(endTime));
         }
         }
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         return baseMapper.selectList(wrapper);
         return baseMapper.selectList(wrapper);
@@ -51,7 +51,7 @@ public class ForecastPowerShortTermRegulationServiceImpl extends ServiceImpl<For
             wrapper.eq("station_code", stationCode);
             wrapper.eq("station_code", stationCode);
         }
         }
         if (time != null) {
         if (time != null) {
-            wrapper.eq("forecast_time", new Date(time));
+            wrapper.eq("time", new Date(time));
         }
         }
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         return baseMapper.selectOne(wrapper);
         return baseMapper.selectOne(wrapper);

+ 2 - 2
cpp-admin/src/main/java/com/cpp/web/service/station/impl/ForecastPowerShortTermSendServiceImpl.java

@@ -29,7 +29,7 @@ public class ForecastPowerShortTermSendServiceImpl extends ServiceImpl<ForecastP
             wrapper.eq("station_code", stationCode);
             wrapper.eq("station_code", stationCode);
         }
         }
         if (startTime != null && endTime != null) {
         if (startTime != null && endTime != null) {
-            wrapper.between("forecast_time", new Date(startTime), new Date(endTime));
+            wrapper.between("time", new Date(startTime), new Date(endTime));
         }
         }
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         return baseMapper.selectList(wrapper);
         return baseMapper.selectList(wrapper);
@@ -43,7 +43,7 @@ public class ForecastPowerShortTermSendServiceImpl extends ServiceImpl<ForecastP
             wrapper.eq("station_code", stationCode);
             wrapper.eq("station_code", stationCode);
         }
         }
         if (time != null) {
         if (time != null) {
-            wrapper.eq("forecast_time", new Date(time));
+            wrapper.eq("time", new Date(time));
         }
         }
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         return baseMapper.selectOne(wrapper);
         return baseMapper.selectOne(wrapper);

+ 2 - 2
cpp-admin/src/main/java/com/cpp/web/service/station/impl/ForecastPowerShortTermStationServiceImpl.java

@@ -37,7 +37,7 @@ public class ForecastPowerShortTermStationServiceImpl extends ServiceImpl<Foreca
             wrapper.eq("forecast_manufactor", forecastManufactor);
             wrapper.eq("forecast_manufactor", forecastManufactor);
         }
         }
         if (pointEndTime != null) {
         if (pointEndTime != null) {
-            wrapper.eq("forecast_time", new Date(pointEndTime));
+            wrapper.eq("time", new Date(pointEndTime));
         }
         }
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         return baseMapper.selectOne(wrapper);
         return baseMapper.selectOne(wrapper);
@@ -53,7 +53,7 @@ public class ForecastPowerShortTermStationServiceImpl extends ServiceImpl<Foreca
             wrapper.eq("station_code", stationCode);
             wrapper.eq("station_code", stationCode);
         }
         }
         if (startTime != null && endTime != null) {
         if (startTime != null && endTime != null) {
-            wrapper.between("forecast_time", new Date(startTime), new Date(endTime));
+            wrapper.between("time", new Date(startTime), new Date(endTime));
         }
         }
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         return baseMapper.selectList(wrapper);
         return baseMapper.selectList(wrapper);

+ 2 - 2
cpp-admin/src/main/java/com/cpp/web/service/station/impl/ForecastPowerUltraShortTermRegulationServiceImpl.java

@@ -27,7 +27,7 @@ public class ForecastPowerUltraShortTermRegulationServiceImpl extends ServiceImp
             wrapper.eq("station_code", stationCode);
             wrapper.eq("station_code", stationCode);
         }
         }
         if (startTime != null && endTime != null) {
         if (startTime != null && endTime != null) {
-            wrapper.between("forecast_time", new Date(startTime), new Date(endTime));
+            wrapper.between("time", new Date(startTime), new Date(endTime));
         }
         }
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         return baseMapper.selectList(wrapper);
         return baseMapper.selectList(wrapper);
@@ -41,7 +41,7 @@ public class ForecastPowerUltraShortTermRegulationServiceImpl extends ServiceImp
             wrapper.eq("station_code", stationCode);
             wrapper.eq("station_code", stationCode);
         }
         }
         if (finalTime != null) {
         if (finalTime != null) {
-            wrapper.eq("forecast_time", new Date(finalTime));
+            wrapper.eq("time", new Date(finalTime));
         }
         }
         return baseMapper.selectList(wrapper);
         return baseMapper.selectList(wrapper);
     }
     }

+ 4 - 4
cpp-admin/src/main/java/com/cpp/web/service/station/impl/ForecastPowerUltraShortTermStationServiceImpl.java

@@ -25,7 +25,7 @@ public class ForecastPowerUltraShortTermStationServiceImpl extends ServiceImpl<F
             wrapper.eq("station_code", stationCode);
             wrapper.eq("station_code", stationCode);
         }
         }
         if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
         if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
-            wrapper.between("forecast_time", startTime, endTime);
+            wrapper.between("time", startTime, endTime);
         }
         }
         if (cdqPoint != null) {
         if (cdqPoint != null) {
             wrapper.eq("forecast_how_long_ago", cdqPoint);
             wrapper.eq("forecast_how_long_ago", cdqPoint);
@@ -44,7 +44,7 @@ public class ForecastPowerUltraShortTermStationServiceImpl extends ServiceImpl<F
             wrapper.eq("station_code", stationCode);
             wrapper.eq("station_code", stationCode);
         }
         }
         if (startTime != null && endTime != null) {
         if (startTime != null && endTime != null) {
-            wrapper.between("forecast_time", new Date(startTime), new Date(endTime));
+            wrapper.between("time", new Date(startTime), new Date(endTime));
         }
         }
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         wrapper.eq("forecast_how_long_ago", howLongAgo);
         return baseMapper.selectList(wrapper);
         return baseMapper.selectList(wrapper);
@@ -58,7 +58,7 @@ public class ForecastPowerUltraShortTermStationServiceImpl extends ServiceImpl<F
             wrapper.eq("station_code", stationCode);
             wrapper.eq("station_code", stationCode);
         }
         }
         if (finalTime != null) {
         if (finalTime != null) {
-            wrapper.eq("forecast_time", new Date(finalTime));
+            wrapper.eq("time", new Date(finalTime));
         }
         }
         return baseMapper.selectList(wrapper);
         return baseMapper.selectList(wrapper);
     }
     }
@@ -78,7 +78,7 @@ public class ForecastPowerUltraShortTermStationServiceImpl extends ServiceImpl<F
         QueryWrapper<ForecastPowerUltraShortTermStation> wrapper = new QueryWrapper<>();
         QueryWrapper<ForecastPowerUltraShortTermStation> wrapper = new QueryWrapper<>();
 
 
         if (startTime != null && endTime != null) {
         if (startTime != null && endTime != null) {
-            wrapper.between("forecast_time", startTime, endTime);
+            wrapper.between("time", startTime, endTime);
         }
         }
         return baseMapper.selectList(wrapper);
         return baseMapper.selectList(wrapper);
     }
     }

+ 2 - 2
cpp-admin/src/main/java/com/cpp/web/service/station/impl/PowerStationStatusDataServiceImpl.java

@@ -445,14 +445,14 @@ public class PowerStationStatusDataServiceImpl extends ServiceImpl<PowerStationS
 //        // 获取短期数据SYJY
 //        // 获取短期数据SYJY
 //        QueryWrapper<ForecastPowerShortTermCloud> wrapper = new QueryWrapper<>();
 //        QueryWrapper<ForecastPowerShortTermCloud> wrapper = new QueryWrapper<>();
 //        wrapper.eq("forecast_manufactor","SYJY");
 //        wrapper.eq("forecast_manufactor","SYJY");
-//        wrapper.between("forecast_time", startTime, endTime);
+//        wrapper.between("time", startTime, endTime);
 //        List<ForecastPowerShortTermCloud> forecastPowerShortTermCloudList = forecastPowerShortTermService.list(wrapper);
 //        List<ForecastPowerShortTermCloud> forecastPowerShortTermCloudList = forecastPowerShortTermService.list(wrapper);
 ////        Map<Long, List<ForecastPowerShortTermCloud>> shortGroupMap = forecastPowerShortTermCloudList.stream().collect(Collectors.groupingBy(s->s.getForecastTime().getTime()));
 ////        Map<Long, List<ForecastPowerShortTermCloud>> shortGroupMap = forecastPowerShortTermCloudList.stream().collect(Collectors.groupingBy(s->s.getForecastTime().getTime()));
 //
 //
 //        // 获取超短期数据SYJY
 //        // 获取超短期数据SYJY
 //        QueryWrapper<ForecastPowerUltraShortTermCloud> ultrawrapper = new QueryWrapper<>();
 //        QueryWrapper<ForecastPowerUltraShortTermCloud> ultrawrapper = new QueryWrapper<>();
 //        ultrawrapper.eq("forecast_manufactor","SYJY");
 //        ultrawrapper.eq("forecast_manufactor","SYJY");
-//        ultrawrapper.between("forecast_time", startTime, endTime);
+//        ultrawrapper.between("time", startTime, endTime);
 //        List<ForecastPowerUltraShortTermCloud> forecastPowerUltraShortTermCloudList = forecastPowerUltraShortTermService.list(ultrawrapper);
 //        List<ForecastPowerUltraShortTermCloud> forecastPowerUltraShortTermCloudList = forecastPowerUltraShortTermService.list(ultrawrapper);
 ////        Map<Long, List<ForecastPowerUltraShortTermCloud>> ultraGroupMap = forecastPowerUltraShortTermCloudList.stream().collect(Collectors.groupingBy(s->s.getForecastTime().getTime()));
 ////        Map<Long, List<ForecastPowerUltraShortTermCloud>> ultraGroupMap = forecastPowerUltraShortTermCloudList.stream().collect(Collectors.groupingBy(s->s.getForecastTime().getTime()));
 //
 //

+ 1 - 1
cpp-ui/src/views/largeScreen/index.vue

@@ -571,7 +571,7 @@ export default {
       let queryParams = {
       let queryParams = {
         currentPage: this.alarmConfPage.currentPage,
         currentPage: this.alarmConfPage.currentPage,
         pageSize: this.alarmConfPage.pageSize,
         pageSize: this.alarmConfPage.pageSize,
-        time: new Date().getTime()
+        time: this.expireTime
       }
       }
       this.innerVisible = true
       this.innerVisible = true
       this.$axios.get('/alarmConf/pageByExpireTime', {params: queryParams}).then(response => {
       this.$axios.get('/alarmConf/pageByExpireTime', {params: queryParams}).then(response => {