xushili пре 1 година
родитељ
комит
3d23c510f6

+ 17 - 0
power-fitting-JN/src/main/java/com.gyee.power.fitting/common/config/MybatisPlusConfig.java

@@ -0,0 +1,17 @@
+package com.gyee.power.fitting.common.config;
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class MybatisPlusConfig {
+    /**
+     * 分页插件
+     */
+    @Bean
+    public PaginationInterceptor paginationInterceptor() {
+        return new PaginationInterceptor();
+    }
+}

+ 6 - 4
power-fitting-JN/src/main/java/com.gyee.power.fitting/dispersionanalysis/PhotovoltaicAnalysisTask.java

@@ -53,13 +53,13 @@ public class PhotovoltaicAnalysisTask {
     private GyeeConfig gyeeConfig;
 
     //秒 分 时 日 月 周
-    @Scheduled(cron = "0 38 1 * * ?")
+    @Scheduled(cron = "0 22 1 * * ?")
     public void doTask() {
         //获取逆变器
         QueryWrapper<ProBasicEquipment> eWrapper = new QueryWrapper<>();
         eWrapper.eq("spare1", "IN");
         List<ProBasicEquipment> eList = proBasicEquipmentService.list(eWrapper);
-        //场站、机型、逆变器们
+        //场站、机型、逆变器们  .filter(e->"SXJ_KGDL_YY_GDC_STA".equals(e.getWindpowerstationId()))
         Map<String, Map<String, List<ProBasicEquipment>>> equipmentMapMap = eList.stream().collect(Collectors.groupingBy(
                 ProBasicEquipment::getWindpowerstationId, Collectors.groupingBy(ProBasicEquipment::getModelId)));
 
@@ -137,13 +137,15 @@ public class PhotovoltaicAnalysisTask {
                     double dxfds = inverterAnalysis.calcEquivalentOperatingHours(rfdl, zjrl);
                     analysis.setEquivalentGeneratingTime(dxfds);
                     //有功功率
-                    List<TsDoubleData> ygglInfoList = remoteService.adapterfd().getHistorySnap(ygglPointMap.get(equipmentId), dateTime.getTime(), endTime.getTime(), 300);
+                    String s = ygglPointMap.get(equipmentId);
+                    List<TsDoubleData> ygglInfoList = remoteService.adaptergf().getHistorySnap(ygglPointMap.get(equipmentId), dateTime.getTime(), endTime.getTime(), 60);
                     //平均功率
                     double pjGl = ygglInfoList.stream().filter(i -> i.getDoubleValue() > 1).mapToDouble(TsDoubleData::getDoubleValue).average().orElse(0);
                     analysis.setAveragePower(pjGl);
 
                     //光照强度
-                    List<TsDoubleData> gzqdInfoList = remoteService.adapterfd().getHistorySnap(gzqdPointMap.get(equipmentId), dateTime.getTime(), endTime.getTime(), 300);
+                    String s1 = gzqdPointMap.get(equipmentId);
+                    List<TsDoubleData> gzqdInfoList = remoteService.adaptergf().getHistorySnap(gzqdPointMap.get(equipmentId), dateTime.getTime(), endTime.getTime(), 60);
                     double pjGzqd = gzqdInfoList.stream().filter(i -> i.getDoubleValue() > 1).mapToDouble(TsDoubleData::getDoubleValue).average().orElse(0);
 
                     //平均理论功率

+ 2 - 2
power-fitting-JN/src/main/resources/application.yaml

@@ -1,7 +1,7 @@
 gyee:
   # 实时适配器的url
-  adapterfd-url: http://10.81.3.160:8011
-  adaptergf-url: http://10.81.3.160:8012
+  adapterfd-url: http://10.81.3.162:8011
+  adaptergf-url: http://10.81.3.162:8012
   # 数据准备保存路径(原始数据)
   file-path-prepare: data/prepare/
   # 数据处理保存路径(处理后的数据)