2 次代碼提交 b5cb87c68a ... 0d9b69f285

作者 SHA1 備註 提交日期
  hlf 0d9b69f285 Merge branch 'master' of http://124.70.43.205:3000/wangb/runeconomy-nx 2 月之前
  xujuanning be0acc6b11 接口调试 2 月之前
共有 22 個文件被更改,包括 700 次插入240 次删除
  1. 5 5
      generationXK-service/pom.xml
  2. 76 63
      generationXK-service/src/main/java/com/gyee/generation/GenerationMain.java
  3. 139 13
      generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo1Service.java
  4. 49 12
      generationXK-service/src/main/java/com/gyee/generation/task/SaticSchedulePgTask.java
  5. 2 1
      generationXK-service/src/main/java/com/gyee/generation/util/realtimesource/EdosUtil.java
  6. 16 11
      generationXK-service/src/main/resources/application-nxf.yml
  7. 2 2
      generationXK-service/src/main/resources/xxl-job-executor3.properties
  8. 14 14
      generationXK-service/src/test/java/com/gyee/generation/SaticScheduleCALTaskTest.java
  9. 0 5
      pom.xml
  10. 21 0
      runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/ProBasicEquipmentController.java
  11. 1 1
      runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/bmk/BenchmarkingController.java
  12. 40 0
      runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/homepage/EconomyHomePageController.java
  13. 3 3
      runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/performance/PerformanceCurvefittingController.java
  14. 27 28
      runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/specific/SpecificController.java
  15. 3 0
      runeconomy-xk/src/main/java/com/gyee/runeconomy/service/Electricity/Electricityservice.java
  16. 2 0
      runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProBasicEquipmentService.java
  17. 16 1
      runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProBasicEquipmentServiceImpl.java
  18. 155 1
      runeconomy-xk/src/main/java/com/gyee/runeconomy/service/homepage/EconomyPointHomePageService.java
  19. 48 48
      runeconomy-xk/src/main/java/com/gyee/runeconomy/service/specific/SpecificService.java
  20. 61 18
      runeconomy-xk/src/main/java/com/gyee/runeconomy/util/realtimesource/EdosUtil.java
  21. 16 10
      runeconomy-xk/src/main/java/com/gyee/runeconomy/util/realtimesource/timeseries/JsonObjectHelper.java
  22. 4 4
      runeconomy-xk/src/main/resources/application-nxf.yml

+ 5 - 5
generationXK-service/pom.xml

@@ -136,11 +136,11 @@
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-test</artifactId>
-            <scope>test</scope>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>org.springframework</groupId>-->
+<!--            <artifactId>spring-test</artifactId>-->
+<!--            <scope>test</scope>-->
+<!--        </dependency>-->
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-test</artifactId>

+ 76 - 63
generationXK-service/src/main/java/com/gyee/generation/GenerationMain.java

@@ -1,12 +1,17 @@
 package com.gyee.generation;
 
-import com.gyee.generation.service.ReCalSevice;
+import com.gyee.generation.service.*;
 import com.gyee.generation.util.SpringUtils;
 import org.mybatis.spring.annotation.MapperScan;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 
+import java.text.SimpleDateFormat;
 import java.util.Calendar;
+import java.util.Date;
+import java.util.concurrent.TimeUnit;
 
 /**
  * @ClassName : GenerationMain
@@ -25,60 +30,68 @@ public class GenerationMain {
         System.out.println("启动完成");
 
         //        /*************************风机历史计算服务**************************/
-        //        Calendar c = Calendar.getInstance();
-        //        Logger logger = LoggerFactory.getLogger(GenerationMain.class);
-        //
-        //        while (true) {
-        //
-        //            Date begin = new Date();
-        //            Date end = null;
-        //            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        //            logger.info(df.format(c.getTime()).toString());
-        //
-        //
-        //            EquipmentInfo1Service equipmentInfo1Service = SpringUtils.getBean("equipmentInfo1Service");
-        //            EquipmentInfo2Service equipmentInfo2Service = SpringUtils.getBean("equipmentInfo2Service");
-        //            EquipmentInfo3Service equipmentInfo3Service = SpringUtils.getBean("equipmentInfo3Service");
-        //
-        //
-        //            equipmentInfo1Service.calEquipmentInfoDay(begin);
-        //            logger.info("equipmentInfo1Service完成一次!。。。。。。");
-        //            TimeUnit.SECONDS.sleep(3);
-        //            equipmentInfo2Service.calEquipmentInfoDay(begin);
-        //            logger.info("equipmentInfo2Service完成一次!。。。。。。");
-        //            TimeUnit.SECONDS.sleep(3);
-        //            equipmentInfo3Service.calEquipmentInfoDay(begin);
-        //            logger.info("equipmentInfo3Service完成一次!。。。。。。");
-        //            TimeUnit.SECONDS.sleep(3);
-        //            logger.info("equipmentInfo5Service开始!。。。。。。");
-        //            EquipmentInfo5Service equipmentInfo5Service = SpringUtils.getBean("equipmentInfo5Service");
-        //            TimeUnit.SECONDS.sleep(3);
-        //            EquipmentInfo4Service equipmentInfo4Service = SpringUtils.getBean("equipmentInfo4Service");
-        //            TimeUnit.SECONDS.sleep(3);
-        //            equipmentInfo5Service.calEquipmentInfoDay(begin);
-        //            logger.info("equipmentInfo5Service完成一次!。。。。。。");
-        //            logger.info("equipmentInfo4Service开始!。。。。。。");
-        //            equipmentInfo4Service.calEquipmentInfoDay(begin);
-        //            logger.info("equipmentInfo4Service完成一次!。。。。。。");
-        //
-        //            WtAlysisDayService wtAlysisDayService = SpringUtils.getBean("wtAlysisDayService");
-        //
-        //            EquipmentInfoDayTopService equipmentInfoDayTopService = SpringUtils.getBean("equipmentInfoDayTopService");
-        //            equipmentInfoDayTopService.calEquipmentInfoDayTop(begin);
-        //            equipmentInfoDayTopService.calEquipmentInfoMonthTop(begin);
-        //            equipmentInfoDayTopService.calEquipmentInfoYearTop(begin);
-        //
-        //            TimeUnit.SECONDS.sleep(3);
-        //            logger.info("wtAlysisyService开始!。。。。。。");
-        //            wtAlysisDayService.calEquipmentInfoDay(begin);
-        //            logger.info("wtAlysisyService完成!。。。。。。");
-        //            end = new Date();
-        //            logger.info(df.format(end).toString());
-        //            logger.info("完成一次!。。。。。。");
-        //            logger.info("执行用时" + com.gyee.generation.util.DateUtils.secondsDiff(begin, end) + "秒");
-        //
-        //            TimeUnit.MINUTES.sleep(15);
-        //        }
+        Calendar c1 = Calendar.getInstance();
+
+        c1.add(Calendar.DAY_OF_MONTH, -1);
+        ReCalSevice reCalSevice = SpringUtils.getBean("reCalSevice");
+
+        Calendar c = Calendar.getInstance();
+        Logger logger = LoggerFactory.getLogger(GenerationMain.class);
+
+        //        //重算风机
+        reCalSevice.calWt(c.getTime());
+
+                while (true) {
+
+                    Date begin = new Date();
+                    Date end = null;
+                    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                    logger.info(df.format(c.getTime()).toString());
+
+
+                    EquipmentInfo1Service equipmentInfo1Service = SpringUtils.getBean("equipmentInfo1Service");
+                    EquipmentInfo2Service equipmentInfo2Service = SpringUtils.getBean("equipmentInfo2Service");
+                    EquipmentInfo3Service equipmentInfo3Service = SpringUtils.getBean("equipmentInfo3Service");
+
+
+                    equipmentInfo1Service.calEquipmentInfoDay(begin);
+                    logger.info("equipmentInfo1Service完成一次!。。。。。。");
+                    TimeUnit.SECONDS.sleep(3);
+                    equipmentInfo2Service.calEquipmentInfoDay(begin);
+                    logger.info("equipmentInfo2Service完成一次!。。。。。。");
+                    TimeUnit.SECONDS.sleep(3);
+                    equipmentInfo3Service.calEquipmentInfoDay(begin);
+                    logger.info("equipmentInfo3Service完成一次!。。。。。。");
+                    TimeUnit.SECONDS.sleep(3);
+                    logger.info("equipmentInfo5Service开始!。。。。。。");
+                    EquipmentInfo5Service equipmentInfo5Service = SpringUtils.getBean("equipmentInfo5Service");
+                    TimeUnit.SECONDS.sleep(3);
+                    EquipmentInfo4Service equipmentInfo4Service = SpringUtils.getBean("equipmentInfo4Service");
+                    TimeUnit.SECONDS.sleep(3);
+                    equipmentInfo5Service.calEquipmentInfoDay(begin);
+                    logger.info("equipmentInfo5Service完成一次!。。。。。。");
+                    logger.info("equipmentInfo4Service开始!。。。。。。");
+                    equipmentInfo4Service.calEquipmentInfoDay(begin);
+                    logger.info("equipmentInfo4Service完成一次!。。。。。。");
+
+                    WtAlysisDayService wtAlysisDayService = SpringUtils.getBean("wtAlysisDayService");
+
+                    EquipmentInfoDayTopService equipmentInfoDayTopService = SpringUtils.getBean("equipmentInfoDayTopService");
+                    equipmentInfoDayTopService.calEquipmentInfoDayTop(begin);
+                    equipmentInfoDayTopService.calEquipmentInfoMonthTop(begin);
+                    equipmentInfoDayTopService.calEquipmentInfoYearTop(begin);
+
+                    TimeUnit.SECONDS.sleep(3);
+                    logger.info("wtAlysisyService开始!。。。。。。");
+                    wtAlysisDayService.calEquipmentInfoDay(begin);
+                    logger.info("wtAlysisyService完成!。。。。。。");
+                    end = new Date();
+                    logger.info(df.format(end).toString());
+                    logger.info("完成一次!。。。。。。");
+                    logger.info("执行用时" + com.gyee.generation.util.DateUtils.secondsDiff(begin, end) + "秒");
+
+                    TimeUnit.MINUTES.sleep(15);
+                }
         //
         //        /*************************风机历史计算服务**************************/
         //
