소스 검색

修改自动生成测点功能模块

shilin 2 년 전
부모
커밋
0d691cfed8
14개의 변경된 파일1775개의 추가작업 그리고 35개의 파일을 삭제
  1. 18 8
      realtime/generationXK-service/src/main/java/com/gyee/generation/GenerationMain.java
  2. 6 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/config/GeneratorCodeConfig.java
  3. 20 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/controller/ProBasicMaintransformerController.java
  4. 18 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/init/CacheContext.java
  5. 16 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProBasicMaintransformerMapper.java
  6. 119 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProBasicMaintransformer.java
  7. 16 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/IProBasicMaintransformerService.java
  8. 20 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProBasicMaintransformerServiceImpl.java
  9. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/IinitialPoint.java
  10. 1207 0
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/InitialPointGoldenXkByEqEdosService.java
  11. 198 20
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/InitialPointGoldenXkByEqService.java
  12. 2 2
      realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/InitialPointGoldenXkService.java
  13. 132 0
      realtime/generationXK-service/src/main/resources/application-hf.yml
  14. 1 1
      realtime/generationXK-service/src/main/resources/application.yml

+ 18 - 8
realtime/generationXK-service/src/main/java/com/gyee/generation/GenerationMain.java

@@ -1,9 +1,5 @@
 package com.gyee.generation;
 
