|
@@ -23,7 +23,6 @@ public class InitialPointGoldenService implements IinitialPoint{
|
|
private WindturbinestandardpointService windturbinestandardpointService;
|
|
private WindturbinestandardpointService windturbinestandardpointService;
|
|
@Resource
|
|
@Resource
|
|
private WindpowerstationstandardpointService windpowerstationstandardpointService;
|
|
private WindpowerstationstandardpointService windpowerstationstandardpointService;
|
|
-
|
|
|
|
@Resource
|
|
@Resource
|
|
private ForecaststationtandardpointService forecaststationtandardpointService;
|
|
private ForecaststationtandardpointService forecaststationtandardpointService;
|
|
@Resource
|
|
@Resource
|
|
@@ -32,9 +31,10 @@ public class InitialPointGoldenService implements IinitialPoint{
|
|
private WindsubstationstandardpointService windsubstationstandardpointService;
|
|
private WindsubstationstandardpointService windsubstationstandardpointService;
|
|
@Resource
|
|
@Resource
|
|
private WindPowerstationTestingPoint2Service windPowerstationTestingPoint2Service;
|
|
private WindPowerstationTestingPoint2Service windPowerstationTestingPoint2Service;
|
|
-
|
|
|
|
@Resource
|
|
@Resource
|
|
private WindturbinetestingpointnewService windturbinetestingpointnewService;
|
|
private WindturbinetestingpointnewService windturbinetestingpointnewService;
|
|
|
|
+ @Resource
|
|
|
|
+ private PhotovoltaicStandardPointService photovoltaicStandardPointService;
|
|
|
|
|
|
private final String AI="AI";
|
|
private final String AI="AI";
|
|
private final String DI="DI";
|
|
private final String DI="DI";
|
|
@@ -84,7 +84,7 @@ public class InitialPointGoldenService implements IinitialPoint{
|
|
Windpowerstationstandardpoint stp=stpointls.get(i);
|
|
Windpowerstationstandardpoint stp=stpointls.get(i);
|
|
StringBuilder sb =new StringBuilder();
|
|
StringBuilder sb =new StringBuilder();
|
|
StringBuilder sbtable =new StringBuilder();
|
|
StringBuilder sbtable =new StringBuilder();
|
|
- sbtable.append(re.getCode()).append(cs.getId());
|
|
|
|
|
|
+// sbtable.append(re.getCode()).append(cs.getId());
|
|
sb.append(String.valueOf(sba));
|
|
sb.append(String.valueOf(sba));
|
|
sb.append("XXXX_XX_XX_XX_XXX_");
|
|
sb.append("XXXX_XX_XX_XX_XXX_");
|
|
sb.append(CI);
|
|
sb.append(CI);
|
|
@@ -149,14 +149,15 @@ public class InitialPointGoldenService implements IinitialPoint{
|
|
Windpowerstationstandardpoint stp=stpointls.get(i);
|
|
Windpowerstationstandardpoint stp=stpointls.get(i);
|
|
StringBuilder sb =new StringBuilder();
|
|
StringBuilder sb =new StringBuilder();
|
|
StringBuilder sbtable =new StringBuilder();
|
|
StringBuilder sbtable =new StringBuilder();
|
|
- sbtable.append(re.getCode()).append(cs.getId());
|
|
|
|
|
|
+// sbtable.append(re.getCode()).append(cs.getId());
|
|
sb.append(String.valueOf(sba));
|
|
sb.append(String.valueOf(sba));
|
|
sb.append(re.getCode()).append("F_XX_XX_XX_XXX_");
|
|
sb.append(re.getCode()).append("F_XX_XX_XX_XXX_");
|
|
sb.append(CI);
|
|
sb.append(CI);
|
|
sb.append(stp.getOrdernum());
|
|
sb.append(stp.getOrdernum());
|
|
if(stp.getCode().equals(CI))
|
|
if(stp.getCode().equals(CI))
|
|
{
|
|
{
|
|
- sbtable.append("FC").append("JSFW.");
|
|
|
|
|
|
+// sbtable.append("FC").append("JSFW.");
|
|
|
|
+ sbtable.append("JSFW.");
|
|
sbtable.append(sb);
|
|
sbtable.append(sb);
|
|
}
|
|
}
|
|
Windpowerstationpointnew po=new Windpowerstationpointnew();
|
|
Windpowerstationpointnew po=new Windpowerstationpointnew();
|
|
@@ -216,14 +217,15 @@ public class InitialPointGoldenService implements IinitialPoint{
|
|
Windpowerstationstandardpoint stp=stpointls.get(i);
|
|
Windpowerstationstandardpoint stp=stpointls.get(i);
|
|
StringBuilder sb =new StringBuilder();
|
|
StringBuilder sb =new StringBuilder();
|
|
StringBuilder sbtable =new StringBuilder();
|
|
StringBuilder sbtable =new StringBuilder();
|
|
- sbtable.append(re.getCode()).append(cs.getId());
|
|
|
|
|
|
+// sbtable.append(re.getCode()).append(cs.getId());
|
|
sb.append(String.valueOf(sba));
|
|
sb.append(String.valueOf(sba));
|
|
sb.append(re.getCode()).append("G_XX_XX_XX_XXX_");
|
|
sb.append(re.getCode()).append("G_XX_XX_XX_XXX_");
|
|
sb.append(CI);
|
|
sb.append(CI);
|
|
sb.append(stp.getOrdernum());
|
|
sb.append(stp.getOrdernum());
|
|
if(stp.getCode().equals(CI))
|
|
if(stp.getCode().equals(CI))
|
|
{
|
|
{
|
|
- sbtable.append("GF").append("JSFW.");
|
|
|
|
|
|
+// sbtable.append("GF").append("JSFW.");
|
|
|
|
+ sbtable.append("JSFW.");
|
|
sbtable.append(sb);
|
|
sbtable.append(sb);
|
|
}
|
|
}
|
|
Windpowerstationpointnew po=new Windpowerstationpointnew();
|
|
Windpowerstationpointnew po=new Windpowerstationpointnew();
|
|
@@ -846,7 +848,7 @@ public class InitialPointGoldenService implements IinitialPoint{
|
|
List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wp.getId());
|
|
List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wp.getId());
|
|
|
|
|
|
|
|
|
|
- if(!stpointls.isEmpty())
|
|
|
|
|
|
+ if(!stpointls.isEmpty() && wp.getId().endsWith("FDC"))
|
|
{
|
|
{
|
|
for(Windturbine wt:wtls)
|
|
for(Windturbine wt:wtls)
|
|
{
|
|
{
|
|
@@ -918,7 +920,7 @@ public class InitialPointGoldenService implements IinitialPoint{
|
|
sba.append(wpId).append("FJ");
|
|
sba.append(wpId).append("FJ");
|
|
}else if(wp.getId().endsWith("GDC"))
|
|
}else if(wp.getId().endsWith("GDC"))
|
|
{
|
|
{
|
|
- sba.append(wpId).append("FJ");
|
|
|
|
|
|
+ sba.append(wpId).append("GF");
|
|
}
|
|
}
|
|
|
|
|
|
StringBuilder sbtable =new StringBuilder();
|
|
StringBuilder sbtable =new StringBuilder();
|
|
@@ -999,4 +1001,178 @@ public class InitialPointGoldenService implements IinitialPoint{
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ public void initalNbq() throws IOException {
|
|
|
|
+
|
|
|
|
+ // windturbinetestingpointService.deleteAll();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ List<PhotovoltaicStandardPoint> stpointls=photovoltaicStandardPointService.findAllList();
|
|
|
|
+
|
|
|
|
+// Map<String, List<Windturbinestandardpoints>> wpsmap=windturbinestandardpointsService.findAllMap();
|
|
|
|
+ List<Windturbinetestingpointnew> allpoints=new ArrayList<>();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ for (Windpowerstation wp:InitialRunner.wpallls)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wp.getId());
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(!stpointls.isEmpty() && wp.getId().endsWith("GDC"))
|
|
|
|
+ {
|
|
|
|
+ for(Windturbine wt:wtls)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+// if(wpsmap.containsKey(wt.getModelid()))
|
|
|
|
+// {
|
|
|
|
+// List<Windturbinestandardpoints> wpsls=wpsmap.get(wt.getModelid());
|
|
|
|
+
|
|
|
|
+ List<Windturbinetestingpointnew> points=new ArrayList<>();
|
|
|
|
+ for(int i=0;i<stpointls.size();i++)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ PhotovoltaicStandardPoint stp=stpointls.get(i);
|
|
|
|
+ StringBuilder sb =new StringBuilder();
|
|
|
|
+ sb.append(wp.getPhoto());
|
|
|
|
+ String wpId=wp.getId().substring(0,wp.getId().indexOf("_"));
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(wp.getId().endsWith("FDC"))
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ if(stp.getCode().equals(CI))
|
|
|
|
+ {
|
|
|
|
+ sb.append(wpId).append("F_").append("JS_");
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ sb.append(wpId).append("F_").append("FJ_");
|
|
|
|
+ }
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ if(stp.getCode().equals(CI))
|
|
|
|
+ {
|
|
|
|
+ sb.append(wpId).append("G_").append("JS_");
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ sb.append(wpId).append("G_").append("FJ_");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String temp=null;
|
|
|
|
+ temp=wt.getProjectid().substring(0,wt.getProjectid().lastIndexOf("_"));
|
|
|
|
+ sb.append("P").append(Integer.valueOf(temp.substring(temp.length()-2))).append("_");
|
|
|
|
+ temp=wt.getLineid().substring(0,wt.getProjectid().lastIndexOf("_"));
|
|
|
|
+ sb.append("L").append(Integer.valueOf(temp.substring(temp.length()-2))).append("_");
|
|
|
|
+
|
|
|
|
+ temp=wt.getId().substring(wt.getId().lastIndexOf("_")+1);
|
|
|
|
+
|
|
|
|
+ if(temp.length()==1)
|
|
|
|
+ {
|
|
|
|
+ sb.append("00").append(temp).append("_");
|
|
|
|
+ }else if(temp.length()==2)
|
|
|
|
+ {
|
|
|
|
+ sb.append("0").append(temp).append("_");
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ sb.append(temp).append("_");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ sb.append(stp.getCode());
|
|
|
|
+
|
|
|
|
+ sb.append(stp.getOrdernum());
|
|
|
|
+
|
|
|
|
+ StringBuilder sba =new StringBuilder();
|
|
|
|
+
|
|
|
|
+ if(wp.getId().endsWith("FDC"))
|
|
|
|
+ {
|
|
|
|
+ sba.append(wpId).append("FJ");
|
|
|
|
+ }else if(wp.getId().endsWith("GDC"))
|
|
|
|
+ {
|
|
|
|
+ sba.append(wpId).append("GF");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ StringBuilder sbtable =new StringBuilder();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(stp.getCode().equals(CI))
|
|
|
|
+ {
|
|
|
|
+ sbtable.append(sba).append("JSFW.");
|
|
|
|
+ sbtable.append(sb);
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ sbtable.append(sba).append(".");
|
|
|
|
+ sbtable.append(sb);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Windturbinetestingpointnew po=new Windturbinetestingpointnew();
|
|
|
|
+ po.setId(StringUtils.getUUID());
|
|
|
|
+// po.setCode(V2Config.getInitialcode());
|
|
|
|
+ po.setCode(String.valueOf(sbtable));
|
|
|
|
+ sb =new StringBuilder();
|
|
|
|
+ sb.append(wt.getName()).append(stp.getName());
|
|
|
|
+ po.setName(String.valueOf(sb));
|
|
|
|
+ po.setModel(wt.getModelid());
|
|
|
|
+ po.setModelid(wt.getModelid());
|
|
|
|
+ po.setWindturbineid(wt.getId());
|
|
|
|
+ po.setUniformcode(stp.getUniformcode());
|
|
|
|
+ po.setWindpowerstationid(wt.getWindpowerstationid());
|
|
|
|
+
|
|
|
|
+ if(stp.getCode().equals(CI))
|
|
|
|
+ {
|
|
|
|
+ sb =new StringBuilder();
|
|
|
|
+
|
|
|
|
+ if(StringUtils.notEmp(wp.getPhoto()))
|
|
|
|
+ {
|
|
|
|
+ sb.append(wp.getPhoto().replace("_","")).append(".JSFW").append(sba);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ po.setRealtimeid(String.valueOf(sb));
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ sb =new StringBuilder();
|
|
|
|
+
|
|
|
|
+ if(StringUtils.notEmp(wp.getPhoto()))
|
|
|
|
+ {
|
|
|
|
+ sb.append(wp.getPhoto().replace("_","")).append(".").append(sba);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ po.setRealtimeid(String.valueOf(sb));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ points.add(po);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+// allpoints.addAll(points);
|
|
|
|
+ }
|
|
|
|
+ allpoints.addAll(points);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+// if(!allpoints.isEmpty())
|
|
|
|
+// {
|
|
|
|
+// for(Windturbinetestingpointnew wt:allpoints)
|
|
|
|
+// {
|
|
|
|
+// windturbinetestingpointnewService.insertSelective(wt);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+ //创建一个数组用于设置表头
|
|
|
|
+ String[] arr = new String[]{"编号","编码","名称","型号","单位","英文名称","类型编号","所属型号","最大值","最小值","合理最大值",
|
|
|
|
+ "合理最小值","风机编号","统一编码","短ID","长ID","风场编号","实时配置编号"};
|
|
|
|
+ String heardName="逆变器测点表";
|
|
|
|
+ //调用Excel导出工具类
|
|
|
|
+ ExcelExport.exportToPath(allpoints,arr,heardName,6,"风机测点");
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|