@@ -195,15 +208,15 @@ public class GenerationMain {
 
 
         /*************************重算设备历史数据**************************/
-        Calendar c = Calendar.getInstance();
-
-
-        c.add(Calendar.DAY_OF_MONTH, -1);
-        ReCalSevice reCalSevice = SpringUtils.getBean("reCalSevice");
-        //        //重算风机
-        //        reCalSevice.calWt(c.getTime());
+//        Calendar c = Calendar.getInstance();
+//
+//
+//        c.add(Calendar.DAY_OF_MONTH, -1);
+//        ReCalSevice reCalSevice = SpringUtils.getBean("reCalSevice");
+//        //        //重算风机
+//                reCalSevice.calWt(c.getTime());
         //重算逆变器
-        reCalSevice.calIn(c.getTime());
+//        reCalSevice.calIn(c.getTime());
 
 
         /*************************重算设备历史数据**************************/

+ 139 - 13
generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo1Service.java

@@ -8,23 +8,23 @@ import com.gyee.generation.model.auto.*;
 import com.gyee.generation.model.vo.CompanyType;
 import com.gyee.generation.model.vo.Location;
 import com.gyee.generation.model.vo.WpType;
-import com.gyee.generation.service.auto.IProEconAnalysisSubtableBottomService;
-import com.gyee.generation.service.auto.IProEconEquipmentInfoDay1Service;
-import com.gyee.generation.service.auto.IProEconPowerstationInfoDay1Service;
+import com.gyee.generation.service.auto.*;
 import com.gyee.generation.util.DateUtils;
 import com.gyee.generation.util.realtimesource.IEdosUtil;
 import com.gyee.generation.util.statisticcs.Initial;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.ApplicationArguments;
 import org.springframework.boot.ApplicationRunner;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
-import java.time.Instant;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.ZoneId;
+import java.time.*;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -33,10 +33,13 @@ public class WindPowerInfo1Service {
 //    @Override
 //    public void run(ApplicationArguments args) throws Exception {
 //        Date date = new Date();
-//        writegf(date);
+////        writeGf(date);
+//        writeReport1(date);
+//        writeReport2(date);
+//        writeReport3(date);
 //    }
 
-    //    private static final Logger logger = LoggerFactory.getLogger(WindPowerInfo1Service.class);
+    private static final Logger logger = LoggerFactory.getLogger(WindPowerInfo1Service.class);
     @Resource
     private IEdosUtil edosUtil;
 
@@ -49,9 +52,28 @@ public class WindPowerInfo1Service {
     @Value("${ndgfzb.gf}")
     private String gf;
 
+
+    @Value("${report.info1}")
+    private String repInfo1;
+
+    @Value("${report.info2}")
+    private String repInfo2;
+
+
     @Resource
     private IProEconAnalysisSubtableBottomService iProEconAnalysisSubtableBottomService;
 
+    @Resource
+    private IStationInfoHourService stationInfoHourService;
+
+
+    @Resource
+    private IProBaseBackfillService iProBaseBackfillService;
+
+
+    @Resource
+    private IProEconEquipmentInfoJsService iProEconEquipmentInfoJsService;
+
 
     /**
      * 计算区域日信息
@@ -1261,7 +1283,7 @@ public class WindPowerInfo1Service {
     }
 
 
-    public void writegf(Date date) throws Exception {
+    public void writeGf(Date date) throws Exception {
         LocalDate localDate = LocalDateTime.now().toLocalDate();
         String[] split = gf.split(",");
         List<String> str = new ArrayList<>(Arrays.asList(split));
@@ -1280,9 +1302,11 @@ public class WindPowerInfo1Service {
                     pb.setWpid("GJNY_NXGS_SGB_GDC_STA");
                 } else if ("霞光储能电站".equals(split1[2]) || "宁东32光伏场站".equals(split1[2])) {
                     pb.setWpid("GJNY_NXGS_XGB_GDC_STA");
-                } else if ("电度表".equals(split1[3]) ) {
+                } else if ("电度表".equals(split1[3])) {
                     pb.setWpid("NX_FGS_HA_FDC_STA");
-                }else {
+                } else if ("区域集控".equals(split1[0]) && "惠安风场".equals(split1[1])) {
+                    pb.setWpid("NX_FGS_HA_FDC_STA");
+                } else {
                     pb.setWpid("GJNY_NXGS_QZB_GDC_STA");
                 }
                 pb.setMeterId(real.getPointName());
@@ -1308,7 +1332,109 @@ public class WindPowerInfo1Service {
                 }
             }
         }
-        boolean b = iProEconAnalysisSubtableBottomService.batchAdd(ls);
+        try {
+            boolean b = iProEconAnalysisSubtableBottomService.batchAdd(ls);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+
+
+    public void writeReport1(Date date) throws Exception {
+        String[] split = repInfo1.split(",");
+        List<String> ls = new ArrayList<>(Arrays.asList(split));
+        LocalDateTime currentTime = LocalDateTime.now();
+        LocalDateTime modifiedTime = currentTime
+                .withMinute(0)
+                .withSecond(0)
+                .withNano(0);
+        List<PointData> realData = edosUtil.getRealData(ls);
+        if (null == realData || realData.isEmpty()) {
+            return;
+        }
+        List<StationInfoHour> shs = new ArrayList<>();
+        for (PointData realDa : realData) {
+            StationInfoHour sh = new StationInfoHour();
+            sh.setRecordDate(modifiedTime);
+            sh.setWpid("NX_FGS_HA_FDC_STA");
+            sh.setMeterId(realDa.getPointName());
+            sh.setMeterName(realDa.getPointName());
+            sh.setCode(BigDecimal.valueOf(realDa.getPointValueInDouble()));
+            sh.setCodeModify(BigDecimal.valueOf(realDa.getPointValueInDouble()));
+            shs.add(sh);
+        }
+        try {
+            boolean b = stationInfoHourService.saveBatch(shs);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+
+    public void writeReport2(Date date) throws Exception {
+        String[] split = repInfo2.split(",");
+        List<String> ls = new ArrayList<>(Arrays.asList(split));
+        LocalDateTime currentTime = LocalDateTime.now();
+        LocalDateTime modifiedTime = currentTime
+                .withMinute(0)
+                .withSecond(0)
+                .withNano(0);
+        List<PointData> realData = edosUtil.getRealData(ls);
+        if (null == realData || realData.isEmpty()) {
+            return;
+        }
+        List<StationInfoHour> shs = new ArrayList<>();
+        for (PointData realDa : realData) {
+            StationInfoHour sh = new StationInfoHour();
+            sh.setRecordDate(modifiedTime);
+            sh.setWpid("NX_FGS_HA_FDC_STA");
+            sh.setMeterId(realDa.getPointName());
+            sh.setMeterName(realDa.getPointName());
+            sh.setCode(BigDecimal.valueOf(realDa.getPointValueInDouble()));
+            sh.setCodeModify(BigDecimal.valueOf(realDa.getPointValueInDouble()));
+            shs.add(sh);
+        }
+        try {
+            boolean b = stationInfoHourService.saveBatch(shs);
+            System.out.println(b);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+
+
+    public void writeReport3(Date date) throws Exception {
+        QueryWrapper<ProBaseBackfill> qw = new QueryWrapper<>();
+        qw.lambda().eq(ProBaseBackfill::getType, "AI0001");
+        List<ProBaseBackfill> backfills = iProBaseBackfillService.list(qw);
+        List<ProEconEquipmentInfoJs> jss = new ArrayList<>();
+        LocalDate now = LocalDate.now();
+        QueryWrapper<ProEconEquipmentInfoJs> qw2 = new QueryWrapper<>();
+        qw2.lambda().eq(ProEconEquipmentInfoJs::getRecordDate, now);
+        List<ProEconEquipmentInfoJs> projss = iProEconEquipmentInfoJsService.list(qw2);
+        if (null != projss && !projss.isEmpty()) {
+            List<String> meter = projss.stream().map(ProEconEquipmentInfoJs::getMeterId).collect(Collectors.toList());
+            backfills = backfills.stream().filter(bf -> !meter.contains(bf.getCode())).collect(Collectors.toList());
+        }
+        if (null == backfills || backfills.isEmpty()) {
+            return;
+        }
+        for (ProBaseBackfill backfill : backfills) {
+            ProEconEquipmentInfoJs js = new ProEconEquipmentInfoJs();
+            js.setRecordDate(now);
+            js.setWpid(backfill.getStation());
+            js.setMeterId(backfill.getCode());
+            js.setMeterName(backfill.getCode());
+            jss.add(js);
+        }
+        try {
+            boolean b = iProEconEquipmentInfoJsService.saveBatch(jss);
+            System.out.println(b);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
 
     }
 

+ 49 - 12
generationXK-service/src/main/java/com/gyee/generation/task/SaticSchedulePgTask.java

@@ -747,18 +747,6 @@ public class SaticSchedulePgTask {
 
 
     /**
-     * 光伏数据写入
-     */
-    @XxlJob("ndgfzb")
-    public void ndgfzb() throws Exception {
-
-        Date date = new Date();
-        windPowerInfo1Service.writegf(date);
-
-    }
-
-
-    /**
      * 场站2表
      * 15分钟只执行一次
      */
@@ -1744,4 +1732,53 @@ public class SaticSchedulePgTask {
     //        }
     //        XxlJobHelper.log("日照强度替换计算执行开始!........");
     //    }
+
+
+
+
+    /**
+     * 光伏数据写入
+     */
+    @XxlJob("ndgfzb")
+    public void ndgfzb() throws Exception {
+
+        Date date = new Date();
+        windPowerInfo1Service.writeGf(date);
+
+    }
+
+    /**
+     * 一/二期风机运行参数
+     */
+    @XxlJob("report_info1")
+    public void reportInfo1() throws Exception {
+
+        Date date = new Date();
+        windPowerInfo1Service.writeReport1(date);
+
+    }
+
+    /**
+     * 风电场设备运行参数
+     */
+    @XxlJob("report_info2")
+    public void reportInfo2() throws Exception {
+
+        Date date = new Date();
+        windPowerInfo1Service.writeReport2(date);
+
+    }
+
+
+    /**
+     * 风电场设备运行参数
+     */
+    @XxlJob("report_info3")
+    public void reportInfo3() throws Exception {
+
+        Date date = new Date();
+        windPowerInfo1Service.writeReport3(date);
+
+    }
+
 }

+ 2 - 1
generationXK-service/src/main/java/com/gyee/generation/util/realtimesource/EdosUtil.java

@@ -763,7 +763,8 @@ public class EdosUtil implements IEdosUtil {
 //            }
 //            ResponseEntity<JSONObject> resp = restTemplate.getForEntity(url, JSONObject.class);
             JSONObject jsonObject = resp.getBody();
-            if (jsonObject != null) {
+
+            if (jsonObject != null&&!jsonObject.isEmpty()) {
                 //对结果进行有序返回
                 int len = pointids.size();
                 List<PointData> result = new ArrayList<>();

文件差異過大導致無法顯示
+ 16 - 11
generationXK-service/src/main/resources/application-nxf.yml


+ 2 - 2
generationXK-service/src/main/resources/xxl-job-executor3.properties

@@ -1,5 +1,5 @@
 ### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-#xxl.job.admin.addresses=http://localhost:8175/xxl-job-admin
+#xxl.job.admin.addresses=http://localhost:8275/xxl-job-admin
 #xxl.job.admin.addresses=http://10.81.3.152:8175/xxl-job-admin
 xxl.job.admin.addresses=http://10.220.1.8:8175/xxl-job-admin
 ### xxl-job, access token
@@ -14,7 +14,7 @@ xxl.job.executor.address=
 ### xxl-job executor server-info
 xxl.job.executor.ip=
 #³¡Õ¾¶Ë¿Ú
-xxl.job.executor.port=8175
+xxl.job.executor.port=8275
 #ÇøÓò¶Ë¿Ú
 #xxl.job.executor.port=9202
 ### xxl-job executor log-path

+ 14 - 14
generationXK-service/src/test/java/com/gyee/generation/SaticScheduleCALTaskTest.java

@@ -50,21 +50,21 @@ public class SaticScheduleCALTaskTest {
 
     @Test
     public void all() throws Exception {
-        //saticScheduleCALTask.status_powerRationing();
-        //saticScheduleCALTask.status_powerRationing();//status_middleStatusReal
-        //saticScheduleCALTask.status_statusReal();
-        //saticScheduleCALTask.calculate_powerRationing();
-        //saticScheduleCALTask.calculateStatusNumber();
-
-        //saticSchedulePgTask.shutdown_All_STA();
-
-        //saticScheduleCALTask.theoreticalPower_CAL();
-        //saticScheduleCALTask.realtime_CAL();
-        //saticScheduleCALTask.realtime_Wp_CAL();
-        //saticScheduleCALTask.electricityMetering_CAL();
+//        saticScheduleCALTask.status_powerRationing();
+//        saticScheduleCALTask.status_powerRationing();//status_middleStatusReal
+//        saticScheduleCALTask.status_statusReal();
+//        saticScheduleCALTask.calculate_powerRationing();
+//        saticScheduleCALTask.calculateStatusNumber();
+//
+////        saticSchedulePgTask.shutdown_All_STA();
+//
+//        saticScheduleCALTask.theoreticalPower_CAL();
+//        saticScheduleCALTask.realtime_CAL();
+//        saticScheduleCALTask.realtime_Wp_CAL();
+//        saticScheduleCALTask.electricityMetering_CAL();
 
         //saticScheduleCALTask.accessStatus_CAL();
-        //saticScheduleCALTask.cycleCalculation_CAL();
+        saticScheduleCALTask.cycleCalculation_CAL();
 
 
         //saticSchedulePgTask.inputOrOutPutSpeed_PG();
@@ -74,7 +74,7 @@ public class SaticScheduleCALTaskTest {
         //saticSchedulePgTask.wtwindDayInfo_PG();
         //saticSchedulePgTask.wpwindDayInfo_PG();
 
-        //saticSchedulePgTask.equipment_PowerInfo1_PG();
+//        saticSchedulePgTask.equipment_PowerInfo1_PG();
         //saticSchedulePgTask.equipment_PowerInfo2_PG();
         //saticSchedulePgTask.equipment_PowerInfo3_PG();
         //saticSchedulePgTask.equipment_PowerInfo5_PG();

+ 0 - 5
pom.xml

@@ -112,11 +112,6 @@
                 <artifactId>tomcat-embed-websocket</artifactId>
                 <version>${tomcat.version}</version>
             </dependency>
-            <dependency>
-                <groupId>org.apache.tomcat.embed</groupId>
-                <artifactId>tomcat-embed-websocket</artifactId>
-                <version>${tomcat.version}</version>
-            </dependency>
 
         </dependencies>
     </dependencyManagement>

+ 21 - 0
runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/ProBasicEquipmentController.java

@@ -77,4 +77,25 @@ public class ProBasicEquipmentController {
         }
     }
 
+    /**
+     * 多条件获取设备列表
+     *
+     * @param wpid
+     * @return
+     */
+    @GetMapping("equipmentsByWpid2")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R getWtPowerCurveFittingList2(
+            @RequestParam(value = "wpid", required = false) String wpid) {
+
+        List<ProBasicEquipment> list = proBasicEquipmentService.getProBasicEquipmentList2(wpid);
+
+        if (null != list) {
+            return R.data(ResultMsg.ok(list));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
 }

+ 1 - 1
runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/bmk/BenchmarkingController.java

@@ -57,7 +57,7 @@ public class BenchmarkingController {
 
     @GetMapping(value = "/wpByCplist")
     @ApiOperation(value = "场站列表", notes = "场站列表")
-    public R wpByCplist(@RequestParam(value = "companyids", required = true) String companyids,
+    public R wpByCplist(@RequestParam(value = "companyids") String companyids,
                         @RequestParam(value = "type", required = false) String type) {
 
         List<ProBasicPowerstation> resultList = benchmarkingService.wpByCplist(companyids, type);

+ 40 - 0
runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/homepage/EconomyHomePageController.java

@@ -63,6 +63,30 @@ public class EconomyHomePageController {
     }
 
 
+
+    /**
+     * 经济运行首页指标
+     */
+    @GetMapping(value = "/home-page2")
+    @ApiOperation(value = "经济运行-首页", notes = "经济运行-首页")
+    public R getEconomyPointHomePageInfo2(@RequestParam(value = "regionId", required = false) String regionId,
+                                         @RequestParam(value = "companyId", required = false) String companyId,
+                                         @RequestParam(value = "foreignKeyId") String foreignKeyId,
+                                         @RequestParam(value = "staType") String staType,
+                                         @RequestParam(value = "dateType") String dateType,
+                                         @RequestParam(value = "pointCode", required = false) String pointCode
+
+    ) throws Exception {
+
+        Map<String, Object> map = economyPointHomePageService.getEconomyPointHomePageInfo2(foreignKeyId, regionId, companyId, staType, dateType, pointCode);
+        if (null != map) {
+            return R.data(ResultMsg.ok(map));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
+
     /**
      * 首页指标排行
      *
@@ -93,4 +117,20 @@ public class EconomyHomePageController {
     }
 
 
+    /**
+     * 首页 发电量
+     */
+    @GetMapping(value = "/generating-capacity")
+    @ApiOperation(value = "首页-发电量", notes = "首页-发电量")
+    public R getHomeGeneratingCapacity(@RequestParam(value = "companyId", required = false) String companyId) throws Exception {
+
+        Map<String, Object> map = economyPointHomePageService.getGeneratingCapacity(companyId);
+        if (null != map) {
+            return R.data(ResultMsg.ok(map));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
+
 }

+ 3 - 3
runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/performance/PerformanceCurvefittingController.java

@@ -40,9 +40,9 @@ public class PerformanceCurvefittingController {
     @GetMapping("/curvefitting")
     @ResponseBody
     @CrossOrigin(origins = "*", maxAge = 3600)
-    public R curvefittinglist(@RequestParam(value = "windturbineIds", required = true) String windturbineIds,
-                              @RequestParam(value = "type", required = true) String type,
-                              @RequestParam(value = "dateType", required = true) String dateType
+    public R curvefittinglist(@RequestParam(value = "windturbineIds") String windturbineIds,
+                              @RequestParam(value = "type") String type,
+                              @RequestParam(value = "dateType") String dateType
     ) {
         Map<String, List<CurveVo>> curvefitting = null;
         try {

+ 27 - 28
runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/specific/SpecificController.java

@@ -78,10 +78,9 @@ public class SpecificController {
     @GetMapping("/fnlylList")
     @ResponseBody
     @ApiOperation(value = "专题分析-风能利用率", notes = "专题分析-风能利用率")
-    public R fnlylList(@RequestParam(value = "companys", required = true) String companys,
-                       @RequestParam(value = "type", required = true) String type,
-                       @RequestParam(value = "year", required = true) String year) throws ParseException {
-
+    public R fnlylList(@RequestParam(value = "companys") String companys,
+                       @RequestParam(value = "type") String type,
+                       @RequestParam(value = "year") String year) throws ParseException {
         List<SpecificTarget> resultList = specificService.fnlylList(companys, type, year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
@@ -98,9 +97,9 @@ public class SpecificController {
     @GetMapping("/fdlList")
     @ResponseBody
     @ApiOperation(value = "专题分析-发电量", notes = "专题分析-发电量")
-    public R fdlList(@RequestParam(value = "companys", required = true) String companys,
-                     @RequestParam(value = "type", required = true) String type,
-                     @RequestParam(value = "year", required = true) String year) throws ParseException {
+    public R fdlList(@RequestParam(value = "companys") String companys,
+                     @RequestParam(value = "type") String type,
+                     @RequestParam(value = "year") String year) throws ParseException {
 
         List<SpecificTarget> resultList = specificService.fdlList(companys, type, year);
         if (StringUtils.isNotNull(resultList)) {
@@ -118,9 +117,9 @@ public class SpecificController {
     @GetMapping("/zhcydlList")
     @ResponseBody
     @ApiOperation(value = "专题分析-综合厂用电量", notes = "专题分析-综合厂用电量")
-    public R zhcydlList(@RequestParam(value = "companys", required = true) String companys,
-                        @RequestParam(value = "type", required = true) String type,
-                        @RequestParam(value = "year", required = true) String year) throws ParseException {
+    public R zhcydlList(@RequestParam(value = "companys") String companys,
+                        @RequestParam(value = "type") String type,
+                        @RequestParam(value = "year") String year) throws ParseException {
 
         List<SpecificTarget> resultList = specificService.zhcydlList(companys, type, year);
         if (StringUtils.isNotNull(resultList)) {
@@ -138,9 +137,9 @@ public class SpecificController {
     @GetMapping("/gwdlList")
     @ResponseBody
     @ApiOperation(value = "专题分析-购网电量", notes = "专题分析-购网电量")
-    public R gwdldlList(@RequestParam(value = "companys", required = true) String companys,
-                        @RequestParam(value = "type", required = true) String type,
-                        @RequestParam(value = "year", required = true) String year) throws ParseException {
+    public R gwdldlList(@RequestParam(value = "companys") String companys,
+                        @RequestParam(value = "type") String type,
+                        @RequestParam(value = "year") String year) throws ParseException {
 
         List<SpecificTarget> resultList = specificService.gwdlList(companys, type, year);
         if (StringUtils.isNotNull(resultList)) {
@@ -159,9 +158,9 @@ public class SpecificController {
     @GetMapping("/swdlList")
     @ResponseBody
     @ApiOperation(value = "专题分析-购网电量", notes = "专题分析-购网电量")
-    public R swdldlList(@RequestParam(value = "companys", required = true) String companys,
-                        @RequestParam(value = "type", required = true) String type,
-                        @RequestParam(value = "year", required = true) String year) throws ParseException {
+    public R swdldlList(@RequestParam(value = "companys") String companys,
+                        @RequestParam(value = "type") String type,
+                        @RequestParam(value = "year") String year) throws ParseException {
 
         List<SpecificTarget> resultList = specificService.swdlList(companys, type, year);
         if (StringUtils.isNotNull(resultList)) {
@@ -180,9 +179,9 @@ public class SpecificController {
     @GetMapping("/lyxsList")
     @ResponseBody
     @ApiOperation(value = "专题分析-利用小时", notes = "专题分析-利用小时")
-    public R lyxsList(@RequestParam(value = "companys", required = true) String companys,
-                      @RequestParam(value = "type", required = true) String type,
-                      @RequestParam(value = "year", required = true) String year) throws ParseException {
+    public R lyxsList(@RequestParam(value = "companys") String companys,
+                      @RequestParam(value = "type") String type,
+                      @RequestParam(value = "year") String year) throws ParseException {
 
         List<SpecificTarget> resultList = specificService.lyxsList(companys, type, year);
         if (StringUtils.isNotNull(resultList)) {
@@ -200,9 +199,9 @@ public class SpecificController {
     @GetMapping("/gzsslList")
     @ResponseBody
     @ApiOperation(value = "专题分析-故障损失率", notes = "专题分析-故障损失率")
-    public R gzsslList(@RequestParam(value = "companys", required = true) String companys,
-                       @RequestParam(value = "type", required = true) String type,
-                       @RequestParam(value = "year", required = true) String year) throws ParseException {
+    public R gzsslList(@RequestParam(value = "companys") String companys,
+                       @RequestParam(value = "type") String type,
+                       @RequestParam(value = "year") String year) throws ParseException {
 
         List<SpecificTarget> resultList = specificService.gzsslList(companys, type, year);
         if (StringUtils.isNotNull(resultList)) {
@@ -220,9 +219,9 @@ public class SpecificController {
     @GetMapping("/whsslList")
     @ResponseBody
     @ApiOperation(value = "专题分析-维护损失率", notes = "专题分析-维护损失率")
-    public R whsslList(@RequestParam(value = "companys", required = true) String companys,
-                       @RequestParam(value = "type", required = true) String type,
-                       @RequestParam(value = "year", required = true) String year) throws ParseException {
+    public R whsslList(@RequestParam(value = "companys") String companys,
+                       @RequestParam(value = "type") String type,
+                       @RequestParam(value = "year") String year) throws ParseException {
 
         List<SpecificTarget> resultList = specificService.whsslList(companys, type, year);
         if (StringUtils.isNotNull(resultList)) {
@@ -420,9 +419,9 @@ public class SpecificController {
     @GetMapping("/mtbfList")
     @ResponseBody
     @ApiOperation(value = "专题分析-MTBF分析", notes = "专题分析-MTBF分析")
-    public R mtbfList(@RequestParam(value = "companys", required = true) String companys,
-                      @RequestParam(value = "type", required = true) String type,
-                      @RequestParam(value = "year", required = true) String year) throws ParseException {
+    public R mtbfList(@RequestParam(value = "companys") String companys,
+                      @RequestParam(value = "type") String type,
+                      @RequestParam(value = "year") String year) throws ParseException {
 
         List<SpecificTarget> resultList = specificService.mtbfList(companys, type, year);
         if (StringUtils.isNotNull(resultList)) {

+ 3 - 0
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/Electricity/Electricityservice.java

@@ -280,6 +280,9 @@ public class Electricityservice {
                             dqzqlhjsum = BigDecimal.valueOf(StringUtils.round(average, 2));
                         }
                         map.put("bnjhdlhj", MathUtil.twoBit(yeardlsum));
+                        if (null == rfdlychjsum) {
+                            rfdlychjsum=BigDecimal.ZERO;
+                        }
                         map.put("rfdlychj", rfdlychjsum.divide(BigDecimal.valueOf(10000), 2));
                         //                        map.put("bnsjdlhj", MathUtil.twoBit((bnsjdlhjsum / 10000) + (rfdlsjhj / 10000)));
                         map.put("bnsjdlhj", MathUtil.twoBit(bnsjdlhjsum / 10000));

+ 2 - 0
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProBasicEquipmentService.java

@@ -29,5 +29,7 @@ public interface IProBasicEquipmentService extends IService<ProBasicEquipment> {
 
     List<ProBasicEquipment> getProBasicEquipmentList(String wpid);
 
+    List<ProBasicEquipment> getProBasicEquipmentList2(String wpid);
+
 
 }

+ 16 - 1
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProBasicEquipmentServiceImpl.java

@@ -1,8 +1,10 @@
 package com.gyee.runeconomy.service.auto.impl;
 
+import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.gyee.common.model.StringUtils;
 import com.gyee.common.util.SortUtils;
+import com.gyee.runeconomy.init.CacheContext;
 import com.gyee.runeconomy.mapper.auto.ProBasicEquipmentMapper;
 import com.gyee.runeconomy.model.auto.ProBasicEquipment;
 import com.gyee.runeconomy.service.TokenService;
@@ -13,6 +15,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -42,7 +45,7 @@ public class ProBasicEquipmentServiceImpl extends ServiceImpl<ProBasicEquipmentM
         }
 
         //判断后缀是区域还是公司
-        if (StringUtils.isNotEmpty(companyId) && companyId.endsWith("_ZGS")) {
+        if (StringUtils.isNotEmpty(companyId) &&(companyId.endsWith("_ZGS"))||companyId.endsWith("_FGS")) {
             list = list.stream().filter(eq -> companyId.equals(eq.getCompanyId())).collect(Collectors.toList());
         }
         if (StringUtils.isNotEmpty(companyId) && companyId.endsWith("_RGN")) {
@@ -72,4 +75,16 @@ public class ProBasicEquipmentServiceImpl extends ServiceImpl<ProBasicEquipmentM
         List<ProBasicEquipment> list = tokenService.getWtls(request);
         return list.stream().filter(i -> i.getWindpowerstationId().equals(wpid)).collect(Collectors.toList());
     }
+
+    @Override
+    public List<ProBasicEquipment> getProBasicEquipmentList2(String wpid) {
+        List<ProBasicEquipment> wtlist = new ArrayList<>();
+        for (ProBasicEquipment wt : CacheContext.wtls) {
+            ProBasicEquipment newWt = new ProBasicEquipment();
+            BeanUtil.copyProperties(wt, newWt);
+            wtlist.add(newWt);
+        }
+        return wtlist;
+    }
+
 }

+ 155 - 1
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/homepage/EconomyPointHomePageService.java

@@ -1,16 +1,24 @@
 package com.gyee.runeconomy.service.homepage;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.gyee.common.util.DateUtils;
+import com.gyee.common.vo.healthmanager.CompareVo;
 import com.gyee.runeconomy.dto.response.EconHomePagePointRateDTO;
 import com.gyee.runeconomy.dto.response.ProEconPointCodeDTO;
+import com.gyee.runeconomy.init.CacheContext;
 import com.gyee.runeconomy.model.auto.*;
+import com.gyee.runeconomy.model.vo.ColumnVo;
+import com.gyee.runeconomy.model.vo.ComparetqVo;
+import com.gyee.runeconomy.model.vo.GeneratingCapacityVo;
 import com.gyee.runeconomy.service.auto.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.text.ParseException;
+import java.time.LocalDate;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -104,8 +112,76 @@ public class EconomyPointHomePageService {
 
 
     /**
-     * 装机容量
+     * 经济运行首页聚合方法
+     *
+     * @param foreignKeyId
+     * @param staType
+     * @param dateType
+     * @return
      */
+    public Map<String, Object> getEconomyPointHomePageInfo2(String foreignKeyId, String regionId1, String companyId1, String staType, String dateType, String pointCode) throws ParseException {
+        Map<String, Object> allmap = new HashMap<>();
+        List<GeneratingCapacityVo> ls = new ArrayList<>();
+        LocalDate now = LocalDate.now();
+        QueryWrapper<ProEconPowerstationInfoDay1> qw = new QueryWrapper<>();
+        qw.lambda().eq(ProEconPowerstationInfoDay1::getRecordDate, now)
+                .eq(ProEconPowerstationInfoDay1::getForeignKeyId, CacheContext.wpls.get(0).getId());
+        List<ProEconPowerstationInfoDay1> day1s = proEconPowerstationInfoDay1Service.list(qw);
+        for (ProEconPowerstationInfoDay1 day1 : day1s) {
+            GeneratingCapacityVo rfdl = new GeneratingCapacityVo();
+            rfdl.setName("日发电量");
+            rfdl.setValue(day1.getRfdl());
+            rfdl.setTotal(day1.getRllfdl());
+            rfdl.setBfb(new BigDecimal("5.00"));
+            ls.add(rfdl);
+
+            GeneratingCapacityVo yfdl = new GeneratingCapacityVo();
+            yfdl.setName("月发电量");
+            yfdl.setValue(day1.getYfdl());
+            yfdl.setTotal(day1.getYllfdl());
+            yfdl.setBfb(new BigDecimal("5.00"));
+            ls.add(yfdl);
+
+            GeneratingCapacityVo nfdl = new GeneratingCapacityVo();
+            nfdl.setName("年发电量");
+            nfdl.setValue(day1.getNfdl());
+            nfdl.setTotal(day1.getNllfdl());
+            nfdl.setBfb(new BigDecimal("5.00"));
+            ls.add(nfdl);
+        }
+
+        Map<String, Object> zbtqdb = new HashMap<>();
+        List<ColumnVo> ls1 = new ArrayList<>();
+        ColumnVo cl1 = new ColumnVo();
+        cl1.setName("指标名称");
+        cl1.setField("wtId");
+        ColumnVo cl2 = new ColumnVo();
+        cl2.setName(String.valueOf(LocalDate.now().getYear()));
+        cl2.setField("recodedate");
+        ColumnVo cl3 = new ColumnVo();
+        cl3.setName(String.valueOf(LocalDate.now().getYear()-1));
+        cl3.setField("recodedate2");
+        ColumnVo cl4 = new ColumnVo();
+        cl4.setName("涨跌%");
+        cl4.setField("operation");
+        ls1.add(cl1);
+        ls1.add(cl2);
+        ls1.add(cl3);
+        ls1.add(cl4);
+
+        List<ColumnVo> ls2 = new ArrayList<>();
+
+
+
+        zbtqdb.put("column", ls1);
+        zbtqdb.put("data", ls2);
+        allmap.put("fdl", ls);
+        allmap.put("zbtqdb", zbtqdb);
+
+
+        return allmap;
+    }
+
 
     /**
      * 经济运行首页聚合方法
@@ -1463,4 +1539,82 @@ public class EconomyPointHomePageService {
     }
 
 
+    public Map<String, Object> getGeneratingCapacity(String companyId) {
+        Map<String, Object> allmap = new HashMap<>();
+        List<GeneratingCapacityVo> ls = new ArrayList<>();
+        LocalDate now = LocalDate.now();
+        QueryWrapper<ProEconPowerstationInfoDay1> qw = new QueryWrapper<>();
+        qw.lambda().eq(ProEconPowerstationInfoDay1::getRecordDate, now)
+                .eq(ProEconPowerstationInfoDay1::getForeignKeyId, companyId);
+        List<ProEconPowerstationInfoDay1> day1s = proEconPowerstationInfoDay1Service.list(qw);
+        for (ProEconPowerstationInfoDay1 day1 : day1s) {
+            GeneratingCapacityVo rfdl = new GeneratingCapacityVo();
+            rfdl.setName("日发电量");
+            rfdl.setValue(day1.getRfdl());
+            rfdl.setTotal(day1.getRllfdl());
+            BigDecimal rbfb = (day1.getRfdl().compareTo(BigDecimal.ZERO) == 0 || day1.getRllfdl().compareTo(BigDecimal.ZERO) == 0)
+                    ? BigDecimal.ZERO
+                    : day1.getRllfdl().divide(day1.getRfdl(), 2, RoundingMode.HALF_UP).multiply(new BigDecimal("100"));rfdl.setBfb(rbfb);
+            rfdl.setBfb(rbfb);
+            ls.add(rfdl);
+
+            GeneratingCapacityVo yfdl = new GeneratingCapacityVo();
+            yfdl.setName("月发电量");
+            yfdl.setValue(day1.getYfdl());
+            yfdl.setTotal(day1.getYllfdl());
+            BigDecimal ybfb = (day1.getYfdl().compareTo(BigDecimal.ZERO) == 0 || day1.getYllfdl().compareTo(BigDecimal.ZERO) == 0)
+                    ? BigDecimal.ZERO
+                    : day1.getYllfdl().divide(day1.getYfdl(), 2, RoundingMode.HALF_UP).multiply(new BigDecimal("100"));rfdl.setBfb(rbfb);
+            yfdl.setBfb(ybfb);
+            ls.add(yfdl);
+
+            GeneratingCapacityVo nfdl = new GeneratingCapacityVo();
+            nfdl.setName("年发电量");
+            nfdl.setValue(day1.getNfdl());
+            nfdl.setTotal(day1.getNllfdl());
+            BigDecimal nbfb = (day1.getNfdl().compareTo(BigDecimal.ZERO) == 0 || day1.getNllfdl().compareTo(BigDecimal.ZERO) == 0)
+                    ? BigDecimal.ZERO
+                    : day1.getNllfdl().divide(day1.getNfdl(), 2, RoundingMode.HALF_UP).multiply(new BigDecimal("100"));rfdl.setBfb(rbfb);
+            nfdl.setBfb(nbfb);
+            ls.add(nfdl);
+
+            Map<String, Object> zbtqdb = new HashMap<>();
+            List<ColumnVo> ls1 = new ArrayList<>();
+            ColumnVo cl1 = new ColumnVo();
+            cl1.setName("指标名称");
+            cl1.setField("wtId");
+            ColumnVo cl2 = new ColumnVo();
+            cl2.setName(String.valueOf(LocalDate.now().getYear()));
+            cl2.setField("recodedate");
+            ColumnVo cl3 = new ColumnVo();
+            cl3.setName(String.valueOf(LocalDate.now().getYear()-1));
+            cl3.setField("recodedate2");
+            ColumnVo cl4 = new ColumnVo();
+            cl4.setName("涨跌%");
+            cl4.setField("operation");
+            ls1.add(cl1);
+            ls1.add(cl2);
+            ls1.add(cl3);
+            ls1.add(cl4);
+
+            List<ComparetqVo> ls2 = new ArrayList<>();
+            ComparetqVo cv = new ComparetqVo();
+            cv.setWtId("风电发电量");
+            cv.setRecodedate(String.valueOf(day1.getNfdl()));
+            cv.setRecodedate2(String.valueOf(0));
+            cv.setOperation("100");
+            ls2.add(cv);
+
+            zbtqdb.put("column", ls1);
+            zbtqdb.put("data", ls2);
+            allmap.put("fdl", ls);
+            allmap.put("zbtqdb", zbtqdb);
+        }
+
+
+        return allmap;
+
+    }
+
+
 }

+ 48 - 48
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/specific/SpecificService.java

@@ -747,7 +747,7 @@ public class SpecificService {
         } else {
             currentqw.like("foreign_key_id", "_GDC_");
         }
-        if (companys.endsWith("ZGS")) {
+        if (companys.endsWith("ZGS") || companys.endsWith("FGS")) {
             currentqw.eq("company_id", companys);
         } else {
             currentqw.eq("region_id", companys);
@@ -770,7 +770,7 @@ public class SpecificService {
         } else {
             currentqw.like("foreign_key_id", "_GDC_");
         }
-        if (companys.endsWith("ZGS")) {
+        if (companys.endsWith("ZGS") || companys.endsWith("FGS")) {
             currentqw.eq("company_id", companys);
         } else {
             currentqw.eq("region_id", companys);
@@ -792,7 +792,7 @@ public class SpecificService {
             SpecificTargetVo vo = new SpecificTargetVo();
             String wpid = i.getForeignKeyId();
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -842,7 +842,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -860,7 +860,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -873,9 +873,9 @@ public class SpecificService {
                     }
                 }
 
-
                 vo.setTargetList(tempList);
                 resultendList.add(vo);
+
             });
         }
         SortUtils.sort(resultendList, "orderNum", SortUtils.ASC);
@@ -940,7 +940,7 @@ public class SpecificService {
             SpecificTargetVo vo = new SpecificTargetVo();
             String wpid = i.getForeignKeyId();
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -991,7 +991,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1009,7 +1009,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1088,7 +1088,7 @@ public class SpecificService {
             SpecificTargetVo vo = new SpecificTargetVo();
             String wpid = i.getForeignKeyId();
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1138,7 +1138,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1156,7 +1156,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1237,7 +1237,7 @@ public class SpecificService {
             SpecificTargetVo vo = new SpecificTargetVo();
             String wpid = i.getForeignKeyId();
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1286,7 +1286,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1304,7 +1304,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1385,7 +1385,7 @@ public class SpecificService {
             SpecificTargetVo vo = new SpecificTargetVo();
             String wpid = i.getForeignKeyId();
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1434,7 +1434,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1452,7 +1452,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1501,7 +1501,8 @@ public class SpecificService {
         currentqw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
         currentList.addAll(proEconPowerstationInfoDay5Service.list(currentqw));
 
-        int subYear = Integer.parseInt(year) - 1;
+//        int subYear = Integer.parseInt(year) - 1;
+        int subYear = Integer.parseInt(year) ;
         QueryWrapper<ProEconPowerstationInfoDay5> sameperiodqw = new QueryWrapper<>();
         sameperiodqw.select("foreign_key_id,max(record_date) record_date,sum(rfdldb) yfdldb");
         sameperiodqw.eq("location", "wp");
@@ -1540,7 +1541,7 @@ public class SpecificService {
                 capacity = (gsrl.get(0).getJrCapacity() / 10000) + (gsrl.get(0).getJrwindCapacity() / 10000);
             }
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1600,7 +1601,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1618,7 +1619,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS")|| wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1675,7 +1676,7 @@ public class SpecificService {
         } else {
             currentqw.like("foreign_key_id", "_GDC_");
         }
-        if (companys.endsWith("ZGS")) {
+        if (companys.endsWith("ZGS") || companys.endsWith("FGS")) {
             currentqw.eq("company_id", companys);
         } else {
             currentqw.eq("region_id", companys);
@@ -1697,7 +1698,7 @@ public class SpecificService {
             SpecificTargetVo vo = new SpecificTargetVo();
             String wpid = i.getForeignKeyId();
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (companys.endsWith("ZGS") || companys.endsWith("FGS")) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1746,7 +1747,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1764,7 +1765,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1843,7 +1844,7 @@ public class SpecificService {
             SpecificTargetVo vo = new SpecificTargetVo();
             String wpid = i.getForeignKeyId();
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1892,7 +1893,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1910,7 +1911,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -1923,7 +1924,6 @@ public class SpecificService {
                     }
                 }
 
-
                 vo.setTargetList(tempList);
                 resultendList.add(vo);
             });
@@ -1989,7 +1989,7 @@ public class SpecificService {
             SpecificTargetVo vo = new SpecificTargetVo();
             String wpid = i.getForeignKeyId();
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2038,7 +2038,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2056,7 +2056,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2135,7 +2135,7 @@ public class SpecificService {
             SpecificTargetVo vo = new SpecificTargetVo();
             String wpid = i.getForeignKeyId();
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2184,7 +2184,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2202,7 +2202,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2281,7 +2281,7 @@ public class SpecificService {
             SpecificTargetVo vo = new SpecificTargetVo();
             String wpid = i.getForeignKeyId();
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2330,7 +2330,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2348,7 +2348,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2427,7 +2427,7 @@ public class SpecificService {
             SpecificTargetVo vo = new SpecificTargetVo();
             String wpid = i.getForeignKeyId();
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2476,7 +2476,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2494,7 +2494,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2866,7 +2866,7 @@ public class SpecificService {
             SpecificTargetVo vo = new SpecificTargetVo();
             String wpid = i.getForeignKeyId();
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2915,7 +2915,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -2933,7 +2933,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -3012,7 +3012,7 @@ public class SpecificService {
             SpecificTargetVo vo = new SpecificTargetVo();
             String wpid = i.getForeignKeyId();
             vo.setWpid(wpid);
-            if (wpid.contains("_ZGS")) {
+            if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                 vo.setWpname(CacheContext.cpmap.get(companys).getAname());
             } else if (wpid.contains("_RGN")) {
                 vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -3061,7 +3061,7 @@ public class SpecificService {
                 SpecificTarget vo = new SpecificTarget();
                 vo.setWpid(wpid);
                 int orderNum = 100;
-                if (wpid.contains("_ZGS")) {
+                if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                     vo.setWpname(CacheContext.cpmap.get(companys).getAname());
                 } else if (wpid.contains("_RGN")) {
                     vo.setWpname(CacheContext.rgmap.get(companys).getAname());
@@ -3079,7 +3079,7 @@ public class SpecificService {
                     } else {
                         SpecificTargetVo vo1 = new SpecificTargetVo();
                         vo1.setWpid(wpid);
-                        if (wpid.contains("_ZGS")) {
+                        if (wpid.contains("_ZGS") || wpid.contains("_FGS" + type)) {
                             vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
                         } else if (wpid.contains("_RGN")) {
                             vo1.setWpname(CacheContext.rgmap.get(companys).getAname());

+ 61 - 18
runeconomy-xk/src/main/java/com/gyee/runeconomy/util/realtimesource/EdosUtil.java

@@ -13,8 +13,7 @@ import com.gyee.runeconomy.model.vo.RealTimeParameterVo;
 import com.gyee.runeconomy.util.realtimesource.timeseries.ErrorRequest;
 import com.gyee.runeconomy.util.realtimesource.timeseries.JsonObjectHelper;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
+import org.springframework.http.*;
 import org.springframework.stereotype.Component;
 import org.springframework.web.client.HttpClientErrorException;
 import org.springframework.web.client.RestTemplate;
@@ -37,30 +36,74 @@ public class EdosUtil implements IEdosUtil {
     @Value("${initialcode}")
     private String initialcode;
 
+//    @Override
+//    public PointData getRealData(ProBasicPowerstationPoint point) throws Exception {
+//
+//        if (StringUtils.notEmp(point) && StringUtils.notEmp(point.getNemCode()) && !initialcode.equals(point.getNemCode())) {
+//            try {
+//                Optional<String> keys = Optional.ofNullable(point.getNemCode());
+//                Optional<String> thingType = Optional.ofNullable("station");
+//                Optional<String> thingId = Optional.ofNullable(point.getWindpowerstationId());
+//                Optional<String> uniformCodes = Optional.ofNullable(point.getUniformCode());
+//
+//                String url = baseURL + "/latest?null=0";
+////                if (point.getNemCode().startsWith("GF-")) {
+////                    url = baseURL2 + "/latest?null=0";
+////                }
+////                if (keys.isPresent())
+////                    url = url + "&keys=" + keys.get();
+////                if (thingType.isPresent())
+////                    url = url + "&thingType=" + thingType.get();
+////                if (thingId.isPresent())
+////                    url = url + "&thingId=" + thingId.get();
+////                if (uniformCodes.isPresent())
+////                    url = url + "&uniformCodes=" + uniformCodes.get();
+//
+//                ResponseEntity<JSONObject> resp = restTemplate.getForEntity(url, JSONObject.class);
+//                JSONObject jsonArray = resp.getBody();
+//                if (StringUtils.isNotEmpty(jsonArray)) {
+//                    List<PointData> list = JsonObjectHelper.phrasePointData(jsonArray);
+//                    if (list.size() > 0)
+//                        return list.get(0);
+//                    else
+//                        return ErrorRequest.RequestError(point.getNemCode());
+//                } else {
+//                    return ErrorRequest.RequestError(point.getNemCode());
+//                }
+//            } catch (HttpClientErrorException exception) {
+//                if (exception.getStatusCode() == HttpStatus.NOT_FOUND) {
+//                    //System.out.println("404请求错误");
+//                    return ErrorRequest.RequestError(point.getNemCode());
+//                } else {
+//                    throw exception;
+//                }
+//            }
+//        } else {
+//            PointData po = new PointData();
+//            po.setEdnaId(point.getNemCode());
+//            po.setPointValueInDouble(0.0);
+//            po.setPointTime(0l);
+//            return po;
+//        }
+//
+//    }
+
+
     @Override
     public PointData getRealData(ProBasicPowerstationPoint point) throws Exception {
 
         if (StringUtils.notEmp(point) && StringUtils.notEmp(point.getNemCode()) && !initialcode.equals(point.getNemCode())) {
             try {
-                Optional<String> keys = Optional.ofNullable(point.getNemCode());
-                Optional<String> thingType = Optional.ofNullable("station");
-                Optional<String> thingId = Optional.ofNullable(point.getWindpowerstationId());
-                Optional<String> uniformCodes = Optional.ofNullable(point.getUniformCode());
 
                 String url = baseURL + "/latest?null=0";
-                if (point.getNemCode().startsWith("GF-")) {
-                    url = baseURL2 + "/latest?null=0";
-                }
-                if (keys.isPresent())
-                    url = url + "&keys=" + keys.get();
-                if (thingType.isPresent())
-                    url = url + "&thingType=" + thingType.get();
-                if (thingId.isPresent())
-                    url = url + "&thingId=" + thingId.get();
-                if (uniformCodes.isPresent())
-                    url = url + "&uniformCodes=" + uniformCodes.get();
+                HttpHeaders headers = new HttpHeaders();
+                headers.setContentType(MediaType.APPLICATION_JSON);
+
+                List<String> ls = new ArrayList<>();
+                ls.add(point.getNemCode());
+                HttpEntity<List<String>> requestEntity = new HttpEntity<>(ls,headers);
+                ResponseEntity<JSONObject> resp = restTemplate.exchange(url,HttpMethod.POST,requestEntity,JSONObject.class);
 
-                ResponseEntity<JSONObject> resp = restTemplate.getForEntity(url, JSONObject.class);
                 JSONObject jsonArray = resp.getBody();
                 if (StringUtils.isNotEmpty(jsonArray)) {
                     List<PointData> list = JsonObjectHelper.phrasePointData(jsonArray);

+ 16 - 10
runeconomy-xk/src/main/java/com/gyee/runeconomy/util/realtimesource/timeseries/JsonObjectHelper.java

@@ -185,19 +185,25 @@ public class JsonObjectHelper {
             }
             switch (type) {
                 case 0:
-                    data.setPointValue(String.valueOf(maxData.getString("doubleValue")));
-                    data.setPointValueInDouble(Double.valueOf(maxData.getString("doubleValue")));
-                    data.setPointTime(Long.valueOf(maxData.getString("ts")));
-                    break;
+                    if (null != maxData) {
+                        data.setPointValue(String.valueOf(maxData.getString("doubleValue")));
+                        data.setPointValueInDouble(Double.valueOf(maxData.getString("doubleValue")));
+                        data.setPointTime(Long.valueOf(maxData.getString("ts")));
+                        break;
+                    }
                 case 1:
-                    data.setPointValue(String.valueOf(minData.getString("doubleValue")));
-                    data.setPointValueInDouble(Double.valueOf(minData.getString("doubleValue")));
-                    data.setPointTime(Long.valueOf(minData.getString("ts")));
+                    if (null != minData) {
+                        data.setPointValue(String.valueOf(minData.getString("doubleValue")));
+                        data.setPointValueInDouble(Double.valueOf(minData.getString("doubleValue")));
+                        data.setPointTime(Long.valueOf(minData.getString("ts")));
+                    }
                     break;
                 case 2:
-                    data.setPointValue(String.valueOf(avgData.getString("doubleValue")));
-                    data.setPointValueInDouble(Double.valueOf(avgData.getString("doubleValue")));
-                    data.setPointTime(Long.valueOf(avgData.getString("ts")));
+                    if (null != avgData) {
+                        data.setPointValue(String.valueOf(avgData.getString("doubleValue")));
+                        data.setPointValueInDouble(Double.valueOf(avgData.getString("doubleValue")));
+                        data.setPointTime(Long.valueOf(avgData.getString("ts")));
+                    }
                     break;
                 default:
                     break;

文件差異過大導致無法顯示
+ 4 - 4
runeconomy-xk/src/main/resources/application-nxf.yml