2 Commits 5aa82cfb20 ... 8deefe691c

Tác giả SHA1 Thông báo Ngày
  zhangchenglong 8deefe691c 一体化云端: 2 tuần trước cách đây
  zhangchenglong dd81b6976b 一体化云端: 2 tuần trước cách đây

+ 2 - 1
in-cloud/src/main/java/com/jiayue/insu/incloud/pushdata/PushCommon.java

@@ -213,7 +213,7 @@ public class PushCommon {
             }
         }
 
-        String fileDateStr = DateUtil.format(DateUtil.beginOfDay(DateUtil.date()), "yyyyMMdd_HH:mm:ss");
+        String fileDateStr = DateUtil.format(DateUtil.beginOfDay(DateUtil.date()), "yyyy-MM-dd");
         String fileType = todayStr + File.separatorChar + "nwp";
         this.pushFileToSftp(record, vList, newFilePath, newFileName, templateName, station, fileType, companyCode, fileDateStr);
         return true;
@@ -238,6 +238,7 @@ public class PushCommon {
         velocityContext.put("date", fileDateStr);
         velocityContext.put("stationCode", station.getStationCode());
         velocityContext.put("stationName", station.getName());
+        velocityContext.put("signCode", station.getSignCode());
 
         File newFile;
         // 生成新文件

+ 4 - 2
in-cloud/src/main/java/com/jiayue/insu/incloud/pushdata/PushDataToSftp.java

@@ -67,9 +67,10 @@ public class PushDataToSftp implements IPushInitForecastData {
     public Boolean pushDQData(Station station) {
         Boolean result = false;
         String stationCode = station.getStationCode();
+        String signCode = station.getSignCode();
         String newFilePath = drFilePath + stationCode + File.separatorChar;
         String todayStr = DateUtil.format(DateUtil.date(), "yyyyMMdd");
-        String newFileName = "modeloutput-" + stationCode + "J001-" + todayStr + "AM.txt";
+        String newFileName = "modeloutput-" + signCode + "J001-" + todayStr + "AM.txt";
         String templateName = File.separatorChar + "vms" + File.separatorChar + "DR_DQ.vm";
         result = pushCommon.pushDQData(station, station.getInCode(), newFilePath, newFileName, templateName);
         return result;
@@ -79,9 +80,10 @@ public class PushDataToSftp implements IPushInitForecastData {
     public Boolean pushNWPData(Station station) {
         Boolean result = false;
         String stationCode = station.getStationCode();
+        String signCode = station.getSignCode();
         String newFilePath = drFilePath + stationCode + File.separatorChar;
         String todayStr = DateUtil.format(DateUtil.date(), "yyyyMMdd");
-        String newFileName = "modeloutput-" + stationCode + "J001-" + todayStr + "NWP.txt";
+        String newFileName = "modeloutput-" + signCode + "J001-" + todayStr + "NWP.txt";
         String templateName = File.separatorChar + "vms" + File.separatorChar + "DR_NWP.vm";
         result = pushCommon.pushNWPData(station, station.getInCode(), newFilePath, newFileName, templateName);
         return result;

+ 2 - 2
in-cloud/src/main/resources/vms/DR_DQ.vm

@@ -1,7 +1,7 @@
 <! Entity=modeloutput time='${date}' !>
-<modeloutput::DRF1623J001>
+<modeloutput::${signCode}J001>
 times	prepower	upper	lower
 #foreach( $dq in $vList )
 ${dq.forecastTime}	${dq.fpValue}	${dq.upper}	${dq.lower}
 #end
-</modeloutput::DRF1623J001>
+</modeloutput::${signCode}J001>

+ 2 - 3
in-cloud/src/main/resources/vms/DR_NWP.vm

@@ -1,7 +1,6 @@
-<! Entity=modeloutput time='${date}'!>
-<气象预测::${stationCode} date='${date}'>
+<气象预测::${signCode}J001 date='${date}'>
 farmId	scDate	scTime	preDate	preTime	t	rh	pressure	swr	lwr	senf	ws10	ws30	ws50	ws70	ws80	ws90	ws100	ws170	wd10	wd30	wd50	wd70	wd80	wd90	wd100	wd170
 #foreach( $nwp in $vList )
 ${nwp.farmId} ${nwp.scDate} ${nwp.scTime} ${nwp.preDate} ${nwp.preTime} ${nwp.t} ${nwp.rh} ${nwp.pressure} ${nwp.swr} ${nwp.lwr} ${nwp.senf} ${nwp.ws10} ${nwp.ws30} ${nwp.ws50} ${nwp.ws70} ${nwp.ws80} ${nwp.ws90} ${nwp.ws100} ${nwp.ws170} ${nwp.wd10} ${nwp.wd30} ${nwp.wd50} ${nwp.wd70} ${nwp.wd80} ${nwp.wd90} ${nwp.wd100} ${nwp.wd170}
 #end
-</气象预测::${stationName}>
+</气象预测::${signCode}J001>