|
@@ -0,0 +1,730 @@
|
|
|
+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.*;
|
|
|
+import com.gyee.frame.service.photovolatic.*;
|
|
|
+import org.springframework.boot.CommandLineRunner;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+
|
|
|
+ * 服务启动前执行,进行全局变量初始化
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class InitialRunner implements CommandLineRunner {
|
|
|
+
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private SysQuartzJobService sysQuartzJobService;
|
|
|
+ @Resource
|
|
|
+ private WindpowerstationService windpowerstationService;
|
|
|
+ @Resource
|
|
|
+ private ProjectService projectService;
|
|
|
+ @Resource
|
|
|
+ private LineService lineService;
|
|
|
+ @Resource
|
|
|
+ private WindturbineService windturbineService;
|
|
|
+ @Resource
|
|
|
+ private WindPowerstationTestingPoint2Service windPowerstationTestingPoint2Service;
|
|
|
+ @Resource
|
|
|
+ private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
|
|
|
+ @Resource
|
|
|
+ private WindturbinepowercurvefittingService windturbinepowercurvefittingService;
|
|
|
+ @Resource
|
|
|
+ private WarningService warningService;
|
|
|
+ @Resource
|
|
|
+ private ModelpowerRdService modelpowerRdService;
|
|
|
+ @Resource
|
|
|
+ private EquipmentmodelService equipmentmodelService;
|
|
|
+ @Resource
|
|
|
+ private WarningClassifyService warningClassifyService;
|
|
|
+ @Resource
|
|
|
+ private ManufacturerService manufacturerService;
|
|
|
+ @Resource
|
|
|
+ private ModelPowerService modelPowerService;
|
|
|
+ @Resource
|
|
|
+ private IGlobalCache globalCache;
|
|
|
+ @Resource
|
|
|
+ private StoptypeService stoptypeService;
|
|
|
+
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private WindTurbineTestingPointaiyjService windTurbineTestingPointaiyjService;
|
|
|
+ @Resource
|
|
|
+ private Alertrule2ervice alertrule2ervice;
|
|
|
+ @Resource
|
|
|
+ private WindturbinepartsService windturbinepartsService;
|
|
|
+ @Resource
|
|
|
+ private SquareService squareService;
|
|
|
+ @Resource
|
|
|
+ private InverterService inverterService;
|
|
|
+ @Resource
|
|
|
+ private BoxChangeService boxChangeService;
|
|
|
+ @Resource
|
|
|
+ private JunctionboxService junctionboxService;
|
|
|
+ @Resource
|
|
|
+ private PhotovoltaicTestingPointNewService photovoltaicTestingPointNewService;
|
|
|
+ public static List<Windpowerstation> wpallls = new ArrayList<Windpowerstation>();
|
|
|
+ public static List<Project> pjallls = new ArrayList<Project>();
|
|
|
+ public static List<Line> lineallls = new ArrayList<Line>();
|
|
|
+ public static List<Windturbine> wtallls = new ArrayList<Windturbine>();
|
|
|
+
|
|
|
+ public static List<Windpowerstation> wpls = new ArrayList<Windpowerstation>();
|
|
|
+ public static List<Windpowerstation> spls = new ArrayList<Windpowerstation>();
|
|
|
+
|
|
|
+ public static List<Project> pjls = new ArrayList<Project>();
|
|
|
+ public static List<Line> linels = new ArrayList<Line>();
|
|
|
+ public static List<Windturbine> wtls = new ArrayList<Windturbine>();
|
|
|
+
|
|
|
+ public static List< Alertrule2> alertrulels = new ArrayList< Alertrule2>();
|
|
|
+
|
|
|
+
|
|
|
+ public static Map<String, Alertrule2> alertrulemap = new HashMap<String, Alertrule2>();
|
|
|
+
|
|
|
+ public static Map<String, Windpowerstation> wpmap = new HashMap<String, Windpowerstation>();
|
|
|
+ public static Map<String, Project> pjmap = new HashMap<String, Project>();
|
|
|
+ public static Map<String, Line> lnmap = new HashMap<String, Line>();
|
|
|
+ public static Map<String, Windturbine> wtmap = new HashMap<String, Windturbine>();
|
|
|
+ public static Map<String, List<Windpowerstation>> re_wpmap = new HashMap<String, List<Windpowerstation>>();
|
|
|
+ public static Map<String, Stoptype> stoptypemap = new HashMap<String, Stoptype>();
|
|
|
+ public static List<Warning2> warnls = new ArrayList<Warning2>();
|
|
|
+ public static Map<String, Warning2> warningmap = new HashMap<String, Warning2>();
|
|
|
+ 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<>();
|
|
|
+ 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>();
|
|
|
+
|
|
|
+ public static Map<String, List<Windturbine>> wp_wtmap = new HashMap<String, List<Windturbine>>();
|
|
|
+ public static Map<String, List<Windturbine>> pj_wtmap = new HashMap<String, List<Windturbine>>();
|
|
|
+ public static Map<String, List<Windturbine>> ln_wtmap = new HashMap<String, List<Windturbine>>();
|
|
|
+ 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, Windturbinetestingpointnew>> wtPointmap = new HashMap<String, Map<String, Windturbinetestingpointnew>>();
|
|
|
+
|
|
|
+ public static Map<String, Map<String, Windpowerstationpointnew>> wpPointmap = new HashMap<String, Map<String, Windpowerstationpointnew>>();
|
|
|
+ public static Map<String, Map<String, Windpowerstationpointnew>> pjPointmap = new HashMap<String, Map<String, Windpowerstationpointnew>>();
|
|
|
+ public static Map<String, Map<String, Windpowerstationpointnew>> lnPointmap = new HashMap<String, Map<String, Windpowerstationpointnew>>();
|
|
|
+ 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>();
|
|
|
+ public static Map<String, Map<String, ModelPower>> modelPowermap = new HashMap<String, Map<String, ModelPower>>();
|
|
|
+ public static Map<String, String> taosmap = new HashMap<String, String>();
|
|
|
+ public static Map<String, Map<String, WindTurbineTestingPointaiyj>> wtpAiyjmap = new HashMap<String, Map<String, WindTurbineTestingPointaiyj>>();
|
|
|
+ public static Map<String, Map<String, Object>> appendYcglMap = new HashMap<String, Map<String, Object>>();
|
|
|
+
|
|
|
+
|
|
|
+ public static Map<String,Integer> wppointnummap=new HashMap<>();
|
|
|
+ Map<String, Object> ycmap = new HashMap<>();
|
|
|
+
|
|
|
+ private final String QS = "0";
|
|
|
+ private final String FD = "-1";
|
|
|
+ private final String GF = "-2";
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public static Map<String,Square> sqmap = new HashMap<String, Square>();
|
|
|
+
|
|
|
+
|
|
|
+ public static Map<String, List<BoxChange>> gp_xbmap = new HashMap<String, List<BoxChange>>();
|
|
|
+ public static Map<String,BoxChange> xbmap = new HashMap<String, BoxChange>();
|
|
|
+ public static Map<String, List<Inverter>> gp_nbqmap = new HashMap<String, List<Inverter>>();
|
|
|
+ public static Map<String, List<Inverter>> pj_nbqmap = new HashMap<String, List<Inverter>>();
|
|
|
+ public static Map<String, List<Inverter>> ln_nbqmap = new HashMap<String, List<Inverter>>();
|
|
|
+ public static Map<String, List<Inverter>> sq_nbqmap = new HashMap<String, List<Inverter>>();
|
|
|
+ public static Map<String,Inverter> nbqmap = new HashMap<String, Inverter>();
|
|
|
+ public static Map<String, List<Junctionbox>> gp_hlxmap = new HashMap<String, List<Junctionbox>>();
|
|
|
+ public static Map<String,Junctionbox> hlxmap = new HashMap<String, Junctionbox>();
|
|
|
+ public static Map<String, Map<String, PhotovoltaicTestingPointNew>> phPointmap = new HashMap<String, Map<String, PhotovoltaicTestingPointNew>>();
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ 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("PRODUCT-WP"));
|
|
|
+ wpPointmap = JSONObject.parseObject(wpString, new TypeReference<Map<String, Map<String, Windpowerstationpointnew>>>() {
|
|
|
+ });
|
|
|
+ String pjString = JSON.toJSONString(globalCache.get("PRODUCT-PJ"));
|
|
|
+ pjPointmap = JSONObject.parseObject(pjString, new TypeReference<Map<String, Map<String, Windpowerstationpointnew>>>() {
|
|
|
+ });
|
|
|
+ String lnString = JSON.toJSONString(globalCache.get("PRODUCT-LN"));
|
|
|
+ lnPointmap = JSONObject.parseObject(lnString, new TypeReference<Map<String, Map<String, Windpowerstationpointnew>>>() {
|
|
|
+ });
|
|
|
+
|
|
|
+ String wtString = JSON.toJSONString(globalCache.get("PRODUCT-WT"));
|
|
|
+ wtPointmap = JSONObject.parseObject(wtString, new TypeReference<Map<String, Map<String, Windturbinetestingpointnew>>>() {
|
|
|
+ });
|
|
|
+ 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");
|
|
|
+
|
|
|
+ wpallls = windpowerstationService.selectByExample(windpowerstationExample);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (!wpallls.isEmpty()) {
|
|
|
+ for (Windpowerstation wp : wpallls) {
|
|
|
+ if (wp.getId().endsWith("FDC")) {
|
|
|
+ wpls.add(wp);
|
|
|
+ }
|
|
|
+ if (wp.getId().endsWith("GDC")) {
|
|
|
+ spls.add(wp);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(re_wpmap.containsKey(wp.getCompanyid()+QS))
|
|
|
+ {
|
|
|
+ List<Windpowerstation> ls=re_wpmap.get(wp.getCompanyid()+QS);
|
|
|
+ ls.add(wp);
|
|
|
+ re_wpmap.put(wp.getCompanyid()+QS,ls);
|
|
|
+ }else {
|
|
|
+ List<Windpowerstation> ls=new ArrayList<>();
|
|
|
+ ls.add(wp);
|
|
|
+ re_wpmap.put(wp.getCompanyid()+QS,ls);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if(re_wpmap.containsKey(wp.getCompanyid()+FD))
|
|
|
+ {
|
|
|
+ List<Windpowerstation> ls=re_wpmap.get(wp.getCompanyid()+FD);
|
|
|
+ if(wp.getId().endsWith("FDC"))
|
|
|
+ {
|
|
|
+ ls.add(wp);
|
|
|
+ re_wpmap.put(wp.getCompanyid()+FD,ls);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ List<Windpowerstation> ls=new ArrayList<>();
|
|
|
+ if(wp.getId().endsWith("FDC"))
|
|
|
+ {
|
|
|
+ ls.add(wp);
|
|
|
+ re_wpmap.put(wp.getCompanyid()+FD,ls);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(re_wpmap.containsKey(wp.getCompanyid()+GF))
|
|
|
+ {
|
|
|
+ List<Windpowerstation> ls=re_wpmap.get(wp.getCompanyid()+GF);
|
|
|
+ if(wp.getId().endsWith("GDC"))
|
|
|
+ {
|
|
|
+ ls.add(wp);
|
|
|
+ re_wpmap.put(wp.getCompanyid()+GF,ls);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ List<Windpowerstation> ls=new ArrayList<>();
|
|
|
+ if(wp.getId().endsWith("GDC"))
|
|
|
+ {
|
|
|
+ ls.add(wp);
|
|
|
+ re_wpmap.put(wp.getCompanyid()+GF,ls);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ wpmap.put(wp.getId(), wp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ ProjectExample projectExample = new ProjectExample();
|
|
|
+ projectExample.setOrderByClause("ordernum ASC");
|
|
|
+
|
|
|
+ pjallls = projectService.selectByExample(projectExample);
|
|
|
+
|
|
|
+ if (!pjallls.isEmpty()) {
|
|
|
+ for (Project pj : pjallls) {
|
|
|
+ pjmap.put(pj.getId(), pj);
|
|
|
+ if (pj.getWindpowerstationid().endsWith("FDC")) {
|
|
|
+ pjls.add(pj);
|
|
|
+ }
|
|
|
+ if (pjsmap.containsKey(pj.getWindpowerstationid())) {
|
|
|
+ List<Project> pjls = pjsmap.get(pj.getWindpowerstationid());
|
|
|
+ pjls.add(pj);
|
|
|
+ pjsmap.put(pj.getWindpowerstationid(), pjls);
|
|
|
+ } else {
|
|
|
+ List<Project> pjls = new ArrayList<Project>();
|
|
|
+ pjls.add(pj);
|
|
|
+ pjsmap.put(pj.getWindpowerstationid(), pjls);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ LineExample lineExample = new LineExample();
|
|
|
+ lineExample.setOrderByClause("ordernum ASC");
|
|
|
+ lineExample.createCriteria().getAllCriteria();
|
|
|
+ lineallls = lineService.selectByExample(lineExample);
|
|
|
+
|
|
|
+ if (!lineallls.isEmpty()) {
|
|
|
+ for (Line ln : lineallls) {
|
|
|
+ lnmap.put(ln.getId(), ln);
|
|
|
+ if (pjmap.containsKey(ln.getProjectid())) {
|
|
|
+ Project pj = pjmap.get(ln.getProjectid());
|
|
|
+ if (pj.getWindpowerstationid().endsWith("FDC")) {
|
|
|
+ linels.add(ln);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (lnsmap.containsKey(ln.getProjectid())) {
|
|
|
+ List<Line> lnls = lnsmap.get(ln.getProjectid());
|
|
|
+ lnls.add(ln);
|
|
|
+ lnsmap.put(ln.getProjectid(), lnls);
|
|
|
+ } else {
|
|
|
+ List<Line> lnls = new ArrayList<Line>();
|
|
|
+ lnls.add(ln);
|
|
|
+ lnsmap.put(ln.getProjectid(), lnls);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ WindturbineExample windturbineExample = new WindturbineExample();
|
|
|
+ windturbineExample.setOrderByClause("ID ASC");
|
|
|
+
|
|
|
+ wtallls = windturbineService.selectByExample(windturbineExample);
|
|
|
+
|
|
|
+ if (!wtallls.isEmpty()) {
|
|
|
+ for (Windturbine wt : wtallls) {
|
|
|
+ if (wpmap.containsKey(wt.getWindpowerstationid())) {
|
|
|
+ if (wt.getWindpowerstationid().endsWith("FDC")) {
|
|
|
+ wtls.add(wt);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ wtmap.put(wt.getId(), wt);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ 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));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ Warning2Example warningExample = new Warning2Example();
|
|
|
+ warningExample.setOrderByClause("id ASC");
|
|
|
+
|
|
|
+ Warning2Example.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++) {
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ EquipmentmodelExample example = new EquipmentmodelExample();
|
|
|
+ List<Equipmentmodel> mlls = equipmentmodelService.selectByExample(example);
|
|
|
+ if (!mlls.isEmpty()) {
|
|
|
+ for (Equipmentmodel model : mlls) {
|
|
|
+ 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();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|