|
@@ -57,6 +57,9 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
|
|
|
List<Windpowerstationpointnew> allpoints=new ArrayList<>();
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if(!regions.isEmpty())
|
|
|
{
|
|
|
|
|
@@ -70,8 +73,8 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
{
|
|
|
// StringBuilder sba=new StringBuilder();
|
|
|
// sba.append(re.getCode()).append("_").append(cs.getId()).append("_");
|
|
|
-///********************************************区域公司测点**************************************************/
|
|
|
- List<Windpowerstationpointnew> points=new ArrayList<>();
|
|
|
+/********************************************区域公司测点**************************************************/
|
|
|
+ List<Windpowerstationpointnew> points=new ArrayList<>();
|
|
|
for(int i=0;i<stpointls.size();i++)
|
|
|
{
|
|
|
|
|
@@ -96,15 +99,17 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
po.setName(String.valueOf(sb));
|
|
|
po.setModel(null);
|
|
|
po.setModelid(null);
|
|
|
- if(regions.size()==1)
|
|
|
+
|
|
|
+ StringBuilder tempsb=new StringBuilder();
|
|
|
+
|
|
|
+ if(StringUtils.notEmp(re.getCode()))
|
|
|
{
|
|
|
- po.setWindpowerstationid("0");
|
|
|
+ tempsb.append(re.getCode()).append("0");
|
|
|
}else
|
|
|
{
|
|
|
- StringBuilder tempsb=new StringBuilder();
|
|
|
- tempsb.append(re.getId());
|
|
|
- po.setWindpowerstationid(String.valueOf(tempsb));
|
|
|
+ tempsb.append("0");
|
|
|
}
|
|
|
+ po.setWindpowerstationid(String.valueOf(tempsb));
|
|
|
po.setUniformcode(stp.getUniformcode());
|
|
|
|
|
|
|
|
@@ -112,12 +117,12 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
if(stp.getCode().equals(CI))
|
|
|
{
|
|
|
sb =new StringBuilder();
|
|
|
- sb.append("GDHF.JSFW");
|
|
|
+ sb.append("SXJN.JSFW");
|
|
|
po.setRealtimeid(String.valueOf(sb));
|
|
|
}else
|
|
|
{
|
|
|
sb =new StringBuilder();
|
|
|
- sb.append("GDHF.JSFWDD");
|
|
|
+ sb.append("SXJN.JSFWDD");
|
|
|
po.setRealtimeid(String.valueOf(sb));
|
|
|
}
|
|
|
|
|
@@ -129,7 +134,68 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
allpoints.addAll(points);
|
|
|
// windPowerstationTestingPointService.insertBatch(points);
|
|
|
|
|
|
- /*******************************************风电测点生成*******************************************************/
|
|
|
+ /*******************************************风电测点生成*******************************************************/
|
|
|
+/********************************************风电场公司测点**************************************************/
|
|
|
+ points=new ArrayList<>();
|
|
|
+ for(int i=0;i<stpointls.size();i++)
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+ Windpowerstationstandardpoint stp=stpointls.get(i);
|
|
|
+ StringBuilder sb =new StringBuilder();
|
|
|
+// sb.append(String.valueOf(sba));
|
|
|
+// sb.append(re.getCode()).append("F_XX_XX_XX_XXX_");
|
|
|
+// sb.append(CI);
|
|
|
+// sb.append(stp.getOrdernum());
|
|
|
+//// if(stp.getCode().equals(CI))
|
|
|
+//// {
|
|
|
+//// sbtable.append("JSFW.");
|
|
|
+//// sbtable.append(sb);
|
|
|
+//// }
|
|
|
+ Windpowerstationpointnew po=new Windpowerstationpointnew();
|
|
|
+ po.setId(StringUtils.getUUID());
|
|
|
+ po.setCode(V2Config.getInitialcode());
|
|
|
+// po.setCode(String.valueOf(sb));
|
|
|
+ sb =new StringBuilder();
|
|
|
+ sb.append(re.getName()).append("风场").append(stp.getName());
|
|
|
+ po.setName(String.valueOf(sb));
|
|
|
+ po.setModel(null);
|
|
|
+ po.setModelid(null);
|
|
|
+
|
|
|
+ StringBuilder tempsb=new StringBuilder();
|
|
|
+ if(StringUtils.notEmp(re.getCode()))
|
|
|
+ {
|
|
|
+ tempsb.append(re.getCode()).append("-1");
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ tempsb.append("-1");
|
|
|
+ }
|
|
|
+ po.setWindpowerstationid(String.valueOf(tempsb));
|
|
|
+ po.setUniformcode(stp.getUniformcode());
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if(stp.getCode().equals(CI))
|
|
|
+ {
|
|
|
+ sb =new StringBuilder();
|
|
|
+ sb.append("SXJN.JSFW");
|
|
|
+ po.setRealtimeid(String.valueOf(sb));
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ sb =new StringBuilder();
|
|
|
+ sb.append("SXJN.JSFWDD");
|
|
|
+ po.setRealtimeid(String.valueOf(sb));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ points.add(po);
|
|
|
+ }
|
|
|
+
|
|
|
+ allpoints.addAll(points);
|
|
|
+ // windPowerstationTestingPointService.insertBatch(points);
|
|
|
+
|
|
|
+ /*******************************************风电测点生成*******************************************************/
|
|
|
|
|
|
// points=new ArrayList<>();
|
|
|
// for(int i=0;i<stpointls.size();i++)
|
|
@@ -178,7 +244,7 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
// if(stp.getCode().equals(CI))
|
|
|
// {
|
|
|
// sb =new StringBuilder();
|
|
|
-// sb.append("GDHF.JSFWFC");
|
|
|
+// sb.append("SXJN.JSFWFC");
|
|
|
// po.setRealtimeid(String.valueOf(sb));
|
|
|
// }
|
|
|
// points.add(po);
|
|
@@ -187,69 +253,72 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
// allpoints.addAll(points);
|
|
|
// //windPowerstationTestingPointService.insertBatch(points);
|
|
|
//
|
|
|
-// if(isGf)
|
|
|
-// {
|
|
|
-// /*********************************************光伏测点生成*****************************************************/
|
|
|
-//
|
|
|
-// points=new ArrayList<>();
|
|
|
-// for(int i=0;i<stpointls.size();i++)
|
|
|
-// {
|
|
|
-//
|
|
|
-//
|
|
|
-// Windpowerstationstandardpoint stp=stpointls.get(i);
|
|
|
-// StringBuilder sb =new StringBuilder();
|
|
|
-// sb.append(String.valueOf(sba));
|
|
|
-// sb.append("GDC_XX_XX_XX_XXX_");
|
|
|
-// sb.append(CI);
|
|
|
-// sb.append(stp.getOrdernum());
|
|
|
-//// if(stp.getCode().equals(CI))
|
|
|
-//// {
|
|
|
-//// sbtable.append("JSFW.");
|
|
|
-//// sbtable.append(sb);
|
|
|
-//// }
|
|
|
-// Windpowerstationpointnew po=new Windpowerstationpointnew();
|
|
|
-// po.setCode(String.valueOf(sb));
|
|
|
-// sb =new StringBuilder();
|
|
|
-// sb.append(re.getName()).append(stp.getName());
|
|
|
-// po.setName(String.valueOf(sb));
|
|
|
-// po.setModel(null);
|
|
|
-// po.setModelid(null);
|
|
|
-// if(regions.size()==1)
|
|
|
-// {
|
|
|
-// po.setWindpowerstationid("-2");
|
|
|
-// }else
|
|
|
-// {
|
|
|
-// StringBuilder tempsb=new StringBuilder();
|
|
|
-// tempsb.append(re.getCode()).append(2);
|
|
|
-// po.setWindpowerstationid(String.valueOf(tempsb));
|
|
|
-// }
|
|
|
-// po.setUniformcode(stp.getUniformcode());
|
|
|
-//
|
|
|
-//// if(stp.getCode().equals(CI))
|
|
|
-//// {
|
|
|
-//// StringBuilder tempsb=new StringBuilder();
|
|
|
-//// tempsb.append(cs.getId()).append(re.getCode());
|
|
|
-//// tempsb.append(".JSFW");
|
|
|
-//// po.setRealtimeid(String.valueOf(tempsb));
|
|
|
-//// }
|
|
|
-// if(stp.getCode().equals(CI))
|
|
|
-// {
|
|
|
-// sb =new StringBuilder();
|
|
|
-// sb.append("GDHF.JSFWGC");
|
|
|
-// po.setRealtimeid(String.valueOf(sb));
|
|
|
-// }
|
|
|
-// points.add(po);
|
|
|
-// }
|
|
|
-//
|
|
|
-// allpoints.addAll(points);
|
|
|
-// // windPowerstationTestingPointService.insertBatch(points);
|
|
|
-// }
|
|
|
+// if(isGf)
|
|
|
+// {
|
|
|
+/*********************************************光伏测点生成*****************************************************/
|
|
|
+
|
|
|
+ points=new ArrayList<>();
|
|
|
+ for(int i=0;i<stpointls.size();i++)
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+ Windpowerstationstandardpoint stp=stpointls.get(i);
|
|
|
+ StringBuilder sb =new StringBuilder();
|
|
|
+// sb.append(String.valueOf(sba));
|
|
|
+// sb.append("GDC_XX_XX_XX_XXX_");
|
|
|
+// sb.append(CI);
|
|
|
+// sb.append(stp.getOrdernum());
|
|
|
+// // if(stp.getCode().equals(CI))
|
|
|
+// // {
|
|
|
+// // sbtable.append("JSFW.");
|
|
|
+// // sbtable.append(sb);
|
|
|
+// // }
|
|
|
+ Windpowerstationpointnew po=new Windpowerstationpointnew();
|
|
|
+ po.setId(StringUtils.getUUID());
|
|
|
+ po.setCode(V2Config.getInitialcode());
|
|
|
+ sb =new StringBuilder();
|
|
|
+ sb.append(re.getName()).append("光伏").append(stp.getName());
|
|
|
+ po.setName(String.valueOf(sb));
|
|
|
+ po.setModel(null);
|
|
|
+ po.setModelid(null);
|
|
|
+ StringBuilder tempsb=new StringBuilder();
|
|
|
+
|
|
|
+ if(StringUtils.notEmp(re.getCode()))
|
|
|
+ {
|
|
|
+ tempsb.append(re.getCode()).append("-2");
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ tempsb.append("-2");
|
|
|
+ }
|
|
|
+
|
|
|
+ po.setWindpowerstationid(String.valueOf(tempsb));
|
|
|
+ po.setUniformcode(stp.getUniformcode());
|
|
|
+
|
|
|
+ // if(stp.getCode().equals(CI))
|
|
|
+ // {
|
|
|
+ // StringBuilder tempsb=new StringBuilder();
|
|
|
+ // tempsb.append(cs.getId()).append(re.getCode());
|
|
|
+ // tempsb.append(".JSFW");
|
|
|
+ // po.setRealtimeid(String.valueOf(tempsb));
|
|
|
+ // }
|
|
|
+ if(stp.getCode().equals(CI))
|
|
|
+ {
|
|
|
+ sb =new StringBuilder();
|
|
|
+ sb.append("SXJN.JSFWGC");
|
|
|
+ po.setRealtimeid(String.valueOf(sb));
|
|
|
+ }
|
|
|
+ points.add(po);
|
|
|
+ }
|
|
|
+
|
|
|
+ allpoints.addAll(points);
|
|
|
+ // windPowerstationTestingPointService.insertBatch(points);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
- }
|
|
|
+// }
|
|
|
|
|
|
|
|
|
|
|
@@ -338,10 +407,10 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
|
|
|
if(wp.getId().endsWith("FDC"))
|
|
|
{
|
|
|
- sb.append("GDHF.JSFW").append(temp).append("FC");
|
|
|
+ sb.append("SXJN.JSFW").append(temp).append("FC");
|
|
|
}else
|
|
|
{
|
|
|
- sb.append("GDHF.JSFW").append(temp).append("GC");
|
|
|
+ sb.append("SXJN.JSFW").append(temp).append("GC");
|
|
|
}
|
|
|
|
|
|
po.setRealtimeid(String.valueOf(sb));
|
|
@@ -349,7 +418,7 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
{
|
|
|
sb =new StringBuilder();
|
|
|
temp=wp.getId().substring(0,wp.getId().indexOf("_"));
|
|
|
- sb.append("GDHF.JSFW").append(temp).append("DD");
|
|
|
+ sb.append("SXJN.JSFW").append(temp).append("DD");
|
|
|
po.setRealtimeid(String.valueOf(sb));
|
|
|
}
|
|
|
points.add(po);
|
|
@@ -414,10 +483,10 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
|
|
|
if(wp.getId().endsWith("FDC"))
|
|
|
{
|
|
|
- sb.append("GDHF.JSFW").append(temp).append("FC");
|
|
|
+ sb.append("SXJN.JSFW").append(temp).append("FC");
|
|
|
}else
|
|
|
{
|
|
|
- sb.append("GDHF.JSFW").append(temp).append("GC");
|
|
|
+ sb.append("SXJN.JSFW").append(temp).append("GC");
|
|
|
}
|
|
|
|
|
|
po.setRealtimeid(String.valueOf(sb));
|
|
@@ -425,7 +494,7 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
{
|
|
|
sb =new StringBuilder();
|
|
|
temp=wp.getId().substring(0,wp.getId().indexOf("_"));
|
|
|
- sb.append("GDHF.JSFW").append(temp).append("DD");
|
|
|
+ sb.append("SXJN.JSFW").append(temp).append("DD");
|
|
|
po.setRealtimeid(String.valueOf(sb));
|
|
|
}
|
|
|
points.add(po);
|
|
@@ -489,10 +558,10 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
|
|
|
if(wp.getId().endsWith("FDC"))
|
|
|
{
|
|
|
- sb.append("GDHF.JSFW").append(temp).append("FC");
|
|
|
+ sb.append("SXJN.JSFW").append(temp).append("FC");
|
|
|
}else
|
|
|
{
|
|
|
- sb.append("GDHF.JSFW").append(temp).append("GC");
|
|
|
+ sb.append("SXJN.JSFW").append(temp).append("GC");
|
|
|
}
|
|
|
|
|
|
po.setRealtimeid(String.valueOf(sb));
|
|
@@ -500,7 +569,7 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
{
|
|
|
sb =new StringBuilder();
|
|
|
temp=wp.getId().substring(0,wp.getId().indexOf("_"));
|
|
|
- sb.append("GDHF.JSFW").append(temp).append("DD");
|
|
|
+ sb.append("SXJN.JSFW").append(temp).append("DD");
|
|
|
po.setRealtimeid(String.valueOf(sb));
|
|
|
}
|
|
|
points.add(po);
|
|
@@ -617,7 +686,7 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
|
|
|
sb =new StringBuilder();
|
|
|
temp=wp.getId().substring(0,wp.getId().indexOf("_"));
|
|
|
- sb.append("GDHF.JSFW").append(temp).append("DD");
|
|
|
+ sb.append("SXJN.JSFW").append(temp).append("DD");
|
|
|
po.setRealtimeid(String.valueOf(sb));
|
|
|
}
|
|
|
|
|
@@ -706,14 +775,14 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
|
|
|
sb =new StringBuilder();
|
|
|
temp=wp.getId().substring(0,wp.getId().indexOf("_"));
|
|
|
- sb.append("GDHF.").append(temp).append("FGL");
|
|
|
+ sb.append("SXJN.").append(temp).append("FGL");
|
|
|
po.setRealtimeid(String.valueOf(sb));
|
|
|
}else if(wp.getId().endsWith("GDC"))
|
|
|
{
|
|
|
|
|
|
sb =new StringBuilder();
|
|
|
temp=wp.getId().substring(0,wp.getId().indexOf("_"));
|
|
|
- sb.append("GDHF.").append(temp).append("GGL");
|
|
|
+ sb.append("SXJN.").append(temp).append("GGL");
|
|
|
po.setRealtimeid(String.valueOf(sb));
|
|
|
}
|
|
|
|
|
@@ -829,13 +898,13 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
// {
|
|
|
// sb =new StringBuilder();
|
|
|
// temp=wp.getId().substring(0,wp.getId().indexOf("_"));
|
|
|
-// sb.append("GDHF.JSFW").append(temp).append("FJ");
|
|
|
+// sb.append("SXJN.JSFW").append(temp).append("FJ");
|
|
|
// po.setRealtimeid(String.valueOf(sb));
|
|
|
// }else
|
|
|
// {
|
|
|
// sb =new StringBuilder();
|
|
|
// temp=wp.getId().substring(0,wp.getId().indexOf("_"));
|
|
|
-// sb.append("GDHF.").append(temp).append("FJ");
|
|
|
+// sb.append("SXJN.").append(temp).append("FJ");
|
|
|
// po.setRealtimeid(String.valueOf(sb));
|
|
|
// }
|
|
|
// points.add(po);
|
|
@@ -935,13 +1004,13 @@ public class InitialPointEdosService implements IinitialPoint{
|
|
|
{
|
|
|
sb =new StringBuilder();
|
|
|
temp=wp.getId().substring(0,wp.getId().indexOf("_"));
|
|
|
- sb.append("GDHF.JSFW").append(temp).append("FJ");
|
|
|
+ sb.append("SXJN.JSFW").append(temp).append("FJ");
|
|
|
po.setRealtimeid(String.valueOf(sb));
|
|
|
}else
|
|
|
{
|
|
|
sb =new StringBuilder();
|
|
|
temp=wp.getId().substring(0,wp.getId().indexOf("_"));
|
|
|
- sb.append("GDHF.").append(temp).append("FJ");
|
|
|
+ sb.append("SXJN.").append(temp).append("FJ");
|
|
|
po.setRealtimeid(String.valueOf(sb));
|
|
|
}
|
|
|
points.add(po);
|