-import com.gyee.generation.service.InputOrOutPutService;
-import com.gyee.generation.service.initalcache.CacheService;
-import com.gyee.generation.service.initialpoint.InitialPointGoldenXkService;
-import com.gyee.generation.util.SpringUtils;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -21,7 +17,7 @@ public class GenerationMain {
         SpringApplication.run(GenerationMain.class, args);
 
 
-//
+
 //        CacheService cacheService= SpringUtils.getBean("cacheService");
 //        cacheService.initRedisCache();
 
@@ -35,15 +31,29 @@ public class GenerationMain {
 //        InitialPointGoldenXkService.initalFc();
 //        System.out.println("结束导出风场测点。。。。。。");
 //
-//        InitialPointGoldenXkByEqService initialPointGoldenXkByEqService= SpringUtils.getBean("initialPointGoldenXkByEqService");
+//        InitialPointGoldenXkByEqEdosService initialPointGoldenXkByEqEdosService= SpringUtils.getBean("initialPointGoldenXkByEqEdosService");
+//
+//        System.out.println("开始导出主变测点。。。。。。");
+//        initialPointGoldenXkByEqEdosService.initalZb();
+//        System.out.println("结束导出主变测点。。。。。。");
 //
 //        System.out.println("开始导出风机测点。。。。。。");
-//        initialPointGoldenXkByEqService.initalFj();
+//        initialPointGoldenXkByEqEdosService.initalFj();
 //        System.out.println("结束导出风机测点。。。。。。");
 //
 //        System.out.println("开始导出风场测点。。。。。。");
-//        initialPointGoldenXkByEqService.initalFc();
+//        initialPointGoldenXkByEqEdosService.initalFc();
 //        System.out.println("结束导出风场测点。。。。。。");
+//
+//
+//        System.out.println("开始导出测风塔风功率AGC测点表。。。。。。");
+//        initialPointGoldenXkByEqEdosService.initalFgl();
+//        System.out.println("结束导出测风塔风功率AGC测点表。。。。。。");
+//
+//        System.out.println("开始导出气象测点表。。。。。。");
+//        initialPointGoldenXkByEqEdosService.initalQx();
+//        System.out.println("结束导出气象测点表。。。。。。");
+
 ////        PowerCurveFittingByTimeService powerCurveFittingByTimeService= SpringUtils.getBean("powerCurveFittingByTimeService");
 //        Calendar c=Calendar.getInstance();
 //        c.set(Calendar.MONTH,7);

+ 6 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/config/GeneratorCodeConfig.java

@@ -60,8 +60,12 @@ public class GeneratorCodeConfig {
 
         dsc.setDriverName("org.postgresql.Driver");
         dsc.setUsername("postgres");
-        dsc.setPassword("postgres");
-        dsc.setUrl("jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD");
+        dsc.setPassword("gd123");
+        dsc.setUrl("jdbc:postgresql://10.0.118.76:5432/IMS_NEM");
+//        dsc.setDriverName("org.postgresql.Driver");
+//        dsc.setUsername("postgres");
+//        dsc.setPassword("postgres");
+//        dsc.setUrl("jdbc:postgresql://192.168.11.248:5432/IMS_NEM_SD");
 //        dsc.setUrl("jdbc:postgresql://124.70.75.91:5432/jn_test");
 //        dsc.setUsername("postgres");
 //        dsc.setPassword("gd123");

+ 20 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/controller/ProBasicMaintransformerController.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 主变表 前端控制器
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-01-30
+ */
+@RestController
+@RequestMapping("//pro-basic-maintransformer")
+public class ProBasicMaintransformerController {
+
+}

+ 18 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/init/CacheContext.java

@@ -99,6 +99,7 @@ public class CacheContext implements CommandLineRunner {
     public static Map<String,List<ProBasicEquipment>> pjwtmap = new HashMap<>();
     public static Map<String,List<ProBasicEquipment>> lnwtmap = new HashMap<>();
     public static List<ProBasicWeatherStation> wsls=new ArrayList<>();
+    public static Map<String,List<ProBasicWeatherStation>> poWsStationMap = new HashMap<>();
 
     public static Map<String,List<ProBasicEquipment>> sqwtmap = new HashMap<>();
     public static Map<String, Map<String, ProBasicEquipmentPoint>> wtpAimap = new HashMap<>();// 风电机测点AI表
@@ -139,7 +140,24 @@ public class CacheContext implements CommandLineRunner {
         List<String> runWpids = Arrays.asList(runWindpowerstation.split(","));
         logger.info(runWpids.get(0)+"------------------"+runWpids.size());
         wsls= proBasicWeatherStationService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsAble()==1).collect(Collectors.toList());
+        if(!wsls.isEmpty())
+        {
+
+            for(ProBasicWeatherStation ws:wsls)
+            {
+                if(poWsStationMap.containsKey(ws.getWindpowerstationId()))
+                {
+                    List<ProBasicWeatherStation> ls=poWsStationMap.get(ws.getWindpowerstationId());
+                    ls.add(ws);
+                    poWsStationMap.put(ws.getWindpowerstationId(),ls);
 
+                }else {
+                    List<ProBasicWeatherStation> ls=new ArrayList<>();
+                    ls.add(ws);
+                    poWsStationMap.put(ws.getWindpowerstationId(),ls);
+                }
+            }
+        }
         theoreticalPowerList= proBasicModelPowerRdService.list();
         equipmentmodels = proEconEquipmentmodelService.list();
         equipmentmodels.stream().forEach(e->{

+ 16 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/mapper/auto/ProBasicMaintransformerMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.mapper.auto;
+
+import com.gyee.generation.model.auto.ProBasicMaintransformer;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 主变表 Mapper 接口
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-01-30
+ */
+public interface ProBasicMaintransformerMapper extends BaseMapper<ProBasicMaintransformer> {
+
+}

+ 119 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/model/auto/ProBasicMaintransformer.java

@@ -0,0 +1,119 @@
+package com.gyee.generation.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.time.LocalDate;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 主变表
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-01-30
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProBasicMaintransformer extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
+    private String id;
+
+    /**
+     * 编码
+     */
+    private String nemCode;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 别名
+     */
+    private String aname;
+
+    /**
+     * 风场编号
+     */
+    private String windpowerstationId;
+
+    /**
+     * 装机容量
+     */
+    private BigDecimal capacity;
+
+    /**
+     * 容量单位
+     */
+    private String capacityUnit;
+
+    /**
+     * 装机数量
+     */
+    private Integer quantity;
+
+    /**
+     * 机型
+     */
+    private String model;
+
+    /**
+     * 投产日期
+     */
+    private LocalDate commissionDate;
+
+    /**
+     * 主控电话
+     */
+    private String masterPhone;
+
+    /**
+     * 值长
+     */
+    private String shiftforeMan;
+
+    /**
+     * 值长电话
+     */
+    private String shiftforeManPhone;
+
+    /**
+     * 顺序
+     */
+    private Integer orderNum;
+
+    /**
+     * 是否可用
+     */
+    private Integer isAble;
+
+    /**
+     * 备用1
+     */
+    private String spare1;
+
+    /**
+     * 备用2
+     */
+    private String spare2;
+
+    /**
+     * 备用3
+     */
+    private String spare3;
+
+    /**
+     * 备用4
+     */
+    private String spare4;
+
+
+}

+ 16 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/IProBasicMaintransformerService.java

@@ -0,0 +1,16 @@
+package com.gyee.generation.service.auto;
+
+import com.gyee.generation.model.auto.ProBasicMaintransformer;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 主变表 服务类
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-01-30
+ */
+public interface IProBasicMaintransformerService extends IService<ProBasicMaintransformer> {
+
+}

+ 20 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/auto/impl/ProBasicMaintransformerServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.generation.service.auto.impl;
+
+import com.gyee.generation.model.auto.ProBasicMaintransformer;
+import com.gyee.generation.mapper.auto.ProBasicMaintransformerMapper;
+import com.gyee.generation.service.auto.IProBasicMaintransformerService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 主变表 服务实现类
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-01-30
+ */
+@Service
+public class ProBasicMaintransformerServiceImpl extends ServiceImpl<ProBasicMaintransformerMapper, ProBasicMaintransformer> implements IProBasicMaintransformerService {
+
+}

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/IinitialPoint.java

@@ -19,12 +19,12 @@ public interface IinitialPoint {
      * 初始化升压站
      * @throws Exception
      */
-    public void initalSyz();
+    public void initalZb() throws IOException ;
     /**
      * 初始化调度
      * @throws Exception
      */
-    public void initalDd() throws IOException;
+    public void initalQx() throws IOException;
     /**
      * 初始化风功率预测
      * @throws Exception

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1207 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/InitialPointGoldenXkByEqEdosService.java


+ 198 - 20
realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/InitialPointGoldenXkByEqService.java

@@ -28,14 +28,17 @@ public class InitialPointGoldenXkByEqService implements IinitialPoint {
     private IProEconTestingPointService proEconTestingPointService;
 
     private final String FJ = "fj";
-    private final String FJJSFW = "fjjsfw";
-    private final String GFJSFW = "gfjsfw";
+    private final String FJJSFW = "fjc";
+    private final String GFJSFW = "gfc";
     private final String GF = "gf";
 
-    private final String GCJSFW = "gcjsfw";
-    private final String FCJSFW = "fcjsfw";
+    private final String GCJSFW = "gcc";
+    private final String FCJSFW = "fcc";
 
+    private final String AGC = "agcc";
+    private final String FGL = "fggl";
 
+    private final String CFT = "cft";
 
     @Override
     public void initalFc() throws IOException {
@@ -69,7 +72,7 @@ public class InitialPointGoldenXkByEqService implements IinitialPoint {
                 sba.append(re.getId().substring(0,re.getId().indexOf("_"))).append("_");
 /********************************************区域公司测点**************************************************/
 
-                
+
                 List<ProBasicPowerstationPoint>  points=new ArrayList<>();
                 for(int i=0;i<pointls.size();i++)
                 {
@@ -82,10 +85,10 @@ public class InitialPointGoldenXkByEqService implements IinitialPoint {
                     sb.append("XXXX_XXX_X_XX_XX_XXXX_");
                     sb.append("CI");
                     sb.append(stp.getNemCode());
-                    
+
                     sbtable.append("JSFW.");
                     sbtable.append(sb);
-                    
+
                     ProBasicPowerstationPoint po=new ProBasicPowerstationPoint();
                     po.setId(StringUtils.getUUID());
 //                            po.setNemCode(V2Config.getInitialcode());
@@ -449,18 +452,193 @@ public class InitialPointGoldenXkByEqService implements IinitialPoint {
     }
 
     @Override
-    public void initalSyz() {
+    public void initalZb() throws IOException {
 
     }
 
     @Override
-    public void initalDd() throws IOException {
+    public void initalQx() throws IOException {
+
+        List<ProBasicPowerstationPoint> allpoints = new ArrayList<>();
+
+        List<ProEconTestingPoint> fcs = proEconTestingPointService.list().stream().filter(i ->  i.getTypeId().equals("cft")).collect(Collectors.toList());
+        List<ProEconTestingPoint> gcs = proEconTestingPointService.list().stream().filter(i ->  i.getTypeId().equals("qxz")).collect(Collectors.toList());
+        //获取场站
+        for (ProBasicPowerstation postation : CacheContext.wpls) {
+
+            List<ProEconTestingPoint> ls = null;
+            if (postation.getId().indexOf("FDC") >= 0) {
+                ls = fcs;
+            } else {
+                ls = gcs;
+            }
+
+            //获取场站下的气象站
+            List<ProBasicWeatherStation> subStations = CacheContext.poWsStationMap.get(postation.getId());
+            //循环气象站生成测点code
+            for (ProBasicWeatherStation ws : subStations) {
+                List<ProBasicPowerstationPoint> points = new ArrayList<>();
+
+                for (ProEconTestingPoint p : ls) {
+
+                    StringBuilder sb = new StringBuilder();
+                    String temp = ws.getId().substring(0, ws.getId().lastIndexOf("_"));
+//                    temp = temp.substring(0, temp.lastIndexOf("_"));
+//                    temp = temp.substring(temp.lastIndexOf("_") + 1);
+                    if (ws.getWindpowerstationId().indexOf("FDC") >= 0) {
+                        sb.append(temp).append("_F_");
+                    } else {
+                        sb.append(temp).append("_G_");
+                    }
+
+                    sb.append("XX_XX_XXXX_");
+                    sb.append(p.getTypeId().toUpperCase()).append("_");
+                    if (p.getUniformCode().indexOf("AI") >= 0) {
+                        sb.append("AI");
+
+                    } else if (p.getUniformCode().indexOf("DI") >= 0) {
+                        sb.append("DI");
+
+                    } else {
+                        sb.append("CI");
+                    }
+                    sb.append(p.getNemCode());
+
+
+                    StringBuilder sba = new StringBuilder();
+
+                    String temp2 = postation.getCompanyId().substring(0, postation.getCompanyId().lastIndexOf("_"));
+                    temp2 = temp2.substring(temp2.indexOf("_") + 1);
 
+                    String temp3 = postation.getId().substring(0, postation.getId().lastIndexOf("_"));
+                    temp3 = temp3.substring(0, temp3.lastIndexOf("_"));
+                    temp3 = temp3.substring(temp3.lastIndexOf("_") + 1);
+                    if (postation.getId().indexOf("FDC") >= 0) {
+                        sba.append(temp2).append(temp3).append("FC");
+                    } else if (postation.getId().indexOf("GDC") >= 0) {
+                        sba.append(temp2).append(temp3).append("GC");
+                    }
+
+                    StringBuilder sbtable = new StringBuilder();
+
+
+                    sbtable.append(sba).append(sb);
+                    ProBasicPowerstationPoint po = new ProBasicPowerstationPoint();
+                    po.setId(com.gyee.common.model.StringUtils.getUUID());
+//                    if (p.getTypeId().indexOf("agcjsfw") >= 0 ) {
+//                        po.setNemCode(String.valueOf(sbtable));
+//                    } else {
+                    po.setNemCode(String.valueOf(sbtable));
+//                    }
+                    sb = new StringBuilder();
+                    sb.append(ws.getName()).append(p.getName());
+                    po.setName(String.valueOf(sb));
+                    po.setWindpowerstationId(ws.getId());
+                    po.setUniformCode(p.getUniformCode());
+                    po.setTypeId(p.getTypeId());
+                    po.setRealtimeId(String.valueOf(sbtable).substring(0,sbtable.indexOf(".")));
+
+                    points.add(po);
+                }
+                allpoints.addAll(points);
+            }
+        }
+        //  编号,编码,名称,实时库名称,型号,单位,英文名称,类型编号,所属型号,最大值,最小值,合理最大值,合理最小值,统一编码,短ID,长ID,场站编号,实时配置编号,集团测点编号,具体名称,系数
+        String[] arr = new String[]{"编号", "编码", "名称","实时库名称", "型号", "单位", "英文名称", "类型编号", "所属型号", "最大值", "最小值", "合理最大值",
+                "合理最小值", "统一编码", "短ID", "长ID", "风场编号", "实时配置编号", "集团测点编号", "具体名称", "系数"};
+        String heardName = "气象测点表";
+        //调用Excel导出工具类
+        ExcelExport.exportToPath(allpoints, arr, heardName, 6, "气象测点表");
     }
 
     @Override
     public void initalFgl() throws IOException {
 
+
+        List<ProBasicPowerstationPoint> allpoints = new ArrayList<>();
+
+        List<ProEconTestingPoint>  ls=proEconTestingPointService.list().stream().filter(i -> i.getTypeId().equals(FGL) ||  i.getTypeId().equals(AGC) ).collect(Collectors.toList());
+
+        //循环变电所生成测点code
+        for (ProBasicSubStation sub : CacheContext.subwpls) {
+            List<ProBasicPowerstationPoint> points = new ArrayList<>();
+
+            if(CacheContext.wpmap.containsKey(sub.getWindpowerstationId()))
+            {
+                ProBasicPowerstation postation=CacheContext.wpmap.get(sub.getWindpowerstationId());
+
+                for (ProEconTestingPoint p : ls) {
+
+                    StringBuilder sb = new StringBuilder();
+                    String temp = sub.getId().substring(0, sub.getId().lastIndexOf("_"));
+//                    temp = temp.substring(0, temp.lastIndexOf("_"));
+//                    temp = temp.substring(temp.lastIndexOf("_") + 1);
+                    if (sub.getWindpowerstationId().indexOf("FDC") >= 0) {
+                        sb.append(temp).append("_F_");
+                    } else {
+                        sb.append(temp).append("_G_");
+                    }
+
+                    sb.append("XX_XX_XXXX_");
+                    sb.append(p.getTypeId().toUpperCase()).append("_");
+                    if (p.getUniformCode().indexOf("AI") >= 0) {
+                        sb.append("AI");
+
+                    } else if (p.getUniformCode().indexOf("DI") >= 0) {
+                        sb.append("DI");
+
+                    } else {
+                        sb.append("CI");
+                    }
+                    sb.append(p.getNemCode());
+
+
+                    StringBuilder sba = new StringBuilder();
+
+                    String temp2 = postation.getCompanyId().substring(0, postation.getCompanyId().lastIndexOf("_"));
+                    temp2 = temp2.substring(temp2.indexOf("_") + 1);
+
+                    String temp3 = postation.getId().substring(0, postation.getId().lastIndexOf("_"));
+                    temp3 = temp3.substring(0, temp3.lastIndexOf("_"));
+                    temp3 = temp3.substring(temp3.lastIndexOf("_") + 1);
+                    if (postation.getId().indexOf("FDC") >= 0) {
+                        sba.append(temp2).append(temp3).append("FC");
+                    } else if (postation.getId().indexOf("GDC") >= 0) {
+                        sba.append(temp2).append(temp3).append("GC");
+                    }
+
+                    StringBuilder sbtable = new StringBuilder();
+
+                    sbtable.append(sba).append(".");
+                    sbtable.append(sb);
+
+
+                    ProBasicPowerstationPoint po = new ProBasicPowerstationPoint();
+                    po.setId(com.gyee.common.model.StringUtils.getUUID());
+
+                    po.setNemCode(String.valueOf(sbtable));
+
+                    sb = new StringBuilder();
+                    sb.append(sub.getName()).append(p.getName());
+                    po.setName(String.valueOf(sb));
+                    po.setWindpowerstationId(sub.getId());
+                    po.setUniformCode(p.getUniformCode());
+                    po.setTypeId(p.getTypeId());
+                    po.setRealtimeId(String.valueOf(sbtable).substring(0,sbtable.indexOf(".")));
+                    points.add(po);
+                }
+                allpoints.addAll(points);
+            }
+
+
+        }
+
+        //  编号,编码,名称,实时库名称,型号,单位,英文名称,类型编号,所属型号,最大值,最小值,合理最大值,合理最小值,统一编码,短ID,长ID,场站编号,实时配置编号,集团测点编号,具体名称,系数
+        String[] arr = new String[]{"编号", "编码", "名称","实时库名称", "型号", "单位", "英文名称", "类型编号", "所属型号", "最大值", "最小值", "合理最大值",
+                "合理最小值", "统一编码", "短ID", "长ID", "风场编号", "实时配置编号", "集团测点编号", "具体名称", "系数"};
+        String heardName = "测风塔风功率AGC测点表";
+        //调用Excel导出工具类
+        ExcelExport.exportToPath(allpoints, arr, heardName, 6, "测风塔风功率AGC测点表");
     }
 
     private void createWpPoints(ProBasicPowerstation wp, List<ProEconTestingPoint> stpointls, List<ProBasicPowerstationPoint> allpoints) {
@@ -535,7 +713,7 @@ public class InitialPointGoldenXkByEqService implements IinitialPoint {
     }
 
 
-    
+
 
     private void createPjPoints(ProBasicPowerstation wp, List<ProEconTestingPoint> stpointls, List<ProBasicPowerstationPoint> allpoints) {
 
@@ -618,7 +796,7 @@ public class InitialPointGoldenXkByEqService implements IinitialPoint {
 
     }
 
-    
+
 
     private void createLnPoints(ProBasicPowerstation wp, List<ProEconTestingPoint> stpointls, List<ProBasicPowerstationPoint> allpoints) {
 
@@ -699,7 +877,7 @@ public class InitialPointGoldenXkByEqService implements IinitialPoint {
 
                         po.setRealtimeId(String.valueOf(sb));
 
-                        
+
                         points.add(po);
                     }
                     allpoints.addAll(points);
@@ -724,14 +902,14 @@ public class InitialPointGoldenXkByEqService implements IinitialPoint {
 
         List<ProBasicEquipmentPoint> allpoints = new ArrayList<>();
 
-        List<ProEconTestingPoint>  fdls=proEconTestingPointService.list().stream().filter(i->i.getTypeId().equals("fj") || i.getTypeId().equals("fjjsfw")).collect(Collectors.toList());
+        List<ProEconTestingPoint>  fdls=proEconTestingPointService.list().stream().filter(i->i.getTypeId().equals("fj") || i.getTypeId().equals(FJJSFW)).collect(Collectors.toList());
 
-        List<ProEconTestingPoint>  gfls=proEconTestingPointService.list().stream().filter(i->i.getTypeId().equals("gf") || i.getTypeId().equals("gfjsfw")).collect(Collectors.toList());
+        List<ProEconTestingPoint>  gfls=proEconTestingPointService.list().stream().filter(i->i.getTypeId().equals("gf") || i.getTypeId().equals(GFJSFW)).collect(Collectors.toList());
 
         for (ProBasicPowerstation wp : CacheContext.wpls) {
 
             List<ProEconTestingPoint> ls=null;
-            if(wp.getId().indexOf("FDC")>=0)
+            if(wp.getId().contains("FDC"))
             {
                 ls=fdls;
 
@@ -752,17 +930,17 @@ public class InitialPointGoldenXkByEqService implements IinitialPoint {
 
 
                         ProEconTestingPoint stp = ls.get(i);
-                        if(!stp.getTypeId().contains("jsfw") && !stp.getModel().equals(wt.getModelId()))
-                        {
-                            continue;
-                        }
+//                        if(!stp.getTypeId().contains("jsfw") && !stp.getModel().equals(wt.getModelId()))
+//                        {
+//                            continue;
+//                        }
                         StringBuilder sb = new StringBuilder();
 //                        sb.append(wp.getPhoto());
 
                         String temp = wp.getId().substring(0, wp.getId().lastIndexOf("_"));
                         temp = temp.substring(0, temp.lastIndexOf("_"));
                         temp = temp.substring(temp.lastIndexOf("_")+1);
-                        if(wp.getId().indexOf("FDC")>=0)
+                        if(wp.getId().contains("FDC"))
                         {
                             sb.append(wp.getCompanyId().substring(0,wp.getCompanyId().lastIndexOf("_"))).append("_").append(temp).append("_F_");
                         }else

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/initialpoint/InitialPointGoldenXkService.java

@@ -517,12 +517,12 @@ public class InitialPointGoldenXkService implements IinitialPoint {
     }
 
     @Override
-    public void initalSyz() {
+    public void initalZb() throws IOException {
 
     }
 
     @Override
-    public void initalDd() throws IOException {
+    public void initalQx() throws IOException {
 
     }
 

+ 132 - 0
realtime/generationXK-service/src/main/resources/application-hf.yml

@@ -0,0 +1,132 @@
+server:
+  port: 7011
+  servlet:
+    context-path: /
+
+
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  #redis集群
+  redis:
+    host: 127.0.0.1
+    #host: 192.168.11.250
+    port: 6379
+    timeout: 100000
+    #    集群环境打开下面注释,单机不需要打开
+    #    cluster:
+    #      #集群信息
+    #      nodes: 10.83.68.151:6379,10.83.68.152:6379,10.83.68.153:6379,10.83.68.154:6379,10.83.68.155:6379,10.83.68.156:6379,10.83.68.157:6379,10.83.68.158:6379,10.83.68.159:6379
+    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+    #      maxRedirects: 3
+    password:
+    application:
+      name: test
+    jedis:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-idle: 8
+        max-wait: -1
+    database: 9
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: org.postgresql.Driver
+    url: jdbc:postgresql://10.0.118.76:5432/IMS_NEM?rewriteBatchedStatements=true
+    username: postgres
+    password: gd123
+    #    url: jdbc:postgresql://124.70.75.91:5432/jn_test?rewriteBatchedStatements=true
+    #    username: postgres
+    #    password: gd123
+    oracle-schema=:
+    #    type: com.alibaba.druid.pool.DruidDataSource
+    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
+    #    username: root
+    #    password: root
+    #    driver-class-name: com.mysql.jdbc.Driver
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+#db url
+db:
+  #url: http://127.0.0.1:8011/ts
+  url: http://192.168.11.250:8011/ts
+  #url: http://124.70.75.91:8011/ts
+#参与计算的场站
+#runWindpowerstation: SD_GDDL_WHWD_FDC_STA,SD_GDDL_WHXQ_FDC_STA,SD_GDDL_RZLX_FDC_STA,SD_GDDL_QDJN_FDC_STA,SD_SXNY_FXFC_FDC_STA,SD_SXNY_LXLN_FDC_STA,SD_SXNY_LQJS_FDC_STA,SD_SXNY_ZYFS_FDC_STA,SD_LYDL_BH2_FDC_STA,SD_GDDL_RZWL_FDC_STA,SD_SXNY_PLHS_FDC_STA,SD_SXNY_ZYXD_FDC_STA,SD_GDDL_DZXJ_FDC_STA,SD_GDDL_XTTA_FDC_STA,SD_GDDL_WFZC_FDC_STA,SD_SXNY_JNSS_FDC_STA,SD_SXNY_WFBH_FDC_STA,SD_LYDL_CG_FDC_STA,SD_LYDL_FJ_FDC_STA,SD_LYDL_YS_FDC_STA,SD_SXNY_JNCQ_FDC_STA,SD_LYDL_BH1_FDC_STA,SD_GHTZ_HZJ_GDC_STA
+runWindpowerstation: LN_GDDL_XC_FDC_STA,LN_GDDL_LH_FDC_STA,LN_GDDL_FS_FDC_STA,LN_GDDL_BZ_FDC_STA,LN_GDDL_XBQ_FDC_STA,LN_GDDL_DBS_FDC_STA,LN_GDDL_TZS_FDC_STA,LN_GDDL_TF_FDC_STA,HLJ_GDDL_JQ_FDC_STA,HLJ_GDDL_BS_FDC_STA,HLJ_GDDL_QL_FDC_STA,JL_GDDL_WF_FDC_STA,JL_GDDL_YM_FDC_STA,MD_GDDL_TY_FDC_STA,MD_GDDL_AL_FDC_STA
+#计算状态用ai或者di
+clauStatus:
+  ai: GJY03_GC,YLZ01_GC,PTZ02_GC   #配置期次
+  di: GJY01_GC,GJY02_GC,DJY01_GC,DJY02_GC,YF01_GC,YF02_GC,HSM01_GC,PTZ01_GC,ZK01_GC,NJL01_GC,YTY01_GC,PDL01_GC
+#判断数据终端
+second: 1800
+#判断降出力
+AI110: 17.4    #叶轮转速给定
+AI178: 17.4    #转矩给定
+#AI443:容量
+
+#功率曲线拟合
+curvefitting:
+  #维度
+  dimension: 20
+  #尺度
+  scale: 0.01
+initialcode: INITIAL
+##调用区间间隔时长,需要与XXLJOB调度时长结合,保证查询区间时长大于调度时长,单位分钟
+frequency:
+  #停机
+  shutdown: 6
+  #限电
+  powerrationing: 6
+  #切入切出
+  cutinandout: 6
+
+
+
+
+
+
+
+
+
+
+

+ 1 - 1
realtime/generationXK-service/src/main/resources/application.yml

@@ -1,6 +1,6 @@
 spring:
   profiles:
-    active: rg
+    active: hf
 #    active: yun
 
 #    active: td