Sfoglia il codice sorgente

调整超短期代码

xusl 1 anno fa
parent
commit
96032a846a

+ 1 - 1
ipp-idp/src/main/java/com/jiayue/ipp/idp/job/ParsingJob.java

@@ -45,7 +45,7 @@ public class ParsingJob {
             if(parsingChannel.getUseStatus().name().equals("E1")){
                 switch (parsingChannel.getAnChannelType().name()){
                     case "E1":
-                        ftpService.ftp();
+                        ftpService.ftp(parsingChannel);
                         break;
                     case "E2":
 //                        downloadService.v3DataFilesDownload(parsingChannel);

+ 4 - 4
ipp-idp/src/main/java/com/jiayue/ipp/idp/service/an/FTPService.java

@@ -70,13 +70,13 @@ public class FTPService {
      * 备份并删除本地文件(备份文件应定时清理)
      * 解析成功并结束
      */
-    public void ftp() {
+    public void ftp(ParsingChannel ftpParsingChannel) {
 
-        List<ParsingChannel> ftpParsingChannels = parsingChannelService.list();
+//        List<ParsingChannel> ftpParsingChannels = parsingChannelService.list();
         List<ParsingUrl> ftpParsingUrls = parsingUrlService.list();
 
         //循环ftp解析通道
-        for (ParsingChannel ftpParsingChannel : ftpParsingChannels) {
+//        for (ParsingChannel ftpParsingChannel : ftpParsingChannels) {
 
             //创建ftp配置
             FtpConfig ftpConfig = new FtpConfig();
@@ -161,7 +161,7 @@ public class FTPService {
                     }
                 }
             }
-        }
+//        }
     }
 
     /**

+ 3 - 3
ipp-idp/src/main/java/com/jiayue/ipp/idp/service/impl/an/ParsingDqInfoServiceImpl.java

@@ -85,7 +85,7 @@ public class ParsingDqInfoServiceImpl extends ServiceImpl<ParsingDqInfoMapper, P
 
                             if (bigDecimals.size() > 0) {
 
-                                LocalDate genDate = parsingGenDate(parsingDqInfo.getGenDate(), fileContent);
+//                                LocalDate genDate = parsingGenDate(parsingDqInfo.getGenDate(), fileContent);
                                 Long forecastTime = parsingForecastTime(parsingDqInfo.getForecastTime(), fileContent);
                                 long secondDayTime = com.jiayue.ipp.idp.util.DateMomentUtil.getDayStartTime(System.currentTimeMillis())+1000*60*60*24;
                                 if (forecastTime==secondDayTime){
@@ -94,7 +94,7 @@ public class ParsingDqInfoServiceImpl extends ServiceImpl<ParsingDqInfoMapper, P
                                         for (BigDecimal bigDecimal : bigDecimals) {
                                             Date forecastDate = new Date(forecastTime);
                                             ForecastPowerShortTermHis forecastPowerShortTermHis = new ForecastPowerShortTermHis();
-                                            forecastPowerShortTermHis.setGenDate(genDate);
+                                            forecastPowerShortTermHis.setGenDate(new Date());
                                             forecastPowerShortTermHis.setStationCode(parsingUrl.getStationCode());
                                             forecastPowerShortTermHis.setAbleValue(bigDecimal);
                                             forecastPowerShortTermHis.setForecastTime(forecastDate);
@@ -106,7 +106,7 @@ public class ParsingDqInfoServiceImpl extends ServiceImpl<ParsingDqInfoMapper, P
                                             forecastPowerShortTerm.setForecastTime(forecastDate);
                                             forecastPowerShortTerm.setStationCode(parsingUrl.getStationCode());
                                             forecastPowerShortTerm.setFpValue(bigDecimal);
-                                            forecastPowerShortTerm.setGenDate(forecastDate);
+                                            forecastPowerShortTerm.setGenDate(new Date());
                                             forecastPowerShortTerm.setForecastManufactor(parsingUrl.getForecastManufactor());
                                             forecastPowerShortTermList.add(forecastPowerShortTerm);