فهرست منبع

修改录入场站及导入模版时间

wangb@gyee-china.com 1 سال پیش
والد
کامیت
06a8ddaf66

+ 9 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/update/TargetdataFristController.java

@@ -15,6 +15,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.util.Arrays;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 
@@ -78,10 +79,16 @@ public class TargetdataFristController {
     @ApiOperation(value = "获得导入模板")
     public void importTemplate(HttpServletResponse response) throws IOException {
         // 手动创建导出 demo
+        Date current = com.gyee.common.util.DateUtils.getCurrentDate();
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(current);
+        calendar.add(Calendar.DAY_OF_MONTH, -1);
+        Date previousDay = calendar.getTime();
+
         List<ProEconTargetdataFrist> list = Arrays.asList(
-                ProEconTargetdataFrist.builder().id("").name("风电").type("FD").rfdl(1.0).yfdl(2.0).nfdl(3.0).recordDate(DateUtils.truncate(new Date())).build(),
+                ProEconTargetdataFrist.builder().id("").name("风电").type("FD").rfdl(1.0).yfdl(2.0).nfdl(3.0).recordDate(DateUtils.truncate(previousDay)).build(),
 
-                ProEconTargetdataFrist.builder().id("").name("光伏").type("GF").rfdl(1.0).yfdl(2.0).nfdl(3.0).recordDate(DateUtils.truncate(new Date())).build()
+                ProEconTargetdataFrist.builder().id("").name("光伏").type("GF").rfdl(1.0).yfdl(2.0).nfdl(3.0).recordDate(DateUtils.truncate(previousDay)).build()
 
         );
 

+ 1 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/MonitorService.java

@@ -507,7 +507,7 @@ public class MonitorService {
 
             double gflr = 0.0;
             double fdlr = 0.0;
-            List<String> windpowerstationIds = Arrays.asList("MLJ_FDC", "GJY_FDC", "QYRG_GDC", "CZXY_GDC", "YQCX", "HJFA_GDC", "WXYX_GDC", "WXYL_GDC", "PSSX_GDC", "HGFD_GDC", "YX_GDC", "JK_GDC", "TZ_GDC", "YQ_GDC", "YLZ_GDC", "LHS_GDC", "FS_GDC", "ZK_FDC", "SY_GDC", "BHB_FDC", "HSM_FDC", "YTY_FDC", "BHB3_FDC", "JR_GDC", "PDL_FDC", "NJL_FDC", "YLZ_FDC", "YF_FDC", "PTZ_FDC", "XWT_FDC", "DJY_FDC", "HR_GDC", "YY_GDC", "PL_GDC", "TL_GDC", "YG_GDC");
+            List<String> windpowerstationIds = Arrays.asList("MLJ_FDC", "GJY_FDC", "QYRG_GDC", "CZXY_GDC", "YQCX_GDC", "HJFA_GDC", "WXYX_GDC", "WXYL_GDC", "PSSX_GDC", "HGFD_GDC", "YX_GDC", "JK_GDC", "TZ_GDC", "YQ_GDC", "LHS_GDC", "FS_GDC", "ZK_FDC", "SY_GDC", "BHB_FDC", "HSM_FDC", "YTY_FDC", "BHB3_FDC", "JR_GDC", "PDL_FDC", "NJL_FDC", "YLZ_FDC", "YF_FDC", "PTZ_FDC", "XWT_FDC", "DJY_FDC", "HR_GDC", "YY_GDC", "PL_GDC", "TL_GDC", "YG_GDC");
 
             List<ProEconTargetdata> qwt = new ArrayList<>();
 //            Date current = com.gyee.common.util.DateUtils.getCurrentDate();