|
@@ -2,7 +2,6 @@ package com.gyee.frame.common.spring;
|
|
|
|
|
|
import com.gyee.frame.model.auto.*;
|
|
import com.gyee.frame.model.auto.*;
|
|
import com.gyee.frame.service.*;
|
|
import com.gyee.frame.service.*;
|
|
-import com.gyee.frame.util.StringUtils;
|
|
|
|
import org.springframework.boot.CommandLineRunner;
|
|
import org.springframework.boot.CommandLineRunner;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
@@ -57,56 +56,56 @@ public class InitialRunner implements CommandLineRunner {
|
|
public void run(String... args) throws Exception {
|
|
public void run(String... args) throws Exception {
|
|
//System.out.println(">>>>>>>>>>>>>>>服务启动执行,换成测点关联数据 <<<<<<<<<<<<<");
|
|
//System.out.println(">>>>>>>>>>>>>>>服务启动执行,换成测点关联数据 <<<<<<<<<<<<<");
|
|
|
|
|
|
- List<SysQuartzJob> quartzJobs=sysQuartzJobService.selectByExample(new SysQuartzJobExample());
|
|
|
|
-
|
|
|
|
- if(!quartzJobs.isEmpty())
|
|
|
|
- {
|
|
|
|
- for(SysQuartzJob sysQuartzJob:quartzJobs){
|
|
|
|
-
|
|
|
|
- jobsmap.put(sysQuartzJob.getId(),sysQuartzJob);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- WindpowerstationExample windpowerstationExample=new WindpowerstationExample();
|
|
|
|
- windpowerstationExample.setOrderByClause("ordernum ASC");
|
|
|
|
-// windpowerstationExample.createCriteria().andIdNotLike("%MCH%");
|
|
|
|
- wpallls= windpowerstationService.selectByExample(windpowerstationExample);
|
|
|
|
- if(!wpallls.isEmpty())
|
|
|
|
- {
|
|
|
|
- for(Windpowerstation wp:wpallls)
|
|
|
|
- {
|
|
|
|
- wpmap.put(wp.getId(),wp);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- windpowerstationExample=new WindpowerstationExample();
|
|
|
|
- windpowerstationExample.setOrderByClause("ordernum ASC");
|
|
|
|
- windpowerstationExample.createCriteria().andIdNotLike("%GDC");
|
|
|
|
- wpls= windpowerstationService.selectByExample(windpowerstationExample);
|
|
|
|
-
|
|
|
|
- ProjectExample projectExample=new ProjectExample();
|
|
|
|
- projectExample.setOrderByClause("ordernum ASC");
|
|
|
|
- projectExample.createCriteria().andWindpowerstationidNotLike("%GDC");
|
|
|
|
- pjls= projectService.selectByExample(projectExample);
|
|
|
|
-
|
|
|
|
- LineExample lineExample=new LineExample();
|
|
|
|
- lineExample.setOrderByClause("ordernum ASC");
|
|
|
|
- lineExample.createCriteria().getAllCriteria();
|
|
|
|
- lnls= lineService.selectByExample(lineExample);
|
|
|
|
-
|
|
|
|
- WindturbineExample windturbineExample=new WindturbineExample();
|
|
|
|
- windturbineExample.setOrderByClause("id ASC");
|
|
|
|
- windturbineExample.createCriteria().andWindpowerstationidNotLike("%GDC");
|
|
|
|
- wtls= windturbineService.selectByExample(windturbineExample);
|
|
|
|
-
|
|
|
|
- if(!wtls.isEmpty())
|
|
|
|
- {
|
|
|
|
- for(Windturbine wt:wtls)
|
|
|
|
- {
|
|
|
|
- wtmap.put(wt.getId(),wt);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+// List<SysQuartzJob> quartzJobs=sysQuartzJobService.selectByExample(new SysQuartzJobExample());
|
|
|
|
+//
|
|
|
|
+// if(!quartzJobs.isEmpty())
|
|
|
|
+// {
|
|
|
|
+// for(SysQuartzJob sysQuartzJob:quartzJobs){
|
|
|
|
+//
|
|
|
|
+// jobsmap.put(sysQuartzJob.getId(),sysQuartzJob);
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// WindpowerstationExample windpowerstationExample=new WindpowerstationExample();
|
|
|
|
+// windpowerstationExample.setOrderByClause("ordernum ASC");
|
|
|
|
+//// windpowerstationExample.createCriteria().andIdNotLike("%MCH%");
|
|
|
|
+// wpallls= windpowerstationService.selectByExample(windpowerstationExample);
|
|
|
|
+// if(!wpallls.isEmpty())
|
|
|
|
+// {
|
|
|
|
+// for(Windpowerstation wp:wpallls)
|
|
|
|
+// {
|
|
|
|
+// wpmap.put(wp.getId(),wp);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// windpowerstationExample=new WindpowerstationExample();
|
|
|
|
+// windpowerstationExample.setOrderByClause("ordernum ASC");
|
|
|
|
+// windpowerstationExample.createCriteria().andIdNotLike("%GDC");
|
|
|
|
+// wpls= windpowerstationService.selectByExample(windpowerstationExample);
|
|
|
|
+//
|
|
|
|
+// ProjectExample projectExample=new ProjectExample();
|
|
|
|
+// projectExample.setOrderByClause("ordernum ASC");
|
|
|
|
+// projectExample.createCriteria().andWindpowerstationidNotLike("%GDC");
|
|
|
|
+// pjls= projectService.selectByExample(projectExample);
|
|
|
|
+//
|
|
|
|
+// LineExample lineExample=new LineExample();
|
|
|
|
+// lineExample.setOrderByClause("ordernum ASC");
|
|
|
|
+// lineExample.createCriteria().getAllCriteria();
|
|
|
|
+// lnls= lineService.selectByExample(lineExample);
|
|
|
|
+//
|
|
|
|
+// WindturbineExample windturbineExample=new WindturbineExample();
|
|
|
|
+// windturbineExample.setOrderByClause("id ASC");
|
|
|
|
+// windturbineExample.createCriteria().andWindpowerstationidNotLike("%GDC");
|
|
|
|
+// wtls= windturbineService.selectByExample(windturbineExample);
|
|
|
|
+//
|
|
|
|
+// if(!wtls.isEmpty())
|
|
|
|
+// {
|
|
|
|
+// for(Windturbine wt:wtls)
|
|
|
|
+// {
|
|
|
|
+// wtmap.put(wt.getId(),wt);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
|
|
// WindturbinepowercurvefittingExample windturbinepowercurvefittingExample=new WindturbinepowercurvefittingExample();
|
|
// WindturbinepowercurvefittingExample windturbinepowercurvefittingExample=new WindturbinepowercurvefittingExample();
|
|
// windturbinepowercurvefittingExample.setOrderByClause("WINDTURBINEID ASC,speed ASC");
|
|
// windturbinepowercurvefittingExample.setOrderByClause("WINDTURBINEID ASC,speed ASC");
|
|
@@ -126,109 +125,109 @@ public class InitialRunner implements CommandLineRunner {
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
|
|
- if(wtls!=null && !wtls.isEmpty()){
|
|
|
|
-
|
|
|
|
- for(int i=0;i<wtls.size();i++){
|
|
|
|
-
|
|
|
|
- Windturbine point=wtls.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);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- List<Windturbine> ls=wp_wtmap.get("SBQ_FDC");
|
|
|
|
- List<Windturbine> temp1=new ArrayList<>();
|
|
|
|
- List<Windturbine> temp2=new ArrayList<>();
|
|
|
|
- for(Windturbine wt:ls)
|
|
|
|
- {
|
|
|
|
- String str=wt.getId().substring(wt.getId().length()-3,wt.getId().length());
|
|
|
|
- if(StringUtils.isNumeric(str))
|
|
|
|
- {
|
|
|
|
- temp2.add(wt);
|
|
|
|
- }else
|
|
|
|
- {
|
|
|
|
- temp1.add(wt);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- ls.clear();
|
|
|
|
- ls.addAll(temp1);
|
|
|
|
- ls.addAll(temp2);
|
|
|
|
- wp_wtmap.put("SBQ_FDC",ls);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- WindPowerStationTestingPoint2Example windPowerstationTestingPointExample=new WindPowerStationTestingPoint2Example();
|
|
|
|
- windPowerstationTestingPointExample.createCriteria().getAllCriteria();
|
|
|
|
- List<WindPowerStationTestingPoint2> wpPointlist= windPowerstationTestingPointService.selectByExample(windPowerstationTestingPointExample);
|
|
|
|
-
|
|
|
|
- Map<String,WindPowerStationTestingPoint2> items=null;
|
|
|
|
- if(wpPointlist!=null && !wpPointlist.isEmpty()){
|
|
|
|
- for(int i=0;i<wpPointlist.size();i++){
|
|
|
|
- WindPowerStationTestingPoint2 point=wpPointlist.get(i);
|
|
|
|
- if(stationPointmap.containsKey(point.getWindpowerstationid())){
|
|
|
|
- items=stationPointmap.get(point.getWindpowerstationid());
|
|
|
|
- items.put(point.getUniformcode(), point);
|
|
|
|
- }
|
|
|
|
- else{
|
|
|
|
- items=new HashMap<String,WindPowerStationTestingPoint2>();
|
|
|
|
- stationPointmap.put(point.getWindpowerstationid(), items);
|
|
|
|
- items.put(point.getUniformcode(), point);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- WindTurbineTestingPointAi2Example windTurbineTestingPointAiExample=new WindTurbineTestingPointAi2Example();
|
|
|
|
- windTurbineTestingPointAiExample.createCriteria().getAllCriteria();
|
|
|
|
- List<WindTurbineTestingPointAi2> wtAilist= windTurbineTestingPointAiService.selectByExample(windTurbineTestingPointAiExample);
|
|
|
|
-
|
|
|
|
- Map<String, WindTurbineTestingPointAi2> map = null;
|
|
|
|
-
|
|
|
|
- if(wtAilist != null && !wtAilist.isEmpty()){
|
|
|
|
- for(WindTurbineTestingPointAi2 mp : wtAilist){
|
|
|
|
- if(wtpAimap.containsKey(mp.getWindturbineid())){
|
|
|
|
- map = wtpAimap.get(mp.getWindturbineid());
|
|
|
|
- map.put(mp.getUniformcode(), mp);
|
|
|
|
- }else{
|
|
|
|
- map = new HashMap<String, WindTurbineTestingPointAi2>();
|
|
|
|
- map.put(mp.getUniformcode(), mp);
|
|
|
|
- wtpAimap.put(mp.getWindturbineid(), map);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+// if(wtls!=null && !wtls.isEmpty()){
|
|
|
|
+//
|
|
|
|
+// for(int i=0;i<wtls.size();i++){
|
|
|
|
+//
|
|
|
|
+// Windturbine point=wtls.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);
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+//
|
|
|
|
+// List<Windturbine> ls=wp_wtmap.get("SBQ_FDC");
|
|
|
|
+// List<Windturbine> temp1=new ArrayList<>();
|
|
|
|
+// List<Windturbine> temp2=new ArrayList<>();
|
|
|
|
+// for(Windturbine wt:ls)
|
|
|
|
+// {
|
|
|
|
+// String str=wt.getId().substring(wt.getId().length()-3,wt.getId().length());
|
|
|
|
+// if(StringUtils.isNumeric(str))
|
|
|
|
+// {
|
|
|
|
+// temp2.add(wt);
|
|
|
|
+// }else
|
|
|
|
+// {
|
|
|
|
+// temp1.add(wt);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// ls.clear();
|
|
|
|
+// ls.addAll(temp1);
|
|
|
|
+// ls.addAll(temp2);
|
|
|
|
+// wp_wtmap.put("SBQ_FDC",ls);
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+//
|
|
|
|
+// WindPowerStationTestingPoint2Example windPowerstationTestingPointExample=new WindPowerStationTestingPoint2Example();
|
|
|
|
+// windPowerstationTestingPointExample.createCriteria().getAllCriteria();
|
|
|
|
+// List<WindPowerStationTestingPoint2> wpPointlist= windPowerstationTestingPointService.selectByExample(windPowerstationTestingPointExample);
|
|
|
|
+//
|
|
|
|
+// Map<String,WindPowerStationTestingPoint2> items=null;
|
|
|
|
+// if(wpPointlist!=null && !wpPointlist.isEmpty()){
|
|
|
|
+// for(int i=0;i<wpPointlist.size();i++){
|
|
|
|
+// WindPowerStationTestingPoint2 point=wpPointlist.get(i);
|
|
|
|
+// if(stationPointmap.containsKey(point.getWindpowerstationid())){
|
|
|
|
+// items=stationPointmap.get(point.getWindpowerstationid());
|
|
|
|
+// items.put(point.getUniformcode(), point);
|
|
|
|
+// }
|
|
|
|
+// else{
|
|
|
|
+// items=new HashMap<String,WindPowerStationTestingPoint2>();
|
|
|
|
+// stationPointmap.put(point.getWindpowerstationid(), items);
|
|
|
|
+// items.put(point.getUniformcode(), point);
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// WindTurbineTestingPointAi2Example windTurbineTestingPointAiExample=new WindTurbineTestingPointAi2Example();
|
|
|
|
+// windTurbineTestingPointAiExample.createCriteria().getAllCriteria();
|
|
|
|
+// List<WindTurbineTestingPointAi2> wtAilist= windTurbineTestingPointAiService.selectByExample(windTurbineTestingPointAiExample);
|
|
|
|
+//
|
|
|
|
+// Map<String, WindTurbineTestingPointAi2> map = null;
|
|
|
|
+//
|
|
|
|
+// if(wtAilist != null && !wtAilist.isEmpty()){
|
|
|
|
+// for(WindTurbineTestingPointAi2 mp : wtAilist){
|
|
|
|
+// if(wtpAimap.containsKey(mp.getWindturbineid())){
|
|
|
|
+// map = wtpAimap.get(mp.getWindturbineid());
|
|
|
|
+// map.put(mp.getUniformcode(), mp);
|
|
|
|
+// }else{
|
|
|
|
+// map = new HashMap<String, WindTurbineTestingPointAi2>();
|
|
|
|
+// map.put(mp.getUniformcode(), mp);
|
|
|
|
+// wtpAimap.put(mp.getWindturbineid(), map);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|