|
@@ -1,5 +1,8 @@
|
|
|
package com.gyee.frame.common.spring;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.alibaba.fastjson.TypeReference;
|
|
|
import com.gyee.frame.common.cache.IGlobalCache;
|
|
|
import com.gyee.frame.model.auto.*;
|
|
|
import com.gyee.frame.service.*;
|
|
@@ -36,7 +39,7 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
@Resource
|
|
|
private WindturbinepowercurvefittingService windturbinepowercurvefittingService;
|
|
|
@Resource
|
|
|
- private Warning2Service warning2Service;
|
|
|
+ private WarningService warningService;
|
|
|
@Resource
|
|
|
private ModelpowerRdService modelpowerRdService;
|
|
|
@Resource
|
|
@@ -83,12 +86,12 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
public static Map<String, Windturbine> wtmap = new HashMap<String, Windturbine>();//风机(包含光电电)
|
|
|
|
|
|
public static Map<String, Stoptype> stoptypemap = new HashMap<String, Stoptype>();//停机类型
|
|
|
- public static List<Warning2> warnls = new ArrayList<Warning2>(); // 报警LIST集合
|
|
|
- public static Map<String, Warning2> warningmap = new HashMap<String, Warning2>();// 报警MAP集合
|
|
|
+ public static List<Warning> warnls = new ArrayList<Warning>(); // 报警LIST集合
|
|
|
+ public static Map<String, Warning> warningmap = new HashMap<String, Warning>();// 报警MAP集合
|
|
|
public static List<Windturbineparts> windturbinepartsls = new ArrayList<Windturbineparts>();
|
|
|
public static Map<String, Windturbineparts> windturbinepartsmap = new HashMap<String, Windturbineparts>();
|
|
|
- public static Map<String, Map<String, List<Warning2>>> warnmodelmap = new HashMap<>();
|
|
|
- public static Map<String, List<Warning2>> warnmap = new HashMap<>();// 按照型号划分报警MAP集合 <型号,报警集合>
|
|
|
+ public static Map<String, Map<String, List<Warning>>> warnmodelmap = new HashMap<>();
|
|
|
+ public static Map<String, List<Warning>> warnmap = new HashMap<>();// 按照型号划分报警MAP集合 <型号,报警集合>
|
|
|
public static List<WarningClassify> warningClassls = new ArrayList<WarningClassify>(); //报警类型列表
|
|
|
public static Map<String, WarningClassify> warningClassifymap = new HashMap<String, WarningClassify>();
|
|
|
public static Map<String, Manufacturer> manufacturermap = new HashMap<String, Manufacturer>();
|
|
@@ -99,10 +102,10 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
public static Map<String, List<Project>> pjsmap = new HashMap<String, List<Project>>(); // 通过风场编号获得所属项目
|
|
|
public static Map<String, List<Line>> lnsmap = new HashMap<String, List<Line>>(); // 通过项目编号获得所属线路
|
|
|
public static Map<String, Map<Double, ModelpowerRd>> mprdMap = new HashMap<String, Map<Double, ModelpowerRd>>();
|
|
|
- public static Map<String, Map<String, WindTurbineTestingPointAi2>> wtPointmap = new HashMap<String, Map<String, WindTurbineTestingPointAi2>>();// 风电机测点AI表
|
|
|
- public static Map<String, Map<String, WindPowerStationTestingPoint2>> wpPointmap = new HashMap<String, Map<String, WindPowerStationTestingPoint2>>();//场站测点
|
|
|
- public static Map<String, Map<String, WindPowerStationTestingPoint2>> pjPointmap = new HashMap<String, Map<String, WindPowerStationTestingPoint2>>();//项目测点
|
|
|
- public static Map<String, Map<String, WindPowerStationTestingPoint2>> lnPointmap = new HashMap<String, Map<String, WindPowerStationTestingPoint2>>();//线路测点
|
|
|
+ public static Map<String, Map<String, WindTurbineTestingPointAi>> wtPointmap = new HashMap<String, Map<String, WindTurbineTestingPointAi>>();// 风电机测点AI表
|
|
|
+ public static Map<String, Map<String, WindPowerStationTestingPoint>> wpPointmap = new HashMap<String, Map<String, WindPowerStationTestingPoint>>();//场站测点
|
|
|
+ public static Map<String, Map<String, WindPowerStationTestingPoint>> pjPointmap = new HashMap<String, Map<String, WindPowerStationTestingPoint>>();//项目测点
|
|
|
+ public static Map<String, Map<String, WindPowerStationTestingPoint>> lnPointmap = new HashMap<String, Map<String, WindPowerStationTestingPoint>>();//线路测点
|
|
|
public static Map<String, SysQuartzJob> jobsmap = new HashMap<String, SysQuartzJob>();
|
|
|
public static Map<String, Map<Double, Windturbinepowercurvefitting>> wpcmap = new HashMap<String, Map<Double, Windturbinepowercurvefitting>>();
|
|
|
public static Map<String, Equipmentmodel> mlmap = new HashMap<String, Equipmentmodel>();// 风电机模型
|
|
@@ -121,96 +124,87 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
public void run(String... args) throws Exception {
|
|
|
System.out.println(">>>>>>>>>>>>>>>服务启动执行,换成测点关联数据 <<<<<<<<<<<<<");
|
|
|
|
|
|
-// //配置追加功率曲线测点
|
|
|
-// Map<String, Object> ycmap = new HashMap<>();
|
|
|
-//
|
|
|
-// String[] ycPoints4 = Constant.TPOINT_QS3_YGCL4.split(",");
|
|
|
-// String[] ycPoints24 = Constant.TPOINT_QS3_YGCL24.split(",");
|
|
|
-// //添加预测风速第一个点,存储到当前的历史值
|
|
|
-// ycmap.put("cdq1", "SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ001");
|
|
|
-// ycmap.put("dq1","SLFGL.NX_GD_QSF_YC_P1_L1_001_DQ0001");
|
|
|
-// //添加预测功率后续预测点字符串数组,实时数据
|
|
|
-// ycmap.put("cdq2", ycPoints4);
|
|
|
-// ycmap.put("dq2", ycPoints24);
|
|
|
-//
|
|
|
-// appendYcglMap.put("QS_FDC", ycmap);
|
|
|
-//
|
|
|
-// List< Alertrule2> alertrulels =alertrule2ervice.getAlertruleAllList();
|
|
|
-// if(!alertrulels.isEmpty())
|
|
|
-// {
|
|
|
-// for(Alertrule2 ar:alertrulels)
|
|
|
-// {
|
|
|
-// alertrulemap.put(ar.getName(),ar);
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// windturbinepartsls=windturbinepartsService.findAll();
|
|
|
-// if(!windturbinepartsls.isEmpty())
|
|
|
-// {
|
|
|
-// for(Windturbineparts wp:windturbinepartsls)
|
|
|
-// {
|
|
|
-// windturbinepartsmap.put(wp.getId(),wp);
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
-//
|
|
|
+ //配置追加功率曲线测点
|
|
|
+ Map<String, Object> ycmap = new HashMap<>();
|
|
|
+
|
|
|
+ String[] ycPoints4 = Constant.TPOINT_QS3_YGCL4.split(",");
|
|
|
+ String[] ycPoints24 = Constant.TPOINT_QS3_YGCL24.split(",");
|
|
|
+ //添加预测风速第一个点,存储到当前的历史值
|
|
|
+ ycmap.put("cdq1", "SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ001");
|
|
|
+ ycmap.put("dq1","SLFGL.NX_GD_QSF_YC_P1_L1_001_DQ0001");
|
|
|
+ //添加预测功率后续预测点字符串数组,实时数据
|
|
|
+ ycmap.put("cdq2", ycPoints4);
|
|
|
+ ycmap.put("dq2", ycPoints24);
|
|
|
+
|
|
|
+ appendYcglMap.put("QS_FDC", ycmap);
|
|
|
+
|
|
|
+ List< Alertrule2> alertrulels =alertrule2ervice.getAlertruleAllList();
|
|
|
+ if(!alertrulels.isEmpty())
|
|
|
+ {
|
|
|
+ for(Alertrule2 ar:alertrulels)
|
|
|
+ {
|
|
|
+ alertrulemap.put(ar.getName(),ar);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ windturbinepartsls=windturbinepartsService.findAll();
|
|
|
+ if(!windturbinepartsls.isEmpty())
|
|
|
+ {
|
|
|
+ for(Windturbineparts wp:windturbinepartsls)
|
|
|
+ {
|
|
|
+ windturbinepartsmap.put(wp.getId(),wp);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
-// List<TaosMap> taosls=taosMapService.findTaosMap();
|
|
|
-// if(!taosls.isEmpty())
|
|
|
-// {
|
|
|
-// for(TaosMap taos:taosls)
|
|
|
-// {
|
|
|
-// taosmap.put(taos.getStablesid(), taos.getDatabaseid());
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
|
|
|
-// List<SysQuartzJob> quartzJobs=sysQuartzJobService.selectByExample(new SysQuartzJobExample());
|
|
|
-//
|
|
|
-// if(!quartzJobs.isEmpty())
|
|
|
-// {
|
|
|
-// for(SysQuartzJob sysQuartzJob:quartzJobs){
|
|
|
-//
|
|
|
-// jobsmap.put(sysQuartzJob.getId(),sysQuartzJob);
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-// List<WindTurbineTestingPointaiyj> list = windTurbineTestingPointaiyjService.findAll();
|
|
|
-//
|
|
|
-// Map<String, WindTurbineTestingPointaiyj> yjmap = null;
|
|
|
-//
|
|
|
-// if (list != null && !list.isEmpty()) {
|
|
|
-// for (WindTurbineTestingPointaiyj mp : list) {
|
|
|
-// if (wtpAiyjmap.containsKey(mp.getWindturbineid())) {
|
|
|
-// yjmap = wtpAiyjmap.get(mp.getWindturbineid());
|
|
|
-// yjmap.put(mp.getUniformcode(), mp);
|
|
|
-// } else {
|
|
|
-// yjmap = new HashMap<String, WindTurbineTestingPointaiyj>();
|
|
|
-// yjmap.put(mp.getUniformcode(), mp);
|
|
|
-// wtpAiyjmap.put(mp.getWindturbineid(), yjmap);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// String wpString = JSON.toJSONString(globalCache.get("WP"));
|
|
|
-// wpPointmap = JSONObject.parseObject(wpString, new TypeReference<Map<String, Map<String, WindPowerStationTestingPoint2>>>() {
|
|
|
-// });
|
|
|
-// String pjString = JSON.toJSONString(globalCache.get("PJ"));
|
|
|
-// pjPointmap = JSONObject.parseObject(pjString, new TypeReference<Map<String, Map<String, WindPowerStationTestingPoint2>>>() {
|
|
|
-// });
|
|
|
-// String lnString = JSON.toJSONString(globalCache.get("LN"));
|
|
|
-// lnPointmap = JSONObject.parseObject(lnString, new TypeReference<Map<String, Map<String, WindPowerStationTestingPoint2>>>() {
|
|
|
-// });
|
|
|
-//
|
|
|
-// String wtString = JSON.toJSONString(globalCache.get("WT"));
|
|
|
-// wtPointmap = JSONObject.parseObject(wtString, new TypeReference<Map<String, Map<String, WindTurbineTestingPointAi2>>>() {
|
|
|
-// });
|
|
|
-// String wpcmapString = (String)(globalCache.get("wpcmap"));
|
|
|
-// wpcmap = JSONObject.parseObject(wpcmapString, new TypeReference<Map<String, Map<Double, Windturbinepowercurvefitting>>>() {
|
|
|
-// });
|
|
|
+
|
|
|
+ List<SysQuartzJob> quartzJobs=sysQuartzJobService.selectByExample(new SysQuartzJobExample());
|
|
|
+
|
|
|
+ if(!quartzJobs.isEmpty())
|
|
|
+ {
|
|
|
+ for(SysQuartzJob sysQuartzJob:quartzJobs){
|
|
|
+
|
|
|
+ jobsmap.put(sysQuartzJob.getId(),sysQuartzJob);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ List<WindTurbineTestingPointaiyj> list = windTurbineTestingPointaiyjService.findAll();
|
|
|
+
|
|
|
+ Map<String, WindTurbineTestingPointaiyj> yjmap = null;
|
|
|
+
|
|
|
+ if (list != null && !list.isEmpty()) {
|
|
|
+ for (WindTurbineTestingPointaiyj mp : list) {
|
|
|
+ if (wtpAiyjmap.containsKey(mp.getWindturbineid())) {
|
|
|
+ yjmap = wtpAiyjmap.get(mp.getWindturbineid());
|
|
|
+ yjmap.put(mp.getUniformcode(), mp);
|
|
|
+ } else {
|
|
|
+ yjmap = new HashMap<String, WindTurbineTestingPointaiyj>();
|
|
|
+ yjmap.put(mp.getUniformcode(), mp);
|
|
|
+ wtpAiyjmap.put(mp.getWindturbineid(), yjmap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ String wpString = JSON.toJSONString(globalCache.get("WP"));
|
|
|
+ wpPointmap = JSONObject.parseObject(wpString, new TypeReference<Map<String, Map<String, WindPowerStationTestingPoint>>>() {
|
|
|
+ });
|
|
|
+ String pjString = JSON.toJSONString(globalCache.get("PJ"));
|
|
|
+ pjPointmap = JSONObject.parseObject(pjString, new TypeReference<Map<String, Map<String, WindPowerStationTestingPoint>>>() {
|
|
|
+ });
|
|
|
+ String lnString = JSON.toJSONString(globalCache.get("LN"));
|
|
|
+ lnPointmap = JSONObject.parseObject(lnString, new TypeReference<Map<String, Map<String, WindPowerStationTestingPoint>>>() {
|
|
|
+ });
|
|
|
+
|
|
|
+ String wtString = JSON.toJSONString(globalCache.get("WT"));
|
|
|
+ wtPointmap = JSONObject.parseObject(wtString, new TypeReference<Map<String, Map<String, WindTurbineTestingPointAi>>>() {
|
|
|
+ });
|
|
|
+ String wpcmapString = (String)(globalCache.get("wpcmap"));
|
|
|
+ wpcmap = JSONObject.parseObject(wpcmapString, new TypeReference<Map<String, Map<Double, Windturbinepowercurvefitting>>>() {
|
|
|
+ });
|
|
|
|
|
|
WindpowerstationExample windpowerstationExample = new WindpowerstationExample();
|
|
|
windpowerstationExample.setOrderByClause("ordernum ASC");
|
|
@@ -292,17 +286,17 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// mprdMap = modelpowerRdService.getModelpowerRdAllMap();
|
|
|
-//
|
|
|
-// StoptypeExample stoptypeExample = new StoptypeExample();
|
|
|
-// stoptypeExample.setOrderByClause("name ASC");
|
|
|
-//
|
|
|
-// List<Stoptype> stoptypels = stoptypeService.selectByExample(stoptypeExample);
|
|
|
-// if (stoptypels != null && !stoptypels.isEmpty()) {
|
|
|
-// for (int i = 0; i < stoptypels.size(); i++) {
|
|
|
-// stoptypemap.put(stoptypels.get(i).getId(),stoptypels.get(i));
|
|
|
-// }
|
|
|
-// }
|
|
|
+ mprdMap = modelpowerRdService.getModelpowerRdAllMap();
|
|
|
+
|
|
|
+ StoptypeExample stoptypeExample = new StoptypeExample();
|
|
|
+ stoptypeExample.setOrderByClause("name ASC");
|
|
|
+
|
|
|
+ List<Stoptype> stoptypels = stoptypeService.selectByExample(stoptypeExample);
|
|
|
+ if (stoptypels != null && !stoptypels.isEmpty()) {
|
|
|
+ for (int i = 0; i < stoptypels.size(); i++) {
|
|
|
+ stoptypemap.put(stoptypels.get(i).getId(),stoptypels.get(i));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
// WindturbinepowercurvefittingExample windturbinepowercurvefittingExample=new WindturbinepowercurvefittingExample();
|
|
|
// windturbinepowercurvefittingExample.setOrderByClause("WINDTURBINEID ASC,speed ASC");
|
|
@@ -320,94 +314,94 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
-//
|
|
|
-// Warning2Example warning2Example = new Warning2Example();
|
|
|
-// warning2Example.setOrderByClause("id ASC");
|
|
|
-//
|
|
|
-// Warning2Example.Criteria criteria = warning2Example.createCriteria();
|
|
|
-// criteria.andEdnavalueNotEqualTo(0);
|
|
|
-// criteria.andWarningclassifyidIsNotNull();
|
|
|
-// warnls = warning2Service.selectByExample(warning2Example);
|
|
|
-//
|
|
|
-// if (warnls != null && !warnls.isEmpty()) {
|
|
|
-// for (int i = 0; i < warnls.size(); i++) {
|
|
|
-// Warning2 warning = warnls.get(i);
|
|
|
-//
|
|
|
-// if (warnmodelmap.containsKey(warning.getModelid())) {
|
|
|
-// Map<String, List<Warning2>> map = warnmodelmap.get(warning.getModelid());
|
|
|
-// if(map.containsKey(warning.getWarningclassifyid()))
|
|
|
-// {
|
|
|
-// List<Warning2> ls =map.get(warning.getWarningclassifyid());
|
|
|
-// ls.add(warning);
|
|
|
-// map.put(warning.getWarningclassifyid(), ls);
|
|
|
-// }else
|
|
|
-// {
|
|
|
-// List<Warning2> ls = new ArrayList<>();
|
|
|
-// ls.add(warning);
|
|
|
-// map.put(warning.getWarningclassifyid(), ls);
|
|
|
-// }
|
|
|
-// warnmodelmap.put(warning.getModelid(),map);
|
|
|
-// } else {
|
|
|
-// Map<String, List<Warning2>> map = new HashMap<>();
|
|
|
-// List<Warning2> ls = new ArrayList<>();
|
|
|
-// ls.add(warning);
|
|
|
-// map.put(warning.getWarningclassifyid(), ls);
|
|
|
-// warnmodelmap.put(warning.getModelid(),map);
|
|
|
-// }
|
|
|
-//
|
|
|
-// if (warnmap.containsKey(warning.getModelid())) {
|
|
|
-// List<Warning2> ls =warnmap.get(warning.getModelid());
|
|
|
-// ls.add(warning);
|
|
|
-// warnmap.put(warning.getModelid(),ls);
|
|
|
-// } else {
|
|
|
-// List<Warning2> ls =new ArrayList<>();
|
|
|
-// ls.add(warning);
|
|
|
-// warnmap.put(warning.getModelid(),ls);
|
|
|
-// }
|
|
|
-//
|
|
|
-// warningmap.put(warning.getId(), warning);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// if (wtallls != null && !wtallls.isEmpty()) {
|
|
|
-//
|
|
|
-// for (int i = 0; i < wtallls.size(); i++) {
|
|
|
-//
|
|
|
-// Windturbine point = wtallls.get(i);
|
|
|
-// if (wp_wtmap.containsKey(point.getWindpowerstationid())) {
|
|
|
-// List<Windturbine> ls = wp_wtmap.get(point.getWindpowerstationid());
|
|
|
-// ls.add(point);
|
|
|
-// wp_wtmap.put(point.getWindpowerstationid(), ls);
|
|
|
-// } else {
|
|
|
-// List<Windturbine> ls = new ArrayList();
|
|
|
-// ls.add(point);
|
|
|
-// wp_wtmap.put(point.getWindpowerstationid(), ls);
|
|
|
-// }
|
|
|
-//
|
|
|
-// if (pj_wtmap.containsKey(point.getProjectid())) {
|
|
|
-// List<Windturbine> ls = pj_wtmap.get(point.getProjectid());
|
|
|
-// ls.add(point);
|
|
|
-// pj_wtmap.put(point.getProjectid(), ls);
|
|
|
-// } else {
|
|
|
-// List<Windturbine> ls = new ArrayList();
|
|
|
-// ls.add(point);
|
|
|
-// pj_wtmap.put(point.getProjectid(), ls);
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-// if (ln_wtmap.containsKey(point.getLineid())) {
|
|
|
-// List<Windturbine> ls = ln_wtmap.get(point.getLineid());
|
|
|
-// ls.add(point);
|
|
|
-// ln_wtmap.put(point.getLineid(), ls);
|
|
|
-// } else {
|
|
|
-// List<Windturbine> ls = new ArrayList();
|
|
|
-// ls.add(point);
|
|
|
-// ln_wtmap.put(point.getLineid(), ls);
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-// }
|
|
|
+
|
|
|
+ WarningExample warningExample = new WarningExample();
|
|
|
+ warningExample.setOrderByClause("id ASC");
|
|
|
+
|
|
|
+ WarningExample.Criteria criteria = warningExample.createCriteria();
|
|
|
+ criteria.andEdnavalueNotEqualTo(0);
|
|
|
+ criteria.andWarningclassifyidIsNotNull();
|
|
|
+ warnls = warningService.selectByExample(warningExample);
|
|
|
+
|
|
|
+ if (warnls != null && !warnls.isEmpty()) {
|
|
|
+ for (int i = 0; i < warnls.size(); i++) {
|
|
|
+ Warning warning = warnls.get(i);
|
|
|
+
|
|
|
+ if (warnmodelmap.containsKey(warning.getModelid())) {
|
|
|
+ Map<String, List<Warning>> map = warnmodelmap.get(warning.getModelid());
|
|
|
+ if(map.containsKey(warning.getWarningclassifyid()))
|
|
|
+ {
|
|
|
+ List<Warning> ls =map.get(warning.getWarningclassifyid());
|
|
|
+ ls.add(warning);
|
|
|
+ map.put(warning.getWarningclassifyid(), ls);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ List<Warning> ls = new ArrayList<>();
|
|
|
+ ls.add(warning);
|
|
|
+ map.put(warning.getWarningclassifyid(), ls);
|
|
|
+ }
|
|
|
+ warnmodelmap.put(warning.getModelid(),map);
|
|
|
+ } else {
|
|
|
+ Map<String, List<Warning>> map = new HashMap<>();
|
|
|
+ List<Warning> ls = new ArrayList<>();
|
|
|
+ ls.add(warning);
|
|
|
+ map.put(warning.getWarningclassifyid(), ls);
|
|
|
+ warnmodelmap.put(warning.getModelid(),map);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (warnmap.containsKey(warning.getModelid())) {
|
|
|
+ List<Warning> ls =warnmap.get(warning.getModelid());
|
|
|
+ ls.add(warning);
|
|
|
+ warnmap.put(warning.getModelid(),ls);
|
|
|
+ } else {
|
|
|
+ List<Warning> ls =new ArrayList<>();
|
|
|
+ ls.add(warning);
|
|
|
+ warnmap.put(warning.getModelid(),ls);
|
|
|
+ }
|
|
|
+
|
|
|
+ warningmap.put(warning.getId(), warning);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (wtallls != null && !wtallls.isEmpty()) {
|
|
|
+
|
|
|
+ for (int i = 0; i < wtallls.size(); i++) {
|
|
|
+
|
|
|
+ Windturbine point = wtallls.get(i);
|
|
|
+ if (wp_wtmap.containsKey(point.getWindpowerstationid())) {
|
|
|
+ List<Windturbine> ls = wp_wtmap.get(point.getWindpowerstationid());
|
|
|
+ ls.add(point);
|
|
|
+ wp_wtmap.put(point.getWindpowerstationid(), ls);
|
|
|
+ } else {
|
|
|
+ List<Windturbine> ls = new ArrayList();
|
|
|
+ ls.add(point);
|
|
|
+ wp_wtmap.put(point.getWindpowerstationid(), ls);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (pj_wtmap.containsKey(point.getProjectid())) {
|
|
|
+ List<Windturbine> ls = pj_wtmap.get(point.getProjectid());
|
|
|
+ ls.add(point);
|
|
|
+ pj_wtmap.put(point.getProjectid(), ls);
|
|
|
+ } else {
|
|
|
+ List<Windturbine> ls = new ArrayList();
|
|
|
+ ls.add(point);
|
|
|
+ pj_wtmap.put(point.getProjectid(), ls);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (ln_wtmap.containsKey(point.getLineid())) {
|
|
|
+ List<Windturbine> ls = ln_wtmap.get(point.getLineid());
|
|
|
+ ls.add(point);
|
|
|
+ ln_wtmap.put(point.getLineid(), ls);
|
|
|
+ } else {
|
|
|
+ List<Windturbine> ls = new ArrayList();
|
|
|
+ ls.add(point);
|
|
|
+ ln_wtmap.put(point.getLineid(), ls);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
//
|
|
|
|
|
|
// WindPowerStationTestingPoint2Example windPowerstationTestingPointExample=new WindPowerStationTestingPoint2Example();
|
|
@@ -457,43 +451,43 @@ public class InitialRunner implements CommandLineRunner {
|
|
|
mlmap.put(model.getId(), model);
|
|
|
}
|
|
|
}
|
|
|
-//
|
|
|
-// WarningClassifyExample wcexample = new WarningClassifyExample();
|
|
|
-// warningClassls = warningClassifyService.selectByExample(wcexample);
|
|
|
-// if (!warningClassls.isEmpty()) {
|
|
|
-// for (WarningClassify model : warningClassls) {
|
|
|
-// warningClassifymap.put(model.getId(), model);
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// ManufacturerExample mfexample = new ManufacturerExample();
|
|
|
-// List<Manufacturer> mfls = manufacturerService.selectByExample(mfexample);
|
|
|
-// if (!mfls.isEmpty()) {
|
|
|
-// for (Manufacturer model : mfls) {
|
|
|
-// manufacturermap.put(model.getId(), model);
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// ModelPowerExample mpexample = new ModelPowerExample();
|
|
|
-// List<ModelPower> mpls = modelPowerService.selectByExample(mpexample);
|
|
|
-// if (!mpls.isEmpty()) {
|
|
|
-//
|
|
|
-// Map<String, ModelPower> mpmap = null;
|
|
|
-//
|
|
|
-// if (mpls != null && !mpls.isEmpty()) {
|
|
|
-// for (ModelPower mp : mpls) {
|
|
|
-// if (modelPowermap.containsKey(mp.getModelid())) {
|
|
|
-// mpmap = modelPowermap.get(mp.getModelid());
|
|
|
-// mpmap.put(String.valueOf(mp.getSpeed().doubleValue()), mp);
|
|
|
-// } else {
|
|
|
-// mpmap = new HashMap<String, ModelPower>();
|
|
|
-// mpmap.put(String.valueOf(mp.getSpeed().doubleValue()), mp);
|
|
|
-// modelPowermap.put(mp.getModelid(), mpmap);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
- // wppointnummap= windPowerstationTestingPoint2Service.getWpPointTotal();
|
|
|
+
|
|
|
+ WarningClassifyExample wcexample = new WarningClassifyExample();
|
|
|
+ warningClassls = warningClassifyService.selectByExample(wcexample);
|
|
|
+ if (!warningClassls.isEmpty()) {
|
|
|
+ for (WarningClassify model : warningClassls) {
|
|
|
+ warningClassifymap.put(model.getId(), model);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ ManufacturerExample mfexample = new ManufacturerExample();
|
|
|
+ List<Manufacturer> mfls = manufacturerService.selectByExample(mfexample);
|
|
|
+ if (!mfls.isEmpty()) {
|
|
|
+ for (Manufacturer model : mfls) {
|
|
|
+ manufacturermap.put(model.getId(), model);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ ModelPowerExample mpexample = new ModelPowerExample();
|
|
|
+ List<ModelPower> mpls = modelPowerService.selectByExample(mpexample);
|
|
|
+ if (!mpls.isEmpty()) {
|
|
|
+
|
|
|
+ Map<String, ModelPower> mpmap = null;
|
|
|
+
|
|
|
+ if (mpls != null && !mpls.isEmpty()) {
|
|
|
+ for (ModelPower mp : mpls) {
|
|
|
+ if (modelPowermap.containsKey(mp.getModelid())) {
|
|
|
+ mpmap = modelPowermap.get(mp.getModelid());
|
|
|
+ mpmap.put(String.valueOf(mp.getSpeed().doubleValue()), mp);
|
|
|
+ } else {
|
|
|
+ mpmap = new HashMap<String, ModelPower>();
|
|
|
+ mpmap.put(String.valueOf(mp.getSpeed().doubleValue()), mp);
|
|
|
+ modelPowermap.put(mp.getModelid(), mpmap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ wppointnummap= windPowerstationTestingPoint2Service.getWpPointTotal();
|
|
|
}
|
|
|
|
|
|
}
|