|
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.atomic.AtomicInteger;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -25,10 +26,19 @@ public class StatusService {
|
|
|
|
|
|
private Map<String, List<Windturbinestatusdi>> statusMap;
|
|
|
private List<Windturbine> wtls;
|
|
|
+ private List<Project> projects;
|
|
|
private Map<String, Map<String, Windturbinetestingpointnew>> wtpAimap;
|
|
|
+ private Map<String,Map<String, Windpowerstationpointnew>> linepointmap;
|
|
|
+ private Map<String,Map<String, Windpowerstationpointnew>> propointmap;
|
|
|
+ private Map<String,Map<String, Windpowerstationpointnew>> wppointmap;
|
|
|
private Date currentDate;
|
|
|
private List<Windpowerstation> wpls;
|
|
|
+ private List<Line> lines;
|
|
|
private Map<String, Equipmentmodel> modelMap;
|
|
|
+
|
|
|
+ public static Map<String,List<Project>> wppromap;
|
|
|
+ public static Map<String,List<Line>> prolinemap;
|
|
|
+ public static Map<String,List<Windturbine>> linewtmap;
|
|
|
@Resource
|
|
|
private IEdosUtil edosUtil;
|
|
|
@Value("${clauStatus.ai}")
|
|
@@ -47,15 +57,28 @@ public class StatusService {
|
|
|
statusMap = CacheContext.statusMap;
|
|
|
wtls = CacheContext.wtls;
|
|
|
wpls = CacheContext.wpls;
|
|
|
+ lines = CacheContext.lines;
|
|
|
+ projects = CacheContext.projects;
|
|
|
wtpAimap = CacheContext.wtpAimap;
|
|
|
+ linepointmap = CacheContext.linepointmap;
|
|
|
+ propointmap = CacheContext.propointmap;
|
|
|
+ wppointmap = CacheContext.wppointmap;
|
|
|
currentDate = DateUtils.getCurrentDate();
|
|
|
modelMap = CacheContext.modelMap;
|
|
|
+ wppromap = CacheContext.wppromap;
|
|
|
+ prolinemap = CacheContext.prolinemap;
|
|
|
+ linewtmap = CacheContext.linewtmap;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 计算状态
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
public void calculateStatus() throws Exception {
|
|
|
init();
|
|
|
List<PointData> resultList = new ArrayList<>();
|
|
|
- wpls.stream().forEach(wp->{
|
|
|
- wtls.stream().filter(i->i.getWindpowerstationid().equals(wp.getId())).forEach(wt->{
|
|
|
+ projects.stream().forEach(project->{
|
|
|
+ wtls.stream().filter(i->i.getProjectid().equals(project.getId())).forEach(wt->{
|
|
|
Map<String, Windturbinetestingpointnew> stringWindturbinetestingpointnewMap = wtpAimap.get(wt.getId());
|
|
|
Windturbinetestingpointnew ztmxPoint = stringWindturbinetestingpointnewMap.get(Contant.ZTMX);
|
|
|
Windturbinetestingpointnew fj5tPoint = stringWindturbinetestingpointnewMap.get(Contant.FJ5T);
|
|
@@ -74,14 +97,42 @@ public class StatusService {
|
|
|
List<PointData> collect = interruptionRealData.stream().filter(i -> Math.abs(currentDate.getTime() - i.getPointTime()) / 1000 < Integer.parseInt(second)).collect(Collectors.toList());
|
|
|
if (StringUtils.isEmpty(collect)){
|
|
|
Integer ztmx = Integer.parseInt(edosUtil.getRealData(ztmxPoint).getPointValue());
|
|
|
- if (ztmx == 7 || ztmx == 9 || ztmx == 10 || ztmx == 11 ){
|
|
|
+ if (ztmx == 7 || ztmx == 9 || ztmx == 10 || ztmx == 11 || ztmx == 4 || ztmx == 5 ){ //手打状态
|
|
|
mxstatus = ztmx;
|
|
|
}
|
|
|
- if (clauStatusAi.contains(wt.getWindpowerstationid())){
|
|
|
+ if (clauStatusAi.contains(wt.getProjectid())){
|
|
|
//多状态根据一个点来判断
|
|
|
-
|
|
|
+ Optional<Windturbinestatusdi> first = statusMap.get(wt.getId()).stream().filter(w -> w.getUniformcode().equals(Contant.AI422)).findFirst();
|
|
|
+ if (first.isPresent()){
|
|
|
+ Windturbinestatusdi windturbinestatusdi = first.get();
|
|
|
+ //联合动力
|
|
|
+ double pointValueInDouble = edosUtil.getRealData(windturbinestatusdi.getId()).getPointValueInDouble();
|
|
|
+ switch ((int) pointValueInDouble){
|
|
|
+ case 0:
|
|
|
+ mxstatus = 12;
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ mxstatus = 6;
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ mxstatus = 8;
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ mxstatus = 0;
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ case 5:
|
|
|
+ mxstatus = 2;
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ mxstatus = 1;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ mxstatus = 2;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- if (clauStatusDi.contains(wt.getWindpowerstationid())){
|
|
|
+ if (clauStatusDi.contains(wt.getProjectid())){
|
|
|
//每个状态一个状态点
|
|
|
List<Windturbinestatusdi> windturbinestatusdis = statusMap.get(wt.getId()).stream().filter(w -> w.getUniformcode().equals(Contant.MX000) || w.getUniformcode().equals(Contant.MX002) || w.getUniformcode().equals(Contant.MX006) || w.getUniformcode().equals(Contant.MX008)).collect(Collectors.toList());
|
|
|
for(Windturbinestatusdi w : windturbinestatusdis){
|
|
@@ -91,32 +142,11 @@ public class StatusService {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- if (mxstatus == 2){
|
|
|
- boolean isJcl = false;
|
|
|
- Windturbinetestingpointnew ai134point = stringWindturbinetestingpointnewMap.get(Contant.AI134);
|
|
|
- Windturbinetestingpointnew ai178point = stringWindturbinetestingpointnewMap.get(Contant.AI178);
|
|
|
- Windturbinetestingpointnew ai443point = stringWindturbinetestingpointnewMap.get(Contant.AI443);
|
|
|
- if (!ai134point.getCode().equals("INITIAL")){
|
|
|
- Double realData = edosUtil.getRealData(ai134point).getPointValueInDouble();
|
|
|
- if (realData<Double.parseDouble(AI134)){
|
|
|
- isJcl = true;
|
|
|
- }
|
|
|
- }
|
|
|
- if (!ai178point.getCode().equals("INITIAL")){
|
|
|
- Double realData = edosUtil.getRealData(ai178point).getPointValueInDouble();
|
|
|
- if (realData<Double.parseDouble(AI178)){
|
|
|
- isJcl = true;
|
|
|
- }
|
|
|
- }
|
|
|
- if (!ai443point.getCode().equals("INITIAL")){
|
|
|
- Double realData = edosUtil.getRealData(ai443point).getPointValueInDouble();
|
|
|
- if (realData<modelMap.get(wt.getModelid()).getPowerproduction()){
|
|
|
- isJcl = true;
|
|
|
- }
|
|
|
- }
|
|
|
- if (isJcl){
|
|
|
- mxstatus = 3;
|
|
|
- }
|
|
|
+ }
|
|
|
+ if (mxstatus == 2){
|
|
|
+ boolean isJcl = isJcl(wt, stringWindturbinetestingpointnewMap);
|
|
|
+ if (isJcl){
|
|
|
+ mxstatus = 3;
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
@@ -150,6 +180,468 @@ public class StatusService {
|
|
|
edosUtil.sendMultiPoint(resultList);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 计算状态台数
|
|
|
+ */
|
|
|
+ public void calculateStatusNumber() throws Exception {
|
|
|
+ init();
|
|
|
+ List<PointData> resultList = new ArrayList<>();
|
|
|
+ wpls.stream().forEach(wp->{
|
|
|
+ List<Project> projects = wppromap.get(wp.getId());
|
|
|
+ Map<String, Windpowerstationpointnew> wpmap = linepointmap.get(wp.getId());
|
|
|
+ AtomicInteger wpdjnum = new AtomicInteger();
|
|
|
+ AtomicInteger wptjnum = new AtomicInteger();
|
|
|
+ AtomicInteger wpfdnum = new AtomicInteger();
|
|
|
+ AtomicInteger wpfdjclnum = new AtomicInteger();
|
|
|
+ AtomicInteger wpxdjclnum = new AtomicInteger();
|
|
|
+ AtomicInteger wpxdtjnum = new AtomicInteger();
|
|
|
+ AtomicInteger wpgznum = new AtomicInteger();
|
|
|
+ AtomicInteger wpcngznum = new AtomicInteger();
|
|
|
+ AtomicInteger wpjxnum = new AtomicInteger();
|
|
|
+ AtomicInteger wpcnjxnum = new AtomicInteger();
|
|
|
+ AtomicInteger wpdwslnum = new AtomicInteger();
|
|
|
+ AtomicInteger wphjslnum = new AtomicInteger();
|
|
|
+ AtomicInteger wplxnum = new AtomicInteger();
|
|
|
+
|
|
|
+ //六种
|
|
|
+ AtomicInteger wpdjts = new AtomicInteger();
|
|
|
+ AtomicInteger wpgzts = new AtomicInteger();
|
|
|
+ AtomicInteger wptxzd = new AtomicInteger();
|
|
|
+ AtomicInteger wpwhtj = new AtomicInteger();
|
|
|
+ AtomicInteger wpxdts = new AtomicInteger();
|
|
|
+ AtomicInteger wpyxts = new AtomicInteger();
|
|
|
+ projects.stream().forEach(project->{
|
|
|
+ List<Line> lineList = prolinemap.get(project.getId());
|
|
|
+ Map<String, Windpowerstationpointnew> projectmap = linepointmap.get(project.getId());
|
|
|
+ AtomicInteger prodjnum = new AtomicInteger();
|
|
|
+ AtomicInteger protjnum = new AtomicInteger();
|
|
|
+ AtomicInteger profdnum = new AtomicInteger();
|
|
|
+ AtomicInteger profdjclnum = new AtomicInteger();
|
|
|
+ AtomicInteger proxdjclnum = new AtomicInteger();
|
|
|
+ AtomicInteger proxdtjnum = new AtomicInteger();
|
|
|
+ AtomicInteger progznum = new AtomicInteger();
|
|
|
+ AtomicInteger procngznum = new AtomicInteger();
|
|
|
+ AtomicInteger projxnum = new AtomicInteger();
|
|
|
+ AtomicInteger procnjxnum = new AtomicInteger();
|
|
|
+ AtomicInteger prodwslnum = new AtomicInteger();
|
|
|
+ AtomicInteger prohjslnum = new AtomicInteger();
|
|
|
+ AtomicInteger prolxnum = new AtomicInteger();
|
|
|
+
|
|
|
+ //六种
|
|
|
+ AtomicInteger prodjts = new AtomicInteger();
|
|
|
+ AtomicInteger progzts = new AtomicInteger();
|
|
|
+ AtomicInteger protxzd = new AtomicInteger();
|
|
|
+ AtomicInteger prowhtj = new AtomicInteger();
|
|
|
+ AtomicInteger proxdts = new AtomicInteger();
|
|
|
+ AtomicInteger proyxts = new AtomicInteger();
|
|
|
+
|
|
|
+ lineList.stream().forEach(line->{
|
|
|
+ List<Windturbine> windturbines = linewtmap.get(line.getId());
|
|
|
+ Map<String, Windpowerstationpointnew> linemap = linepointmap.get(line.getId());
|
|
|
+ AtomicInteger djnum = new AtomicInteger();
|
|
|
+ AtomicInteger tjnum = new AtomicInteger();
|
|
|
+ AtomicInteger fdnum = new AtomicInteger();
|
|
|
+ AtomicInteger fdjclnum = new AtomicInteger();
|
|
|
+ AtomicInteger xdjclnum = new AtomicInteger();
|
|
|
+ AtomicInteger xdtjnum = new AtomicInteger();
|
|
|
+ AtomicInteger gznum = new AtomicInteger();
|
|
|
+ AtomicInteger cngznum = new AtomicInteger();
|
|
|
+ AtomicInteger jxnum = new AtomicInteger();
|
|
|
+ AtomicInteger cnjxnum = new AtomicInteger();
|
|
|
+ AtomicInteger dwslnum = new AtomicInteger();
|
|
|
+ AtomicInteger hjslnum = new AtomicInteger();
|
|
|
+ AtomicInteger lxnum = new AtomicInteger();
|
|
|
+ //六种
|
|
|
+ AtomicInteger djts = new AtomicInteger();
|
|
|
+ AtomicInteger gzts = new AtomicInteger();
|
|
|
+ AtomicInteger txzd = new AtomicInteger();
|
|
|
+ AtomicInteger whtj = new AtomicInteger();
|
|
|
+ AtomicInteger xdts = new AtomicInteger();
|
|
|
+ AtomicInteger yxts = new AtomicInteger();
|
|
|
+
|
|
|
+ windturbines.stream().forEach(wt->{
|
|
|
+ Windturbinetestingpointnew windturbinetestingpointnew = wtpAimap.get(wt.getId()).get(Contant.ZTMX);
|
|
|
+ try {
|
|
|
+ double valueInDouble = edosUtil.getRealData(windturbinetestingpointnew).getPointValueInDouble();
|
|
|
+ switch ((int) valueInDouble){
|
|
|
+ case 0:
|
|
|
+ djnum.getAndIncrement();
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ tjnum.getAndIncrement();
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ fdnum.getAndIncrement();
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ fdjclnum.getAndIncrement();
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ xdjclnum.getAndIncrement();
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ xdtjnum.getAndIncrement();
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ gznum.getAndIncrement();
|
|
|
+ break;
|
|
|
+ case 7:
|
|
|
+ cngznum.getAndIncrement();
|
|
|
+ break;
|
|
|
+ case 8:
|
|
|
+ jxnum.getAndIncrement();
|
|
|
+ break;
|
|
|
+ case 9:
|
|
|
+ cnjxnum.getAndIncrement();
|
|
|
+ break;
|
|
|
+ case 10:
|
|
|
+ dwslnum.getAndIncrement();
|
|
|
+ break;
|
|
|
+ case 11:
|
|
|
+ hjslnum.getAndIncrement();
|
|
|
+ break;
|
|
|
+ case 12:
|
|
|
+ lxnum.getAndIncrement();
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ fdnum.getAndIncrement();
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //待机台数0
|
|
|
+ Windpowerstationpointnew djnumPointNew = linemap.get(Contant.DJNUM);
|
|
|
+ PointData djnumPoint = createWpPoint(djnum, djnumPointNew);
|
|
|
+ prodjnum.addAndGet(djnum.intValue());
|
|
|
+ resultList.add(djnumPoint);
|
|
|
+ //停机台数1
|
|
|
+ Windpowerstationpointnew tjnumPointNew = linemap.get(Contant.TJNUM);
|
|
|
+ PointData tjnumPoint = createWpPoint(tjnum, tjnumPointNew);
|
|
|
+ protjnum.addAndGet(tjnum.intValue());
|
|
|
+ resultList.add(tjnumPoint);
|
|
|
+ //待机台数6-0
|
|
|
+ djts.addAndGet(djnum.intValue()+tjnum.intValue());
|
|
|
+ Windpowerstationpointnew djtsPointNew = linemap.get(Contant.DJTS);
|
|
|
+ PointData djtsPoint = createWpPoint(djts, djtsPointNew);
|
|
|
+ resultList.add(djtsPoint);
|
|
|
+ //运行台数2
|
|
|
+ Windpowerstationpointnew fdnumPointNew = linemap.get(Contant.FDNUM);
|
|
|
+ PointData fdnumPoint = createWpPoint(fdnum, fdnumPointNew);
|
|
|
+ profdnum.addAndGet(fdnum.intValue());
|
|
|
+ resultList.add(fdnumPoint);
|
|
|
+ //降出力台数3
|
|
|
+ Windpowerstationpointnew fdjclnumPointNew = linemap.get(Contant.FDJCLNUM);
|
|
|
+ PointData fdjclnumPoint = createWpPoint(fdjclnum, fdjclnumPointNew);
|
|
|
+ profdjclnum.addAndGet(fdjclnum.intValue());
|
|
|
+ resultList.add(fdjclnumPoint);
|
|
|
+ //运行台数6-1
|
|
|
+ yxts.addAndGet(fdnum.intValue()+fdjclnum.intValue());
|
|
|
+ Windpowerstationpointnew yxtsPointNew = linemap.get(Contant.YXTS);
|
|
|
+ PointData yxtsPoint = createWpPoint(yxts, yxtsPointNew);
|
|
|
+ resultList.add(yxtsPoint);
|
|
|
+
|
|
|
+ //限电降出力台数4
|
|
|
+ Windpowerstationpointnew xdjclnumPointNew = linemap.get(Contant.XDJCLNUM);
|
|
|
+ PointData xdjclnumPoint = createWpPoint(xdjclnum, xdjclnumPointNew);
|
|
|
+ proxdjclnum.addAndGet(xdjclnum.intValue());
|
|
|
+ resultList.add(xdjclnumPoint);
|
|
|
+ //限电停机台数5
|
|
|
+ Windpowerstationpointnew xdtjnumPointNew = linemap.get(Contant.XDTJNUM);
|
|
|
+ PointData xdtjnumPoint = createWpPoint(xdtjnum, xdtjnumPointNew);
|
|
|
+ proxdtjnum.addAndGet(xdtjnum.intValue());
|
|
|
+ resultList.add(xdtjnumPoint);
|
|
|
+ //限电台数6-5
|
|
|
+ xdts.addAndGet(xdjclnum.intValue()+xdtjnum.intValue());
|
|
|
+ Windpowerstationpointnew xdtsPointNew = linemap.get(Contant.XDTS);
|
|
|
+ PointData xdtsPoint = createWpPoint(xdts, xdtsPointNew);
|
|
|
+ resultList.add(xdtsPoint);
|
|
|
+
|
|
|
+ //故障台数6
|
|
|
+ Windpowerstationpointnew gznumPointNew = linemap.get(Contant.GZNUM);
|
|
|
+ PointData gznumPoint = createWpPoint(gznum, gznumPointNew);
|
|
|
+ progznum.addAndGet(gznum.intValue());
|
|
|
+ resultList.add(gznumPoint);
|
|
|
+ //故障受累台数7
|
|
|
+ Windpowerstationpointnew cngznumPointNew = linemap.get(Contant.CNGZNUM);
|
|
|
+ PointData cngznumPoint = createWpPoint(cngznum, cngznumPointNew);
|
|
|
+ procngznum.addAndGet(cngznum.intValue());
|
|
|
+ resultList.add(cngznumPoint);
|
|
|
+
|
|
|
+
|
|
|
+ //检修台数8
|
|
|
+ Windpowerstationpointnew jxnumPointNew = linemap.get(Contant.JXNUM);
|
|
|
+ PointData jxnumPoint = createWpPoint(jxnum, jxnumPointNew);
|
|
|
+ projxnum.addAndGet(jxnum.intValue());
|
|
|
+ resultList.add(jxnumPoint);
|
|
|
+ //检修受累台数9
|
|
|
+ Windpowerstationpointnew cnjxnumPointNew = linemap.get(Contant.CNJXNUM);
|
|
|
+ PointData cnjxnumPoint = createWpPoint(cnjxnum, cnjxnumPointNew);
|
|
|
+ procnjxnum.addAndGet(cnjxnum.intValue());
|
|
|
+ resultList.add(cnjxnumPoint);
|
|
|
+
|
|
|
+ //检修台数6-4
|
|
|
+ whtj.addAndGet(jxnum.intValue()+cnjxnum.intValue());
|
|
|
+ Windpowerstationpointnew whtjPointNew = linemap.get(Contant.WHTJ);
|
|
|
+ PointData whtjPoint = createWpPoint(whtj, whtjPointNew);
|
|
|
+ resultList.add(whtjPoint);
|
|
|
+ //电网受累台数10
|
|
|
+ Windpowerstationpointnew dwslnumPointNew = linemap.get(Contant.DWSLNUM);
|
|
|
+ PointData dwslnumPoint = createWpPoint(dwslnum, dwslnumPointNew);
|
|
|
+ prodwslnum.addAndGet(dwslnum.intValue());
|
|
|
+ resultList.add(dwslnumPoint);
|
|
|
+ //环境受累台数11
|
|
|
+ Windpowerstationpointnew hjslnumPointNew = linemap.get(Contant.HJSLNUM);
|
|
|
+ PointData hjslnumPoint = createWpPoint(hjslnum, hjslnumPointNew);
|
|
|
+ prohjslnum.addAndGet(hjslnum.intValue());
|
|
|
+ resultList.add(hjslnumPoint);
|
|
|
+
|
|
|
+ //故障台数6-2
|
|
|
+ gzts.addAndGet(gznum.intValue()+cngznum.intValue()+dwslnum.intValue()+hjslnum.intValue());
|
|
|
+ Windpowerstationpointnew gztsPointNew = linemap.get(Contant.GZTJ);
|
|
|
+ PointData gztjPoint = createWpPoint(gzts, gztsPointNew);
|
|
|
+ resultList.add(gztjPoint);
|
|
|
+
|
|
|
+ //离线台数12
|
|
|
+ Windpowerstationpointnew lxnumPointNew = linemap.get(Contant.LXNUM);
|
|
|
+ Windpowerstationpointnew txzdPointNew = linemap.get(Contant.TXZD);
|
|
|
+ PointData lxnumPoint = createWpPoint(lxnum, lxnumPointNew);
|
|
|
+ PointData txzdPoint = createWpPoint(lxnum, txzdPointNew);
|
|
|
+ prolxnum.addAndGet(lxnum.intValue());
|
|
|
+ resultList.add(lxnumPoint);
|
|
|
+ resultList.add(txzdPoint);
|
|
|
+ });
|
|
|
+ //待机台数0
|
|
|
+ Windpowerstationpointnew djnumPointNew = projectmap.get(Contant.DJNUM);
|
|
|
+ PointData djnumPoint = createWpPoint(prodjnum, djnumPointNew);
|
|
|
+ wpdjnum.addAndGet(prodjnum.intValue());
|
|
|
+ resultList.add(djnumPoint);
|
|
|
+ //停机台数1
|
|
|
+ Windpowerstationpointnew tjnumPointNew = projectmap.get(Contant.TJNUM);
|
|
|
+ PointData tjnumPoint = createWpPoint(protjnum, tjnumPointNew);
|
|
|
+ wptjnum.addAndGet(protjnum.intValue());
|
|
|
+ resultList.add(tjnumPoint);
|
|
|
+ //待机台数6-0
|
|
|
+ Windpowerstationpointnew djtsPointNew = projectmap.get(Contant.DJTS);
|
|
|
+ prodjts.addAndGet(prodjnum.intValue()+protjnum.intValue());
|
|
|
+ PointData djtsPoint = createWpPoint(prodjts, djtsPointNew);
|
|
|
+ resultList.add(djtsPoint);
|
|
|
+
|
|
|
+ //运行台数2
|
|
|
+ Windpowerstationpointnew fdnumPointNew = projectmap.get(Contant.FDNUM);
|
|
|
+ PointData fdnumPoint = createWpPoint(profdnum, fdnumPointNew);
|
|
|
+ wpfdnum.addAndGet(profdnum.intValue());
|
|
|
+ resultList.add(fdnumPoint);
|
|
|
+ //降出力台数3
|
|
|
+ Windpowerstationpointnew fdjclnumPointNew = projectmap.get(Contant.FDJCLNUM);
|
|
|
+ PointData fdjclnumPoint = createWpPoint(profdjclnum, fdjclnumPointNew);
|
|
|
+ wpfdjclnum.addAndGet(profdjclnum.intValue());
|
|
|
+ resultList.add(fdjclnumPoint);
|
|
|
+ //运行台数6-1
|
|
|
+ Windpowerstationpointnew yxtsPointNew = projectmap.get(Contant.YXTS);
|
|
|
+ proyxts.addAndGet(profdnum.intValue()+profdjclnum.intValue());
|
|
|
+ PointData yxtsPoint = createWpPoint(proyxts, yxtsPointNew);
|
|
|
+ resultList.add(yxtsPoint);
|
|
|
+
|
|
|
+ //限电降出力台数4
|
|
|
+ Windpowerstationpointnew xdjclnumPointNew = projectmap.get(Contant.XDJCLNUM);
|
|
|
+ PointData xdjclnumPoint = createWpPoint(proxdjclnum, xdjclnumPointNew);
|
|
|
+ wpxdjclnum.addAndGet(proxdjclnum.intValue());
|
|
|
+ resultList.add(xdjclnumPoint);
|
|
|
+ //限电停机台数5
|
|
|
+ Windpowerstationpointnew xdtjnumPointNew = projectmap.get(Contant.XDTJNUM);
|
|
|
+ PointData xdtjnumPoint = createWpPoint(proxdtjnum, xdtjnumPointNew);
|
|
|
+ wpxdtjnum.addAndGet(proxdtjnum.intValue());
|
|
|
+ resultList.add(xdtjnumPoint);
|
|
|
+ //限电台数6-5
|
|
|
+ Windpowerstationpointnew xdtsPointNew = projectmap.get(Contant.XDTS);
|
|
|
+ proxdts.addAndGet(proxdjclnum.intValue()+proxdtjnum.intValue());
|
|
|
+ PointData xdtsPoint = createWpPoint(proxdts, xdtsPointNew);
|
|
|
+ resultList.add(xdtsPoint);
|
|
|
+
|
|
|
+ //故障台数6
|
|
|
+ Windpowerstationpointnew gznumPointNew = projectmap.get(Contant.GZNUM);
|
|
|
+ PointData gznumPoint = createWpPoint(progznum, gznumPointNew);
|
|
|
+ wpgznum.addAndGet(progznum.intValue());
|
|
|
+ resultList.add(gznumPoint);
|
|
|
+ //故障受累台数7
|
|
|
+ Windpowerstationpointnew cngznumPointNew = projectmap.get(Contant.CNGZNUM);
|
|
|
+ PointData cngznumPoint = createWpPoint(procngznum, cngznumPointNew);
|
|
|
+ wpcngznum.addAndGet(procngznum.intValue());
|
|
|
+ resultList.add(cngznumPoint);
|
|
|
+
|
|
|
+
|
|
|
+ //检修台数8
|
|
|
+ Windpowerstationpointnew jxnumPointNew = projectmap.get(Contant.JXNUM);
|
|
|
+ PointData jxnumPoint = createWpPoint(projxnum, jxnumPointNew);
|
|
|
+ wpjxnum.addAndGet(projxnum.intValue());
|
|
|
+ resultList.add(jxnumPoint);
|
|
|
+ //检修受累台数9
|
|
|
+ Windpowerstationpointnew cnjxnumPointNew = projectmap.get(Contant.CNJXNUM);
|
|
|
+ PointData cnjxnumPoint = createWpPoint(procnjxnum, cnjxnumPointNew);
|
|
|
+ wpcnjxnum.addAndGet(procnjxnum.intValue());
|
|
|
+ resultList.add(cnjxnumPoint);
|
|
|
+
|
|
|
+ //检修台数6-4
|
|
|
+ Windpowerstationpointnew jxtsPointNew = projectmap.get(Contant.WHTJ);
|
|
|
+ prowhtj.addAndGet(projxnum.intValue()+procnjxnum.intValue());
|
|
|
+ PointData jxtsPoint = createWpPoint(prowhtj, jxtsPointNew);
|
|
|
+ resultList.add(jxtsPoint);
|
|
|
+ //电网受累台数10
|
|
|
+ Windpowerstationpointnew dwslnumPointNew = projectmap.get(Contant.DWSLNUM);
|
|
|
+ PointData dwslnumPoint = createWpPoint(prodwslnum, dwslnumPointNew);
|
|
|
+ wpdwslnum.addAndGet(prodwslnum.intValue());
|
|
|
+ resultList.add(dwslnumPoint);
|
|
|
+ //环境受累台数11
|
|
|
+ Windpowerstationpointnew hjslnumPointNew = projectmap.get(Contant.HJSLNUM);
|
|
|
+ PointData hjslnumPoint = createWpPoint(prohjslnum, hjslnumPointNew);
|
|
|
+ wphjslnum.addAndGet(prohjslnum.intValue());
|
|
|
+ resultList.add(hjslnumPoint);
|
|
|
+ //故障台数6-2
|
|
|
+ Windpowerstationpointnew gztsPointNew = projectmap.get(Contant.GZTJ);
|
|
|
+ progzts.addAndGet(progznum.intValue()+procngznum.intValue()+prodwslnum.intValue()+prohjslnum.intValue());
|
|
|
+ PointData gztsPoint = createWpPoint(progzts, gztsPointNew);
|
|
|
+ resultList.add(gztsPoint);
|
|
|
+ //离线台数12
|
|
|
+ Windpowerstationpointnew lxnumPointNew = projectmap.get(Contant.LXNUM);
|
|
|
+ Windpowerstationpointnew txzdPointNew = projectmap.get(Contant.TXZD);
|
|
|
+ PointData lxnumPoint = createWpPoint(prolxnum, lxnumPointNew);
|
|
|
+ PointData txzdPoint = createWpPoint(prolxnum, txzdPointNew);
|
|
|
+ wplxnum.addAndGet(prolxnum.intValue());
|
|
|
+ resultList.add(lxnumPoint);
|
|
|
+ resultList.add(txzdPoint);
|
|
|
+ });
|
|
|
+ //待机台数0
|
|
|
+ Windpowerstationpointnew djnumPointNew = wpmap.get(Contant.DJNUM);
|
|
|
+ PointData djnumPoint = createWpPoint(wpdjnum, djnumPointNew);
|
|
|
+ resultList.add(djnumPoint);
|
|
|
+ //停机台数1
|
|
|
+ Windpowerstationpointnew tjnumPointNew = wpmap.get(Contant.TJNUM);
|
|
|
+ PointData tjnumPoint = createWpPoint(wptjnum, tjnumPointNew);
|
|
|
+ resultList.add(tjnumPoint);
|
|
|
+
|
|
|
+ //待机台数6-0
|
|
|
+ Windpowerstationpointnew djtsPointNew = wpmap.get(Contant.DJTS);
|
|
|
+ wpdjts.addAndGet(wpdjnum.intValue()+wptjnum.intValue());
|
|
|
+ PointData djtsPoint = createWpPoint(wpdjts, djtsPointNew);
|
|
|
+ resultList.add(djtsPoint);
|
|
|
+ //运行台数2
|
|
|
+ Windpowerstationpointnew fdnumPointNew = wpmap.get(Contant.FDNUM);
|
|
|
+ PointData fdnumPoint = createWpPoint(wpfdnum, fdnumPointNew);
|
|
|
+ resultList.add(fdnumPoint);
|
|
|
+ //降出力台数3
|
|
|
+ Windpowerstationpointnew fdjclnumPointNew = wpmap.get(Contant.FDJCLNUM);
|
|
|
+ PointData fdjclnumPoint = createWpPoint(wpfdjclnum, fdjclnumPointNew);
|
|
|
+ resultList.add(fdjclnumPoint);
|
|
|
+
|
|
|
+ //运行台数6-1
|
|
|
+ Windpowerstationpointnew yxtsPointNew = wpmap.get(Contant.YXTS);
|
|
|
+ wpyxts.addAndGet(wpfdnum.intValue()+wpfdjclnum.intValue());
|
|
|
+ PointData yxtsPoint = createWpPoint(wpyxts, yxtsPointNew);
|
|
|
+ resultList.add(yxtsPoint);
|
|
|
+ //限电降出力台数4
|
|
|
+ Windpowerstationpointnew xdjclnumPointNew = wpmap.get(Contant.XDJCLNUM);
|
|
|
+ PointData xdjclnumPoint = createWpPoint(wpxdjclnum, xdjclnumPointNew);
|
|
|
+ resultList.add(xdjclnumPoint);
|
|
|
+ //限电停机台数5
|
|
|
+ Windpowerstationpointnew xdtjnumPointNew = wpmap.get(Contant.XDTJNUM);
|
|
|
+ PointData xdtjnumPoint = createWpPoint(wpxdtjnum, xdtjnumPointNew);
|
|
|
+ resultList.add(xdtjnumPoint);
|
|
|
+
|
|
|
+ //限电台数6-5
|
|
|
+ Windpowerstationpointnew xdtsPointNew = wpmap.get(Contant.XDTS);
|
|
|
+ wpxdts.addAndGet(wpxdjclnum.intValue()+wpxdtjnum.intValue());
|
|
|
+ PointData xdtsPoint = createWpPoint(wpxdts, xdtsPointNew);
|
|
|
+ resultList.add(xdtsPoint);
|
|
|
+ //故障台数6
|
|
|
+ Windpowerstationpointnew gznumPointNew = wpmap.get(Contant.GZNUM);
|
|
|
+ PointData gznumPoint = createWpPoint(wpgznum, gznumPointNew);
|
|
|
+ resultList.add(gznumPoint);
|
|
|
+ //故障受累台数7
|
|
|
+ Windpowerstationpointnew cngznumPointNew = wpmap.get(Contant.CNGZNUM);
|
|
|
+ PointData cngznumPoint = createWpPoint(wpcngznum, cngznumPointNew);
|
|
|
+ resultList.add(cngznumPoint);
|
|
|
+
|
|
|
+
|
|
|
+ //检修台数8
|
|
|
+ Windpowerstationpointnew jxnumPointNew = wpmap.get(Contant.JXNUM);
|
|
|
+ PointData jxnumPoint = createWpPoint(wpjxnum, jxnumPointNew);
|
|
|
+ resultList.add(jxnumPoint);
|
|
|
+ //检修受累台数9
|
|
|
+ Windpowerstationpointnew cnjxnumPointNew = wpmap.get(Contant.CNJXNUM);
|
|
|
+ PointData cnjxnumPoint = createWpPoint(wpcnjxnum, cnjxnumPointNew);
|
|
|
+ resultList.add(cnjxnumPoint);
|
|
|
+ //检修台数6-4
|
|
|
+ Windpowerstationpointnew jxtsPointNew = wpmap.get(Contant.WHTJ);
|
|
|
+ wpwhtj.addAndGet(wpjxnum.intValue()+wpcnjxnum.intValue());
|
|
|
+ PointData jxtsPoint = createWpPoint(wpwhtj, jxtsPointNew);
|
|
|
+ resultList.add(jxtsPoint);
|
|
|
+ //电网受累台数10
|
|
|
+ Windpowerstationpointnew dwslnumPointNew = wpmap.get(Contant.DWSLNUM);
|
|
|
+ PointData dwslnumPoint = createWpPoint(wpdwslnum, dwslnumPointNew);
|
|
|
+ resultList.add(dwslnumPoint);
|
|
|
+ //环境受累台数11
|
|
|
+ Windpowerstationpointnew hjslnumPointNew = wpmap.get(Contant.HJSLNUM);
|
|
|
+ PointData hjslnumPoint = createWpPoint(wphjslnum, hjslnumPointNew);
|
|
|
+ resultList.add(hjslnumPoint);
|
|
|
+ //故障台数6-2
|
|
|
+ Windpowerstationpointnew gztsPointNew = wpmap.get(Contant.GZTJ);
|
|
|
+ wpgzts.addAndGet(wpgznum.intValue()+wpcngznum.intValue()+wpdwslnum.intValue()+wphjslnum.intValue());
|
|
|
+ PointData gztsPoint = createWpPoint(wpgzts, gztsPointNew);
|
|
|
+ resultList.add(gztsPoint);
|
|
|
+ //离线台数12
|
|
|
+ Windpowerstationpointnew lxnumPointNew = wpmap.get(Contant.LXNUM);
|
|
|
+ Windpowerstationpointnew txzdPointNew = wpmap.get(Contant.TXZD);
|
|
|
+ PointData lxnumPoint = createWpPoint(wplxnum, lxnumPointNew);
|
|
|
+ PointData txzdPoint = createWpPoint(wplxnum, txzdPointNew);
|
|
|
+ resultList.add(lxnumPoint);
|
|
|
+ });
|
|
|
+ edosUtil.sendMultiPoint(resultList);
|
|
|
+ }
|
|
|
+
|
|
|
+ private PointData createWpPoint(AtomicInteger tjnum, Windpowerstationpointnew tjnumPoint) {
|
|
|
+ PointData pointData = new PointData();
|
|
|
+ pointData.setEdnaId(tjnumPoint.getCode());
|
|
|
+ pointData.setPointName(tjnumPoint.getName());
|
|
|
+ pointData.setPointTime(currentDate.getTime());
|
|
|
+ pointData.setPointValue(String.valueOf(tjnum.doubleValue()));
|
|
|
+ pointData.setPointValueInDouble(tjnum.doubleValue());
|
|
|
+ return pointData;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 判断是否降出力
|
|
|
+ * @param wt
|
|
|
+ * @param stringWindturbinetestingpointnewMap
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ private boolean isJcl(Windturbine wt, Map<String, Windturbinetestingpointnew> stringWindturbinetestingpointnewMap) throws Exception {
|
|
|
+ boolean isJcl = false;
|
|
|
+ Windturbinetestingpointnew ai134point = stringWindturbinetestingpointnewMap.get(Contant.AI134);
|
|
|
+ Windturbinetestingpointnew ai178point = stringWindturbinetestingpointnewMap.get(Contant.AI178);
|
|
|
+ Windturbinetestingpointnew ai443point = stringWindturbinetestingpointnewMap.get(Contant.AI443);
|
|
|
+ if (!ai134point.getCode().equals("INITIAL")){
|
|
|
+ Double realData = edosUtil.getRealData(ai134point).getPointValueInDouble();
|
|
|
+ if (realData<Double.parseDouble(AI134)){
|
|
|
+ isJcl = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!ai178point.getCode().equals("INITIAL")){
|
|
|
+ Double realData = edosUtil.getRealData(ai178point).getPointValueInDouble();
|
|
|
+ if (realData<Double.parseDouble(AI178)){
|
|
|
+ isJcl = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!ai443point.getCode().equals("INITIAL")){
|
|
|
+ Double realData = edosUtil.getRealData(ai443point).getPointValueInDouble();
|
|
|
+ if (realData<modelMap.get(wt.getModelid()).getPowerproduction()){
|
|
|
+ isJcl = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return isJcl;
|
|
|
+ }
|
|
|
+
|
|
|
private PointData createPointData(Windturbinetestingpointnew ztmxPoint, Integer mxstatus) {
|
|
|
PointData pointData = new PointData();
|
|
|
pointData.setEdnaId(ztmxPoint.getCode());
|