|
@@ -1,7 +1,7 @@
|
|
package com.gyee.generation.service;
|
|
package com.gyee.generation.service;
|
|
|
|
|
|
import com.alibaba.druid.sql.ast.TDDLHint;
|
|
import com.alibaba.druid.sql.ast.TDDLHint;
|
|
-import com.gyee.common.contant.Contant;
|
|
|
|
|
|
+import com.gyee.common.contant.ContantXk;
|
|
import com.gyee.common.model.DNAVal;
|
|
import com.gyee.common.model.DNAVal;
|
|
import com.gyee.common.model.PointData;
|
|
import com.gyee.common.model.PointData;
|
|
import com.gyee.generation.init.CacheContext;
|
|
import com.gyee.generation.init.CacheContext;
|
|
@@ -25,7 +25,7 @@ public class ShutdownService {
|
|
private static final Logger log = LoggerFactory.getLogger(ShutdownService.class);
|
|
private static final Logger log = LoggerFactory.getLogger(ShutdownService.class);
|
|
@Resource
|
|
@Resource
|
|
private IEdosUtil edosUtil;
|
|
private IEdosUtil edosUtil;
|
|
- private final String ALARMHISTORY="ALARMHISTORY";
|
|
|
|
|
|
+// private final String ALARMHISTORY="ALARMHISTORY";
|
|
@Resource
|
|
@Resource
|
|
private IProEconWtPowerCurveFittingService proEconWtPowerCurveFittingService;
|
|
private IProEconWtPowerCurveFittingService proEconWtPowerCurveFittingService;
|
|
@Resource
|
|
@Resource
|
|
@@ -107,12 +107,29 @@ public class ShutdownService {
|
|
|
|
|
|
public void Init()
|
|
public void Init()
|
|
{
|
|
{
|
|
|
|
+// statusDescription.put(0, "待机");
|
|
|
|
+// statusDescription.put(1, "并网");
|
|
|
|
+// statusDescription.put(2, "停机");
|
|
|
|
+// statusDescription.put(3, "通讯中断");
|
|
|
|
+// statusDescription.put(4, "维护");
|
|
|
|
+// statusDescription.put(5, "限电");
|
|
|
|
+
|
|
statusDescription.put(0, "待机");
|
|
statusDescription.put(0, "待机");
|
|
- statusDescription.put(1, "并网");
|
|
|
|
- statusDescription.put(2, "停机");
|
|
|
|
- statusDescription.put(3, "通讯中断");
|
|
|
|
- statusDescription.put(4, "维护");
|
|
|
|
- statusDescription.put(5, "限电");
|
|
|
|
|
|
+ statusDescription.put(1, "手动停机");
|
|
|
|
+ statusDescription.put(2, "正常发电");
|
|
|
|
+ statusDescription.put(3, "缺陷降出力");
|
|
|
|
+ statusDescription.put(4, "故障停机");
|
|
|
|
+ statusDescription.put(5, "故障受累");
|
|
|
|
+ statusDescription.put(6, "检修停机");
|
|
|
|
+ statusDescription.put(7, "检修受累");
|
|
|
|
+ statusDescription.put(8, "限电降出力");
|
|
|
|
+ statusDescription.put(9, "限电停机");
|
|
|
|
+ statusDescription.put(10, "电网受累");
|
|
|
|
+ statusDescription.put(11, "环境受累");
|
|
|
|
+ statusDescription.put(12, "通讯中断");
|
|
|
|
+ statusDescription.put(13, "设备离线");
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
String[] appStr = new String[keystr.length];
|
|
String[] appStr = new String[keystr.length];
|
|
@@ -133,24 +150,24 @@ public class ShutdownService {
|
|
//筛选风机对应测点
|
|
//筛选风机对应测点
|
|
wtls.stream().forEach(wt->{
|
|
wtls.stream().forEach(wt->{
|
|
Map<String, ProBasicEquipmentPoint> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
|
|
Map<String, ProBasicEquipmentPoint> windturbinetestingpointnewMap = wtpAimap.get(wt.getId());
|
|
- if(windturbinetestingpointnewMap.containsKey(Contant.FJ5T))
|
|
|
|
|
|
+ if(windturbinetestingpointnewMap.containsKey(ContantXk.MXZT))
|
|
{
|
|
{
|
|
- ProBasicEquipmentPoint mxztPoint = windturbinetestingpointnewMap.get(Contant.FJ5T);
|
|
|
|
|
|
+ ProBasicEquipmentPoint mxztPoint = windturbinetestingpointnewMap.get(ContantXk.MXZT);
|
|
|
|
|
|
items.add(mxztPoint);
|
|
items.add(mxztPoint);
|
|
}
|
|
}
|
|
|
|
|
|
- if(windturbinetestingpointnewMap.containsKey(Contant.AI130))
|
|
|
|
|
|
+ if(windturbinetestingpointnewMap.containsKey(ContantXk.CJ_SSGL))
|
|
{
|
|
{
|
|
- ProBasicEquipmentPoint ygglPoint = windturbinetestingpointnewMap.get(Contant.AI130);
|
|
|
|
|
|
+ ProBasicEquipmentPoint ygglPoint = windturbinetestingpointnewMap.get(ContantXk.CJ_SSGL);
|
|
|
|
|
|
powerPoints.put(ygglPoint.getCode(),ygglPoint);
|
|
powerPoints.put(ygglPoint.getCode(),ygglPoint);
|
|
powerpointList.add(ygglPoint);
|
|
powerpointList.add(ygglPoint);
|
|
}
|
|
}
|
|
|
|
|
|
- if(windturbinetestingpointnewMap.containsKey(Contant.AI022))
|
|
|
|
|
|
+ if(windturbinetestingpointnewMap.containsKey(ContantXk.CJ_SSFS))
|
|
{
|
|
{
|
|
- ProBasicEquipmentPoint mxztPoint = windturbinetestingpointnewMap.get(Contant.AI022);
|
|
|
|
|
|
+ ProBasicEquipmentPoint mxztPoint = windturbinetestingpointnewMap.get(ContantXk.CJ_SSFS);
|
|
|
|
|
|
speedpointList.add(mxztPoint);
|
|
speedpointList.add(mxztPoint);
|
|
}
|
|
}
|
|
@@ -173,9 +190,9 @@ public class ShutdownService {
|
|
CacheContext.wpls.stream().forEach(wp->{
|
|
CacheContext.wpls.stream().forEach(wp->{
|
|
|
|
|
|
Map<String, ProBasicWppoint> wppointsmap = CacheContext.wppointmap.get(wp.getId());
|
|
Map<String, ProBasicWppoint> wppointsmap = CacheContext.wppointmap.get(wp.getId());
|
|
- if(wppointsmap.containsKey(Contant.IRRAD))
|
|
|
|
|
|
+ if(wppointsmap.containsKey(ContantXk.FCCFTFS70))
|
|
{
|
|
{
|
|
- ProBasicWppoint mxztPoint = wppointsmap.get(Contant.IRRAD);
|
|
|
|
|
|
+ ProBasicWppoint mxztPoint = wppointsmap.get(ContantXk.FCCFTFS70);
|
|
|
|
|
|
gzdpointList.add(mxztPoint);
|
|
gzdpointList.add(mxztPoint);
|
|
}
|
|
}
|
|
@@ -262,19 +279,19 @@ public class ShutdownService {
|
|
double power = 0;
|
|
double power = 0;
|
|
if (powerPoints.containsKey(key))
|
|
if (powerPoints.containsKey(key))
|
|
{
|
|
{
|
|
- power = StringUtils.round(edosUtil.getRealData(powerPoints.get(key).getCode()).getPointValueInDouble(),2);
|
|
|
|
|
|
+ power = StringUtils.round(edosUtil.getRealData(powerPoints.get(key).getCode()).getPointValueInDouble(),4);
|
|
|
|
|
|
}
|
|
}
|
|
- Double value = StringUtils.round(edosUtil.getRealData(statusPoints.get(key).getCode()).getPointValueInDouble(),2);
|
|
|
|
|
|
+ Double value = StringUtils.round(edosUtil.getRealData(statusPoints.get(key).getCode()).getPointValueInDouble(),4);
|
|
|
|
|
|
if (power > 1)
|
|
if (power > 1)
|
|
{
|
|
{
|
|
- status.put(key,value == 5 ? 1 : value.intValue());
|
|
|
|
|
|
+ status.put(key,value == 9 ? 1 : value.intValue());
|
|
|
|
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- status.put(key,value == 5 ? 0 : value.intValue());
|
|
|
|
|
|
+ status.put(key,value == 9 ? 0 : value.intValue());
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -484,7 +501,7 @@ public class ShutdownService {
|
|
/// <param name="status"></param>
|
|
/// <param name="status"></param>
|
|
private void updateAndAddStatus2(ProEconWindturbineStatus status) throws Exception {
|
|
private void updateAndAddStatus2(ProEconWindturbineStatus status) throws Exception {
|
|
Integer oldStatus = (Integer)status.getSatusCode();
|
|
Integer oldStatus = (Integer)status.getSatusCode();
|
|
- if (oldStatus == 2 || oldStatus == 4)
|
|
|
|
|
|
+ if (oldStatus == 4 || oldStatus == 6)
|
|
{
|
|
{
|
|
|
|
|
|
ProEconShutdownEvent ose = oldShutdownEvent.get(status.getWindturbineId());
|
|
ProEconShutdownEvent ose = oldShutdownEvent.get(status.getWindturbineId());
|
|
@@ -562,9 +579,9 @@ public class ShutdownService {
|
|
if (shutdwonEvent != null)
|
|
if (shutdwonEvent != null)
|
|
{
|
|
{
|
|
|
|
|
|
- if (currentStatus == 2 || currentStatus == 4)
|
|
|
|
|
|
+ if (currentStatus == 4 || currentStatus == 6)
|
|
{
|
|
{
|
|
- if (oldStatus == 0 || oldStatus == 1 || oldStatus == 3)
|
|
|
|
|
|
+ if (oldStatus == 0 || oldStatus == 1 || oldStatus == 12)
|
|
{
|
|
{
|
|
proEconShutdownEventService.save(shutdwonEvent);
|
|
proEconShutdownEventService.save(shutdwonEvent);
|
|
|
|
|
|
@@ -573,7 +590,7 @@ public class ShutdownService {
|
|
}
|
|
}
|
|
if (interrup != null)
|
|
if (interrup != null)
|
|
{
|
|
{
|
|
- if (currentStatus == 3 && oldStatus != 3)
|
|
|
|
|
|
+ if (currentStatus == 12 && oldStatus != 12)
|
|
{
|
|
{
|
|
proEconInterruptionService.save(interrup);
|
|
proEconInterruptionService.save(interrup);
|
|
|
|
|
|
@@ -582,9 +599,9 @@ public class ShutdownService {
|
|
// 新增 shutdownevent2 实时
|
|
// 新增 shutdownevent2 实时
|
|
if (shutdwonEvent2 != null)
|
|
if (shutdwonEvent2 != null)
|
|
{
|
|
{
|
|
- if (currentStatus == 2 || currentStatus == 4)
|
|
|
|
|
|
+ if (currentStatus == 4 || currentStatus == 6)
|
|
{
|
|
{
|
|
- if (oldStatus == 0 || oldStatus == 1 || oldStatus == 3)
|
|
|
|
|
|
+ if (oldStatus == 0 || oldStatus == 1 || oldStatus == 12)
|
|
{
|
|
{
|
|
Date dtbegin = DateUtils.addMinutes(shutdwonEvent2.getStopTime(),-30);
|
|
Date dtbegin = DateUtils.addMinutes(shutdwonEvent2.getStopTime(),-30);
|
|
Date dtend = shutdwonEvent2.getStopTime();
|
|
Date dtend = shutdwonEvent2.getStopTime();
|
|
@@ -615,9 +632,9 @@ public class ShutdownService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (oldStatus == 2 || oldStatus == 4)
|
|
|
|
|
|
+ if (oldStatus == 4 || oldStatus == 6)
|
|
{
|
|
{
|
|
- if (currentStatus == 0 || currentStatus == 1 || currentStatus == 3)
|
|
|
|
|
|
+ if (currentStatus == 0 || currentStatus == 1 || currentStatus == 12)
|
|
{
|
|
{
|
|
ProEconShutdownEvent ose = oldShutdownEvent.get(status.getWindturbineId());
|
|
ProEconShutdownEvent ose = oldShutdownEvent.get(status.getWindturbineId());
|
|
if (ose != null)
|
|
if (ose != null)
|
|
@@ -629,7 +646,7 @@ public class ShutdownService {
|
|
|
|
|
|
if (!ose.getStoptypeId().equals("wh"))
|
|
if (!ose.getStoptypeId().equals("wh"))
|
|
{
|
|
{
|
|
- String s =newMethod( status.getWindturbineId(), DateUtils.addMinutes(ose.getStopTime(),-5), date);
|
|
|
|
|
|
+ String s =newMethod( status.getWindturbineId(), DateUtils.addMinutes(ose.getStopTime(),-9), date);
|
|
if (StringUtils.notEmp(s))
|
|
if (StringUtils.notEmp(s))
|
|
{
|
|
{
|
|
ose.setStoptypeId(s);
|
|
ose.setStoptypeId(s);
|
|
@@ -658,7 +675,7 @@ public class ShutdownService {
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- String s = newMethod( status.getWindturbineId(), DateUtils.addMinutes(ose2.getStopTime(),-5), date);
|
|
|
|
|
|
+ String s = newMethod( status.getWindturbineId(), DateUtils.addMinutes(ose2.getStopTime(),-9), date);
|
|
if (StringUtils.notEmp(s))
|
|
if (StringUtils.notEmp(s))
|
|
{
|
|
{
|
|
ose2.setStopTypeId(s);
|
|
ose2.setStopTypeId(s);
|
|
@@ -670,7 +687,7 @@ public class ShutdownService {
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (oldStatus == 3 && currentStatus != 3)
|
|
|
|
|
|
+ if (oldStatus == 12 && currentStatus != 12)
|
|
{
|
|
{
|
|
ProEconInterruption item = oldInterrup.get(status.getWindturbineId());
|
|
ProEconInterruption item = oldInterrup.get(status.getWindturbineId());
|
|
if (item != null)
|
|
if (item != null)
|
|
@@ -688,7 +705,7 @@ public class ShutdownService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
private Double calcLossPower(String windturbineId, Date startDate, Date endDate) throws Exception {
|
|
private Double calcLossPower(String windturbineId, Date startDate, Date endDate) throws Exception {
|
|
Double result = 0.0;
|
|
Double result = 0.0;
|
|
@@ -704,21 +721,21 @@ public class ShutdownService {
|
|
if(endDate.after(startDate) && c1.get(Calendar.YEAR)==c2.get(Calendar.YEAR))
|
|
if(endDate.after(startDate) && c1.get(Calendar.YEAR)==c2.get(Calendar.YEAR))
|
|
{
|
|
{
|
|
//年故障损失电量
|
|
//年故障损失电量
|
|
- if(wtpointmap.containsKey(Contant.WTNGZSSDL) )
|
|
|
|
|
|
+ if(wtpointmap.containsKey(ContantXk.NGZSSDL) )
|
|
{
|
|
{
|
|
double beginvalue=0.0;
|
|
double beginvalue=0.0;
|
|
double endvalue=0.0;
|
|
double endvalue=0.0;
|
|
|
|
|
|
- String[] pointid=new String[1];
|
|
|
|
- pointid[0]=wtpointmap.get(Contant.WTNGZSSDL).getCode();
|
|
|
|
- DNAVal[] xdbegin=edosUtil.getHistMatrix(pointid,Integer.valueOf(String.valueOf(startDate.getTime()/1000)));
|
|
|
|
- DNAVal[] xdend=edosUtil.getHistMatrix(pointid,Integer.valueOf(String.valueOf(endDate.getTime()/1000)));
|
|
|
|
|
|
+ List<String> pointid=new ArrayList<>();
|
|
|
|
+ pointid.add(wtpointmap.get(ContantXk.NGZSSDL).getCode());
|
|
|
|
+ List<PointData> xdbegin=edosUtil.getHistMatrix(pointid,startDate.getTime()/1000);
|
|
|
|
+ List<PointData> xdend=edosUtil.getHistMatrix(pointid,endDate.getTime()/1000);
|
|
|
|
|
|
|
|
|
|
- if(xdbegin.length==1 && xdend.length==1)
|
|
|
|
|
|
+ if(xdbegin.size()==1 && xdend.size()==1)
|
|
{
|
|
{
|
|
- beginvalue=xdbegin[0].DValue;
|
|
|
|
- endvalue=xdend[0].DValue;
|
|
|
|
|
|
+ beginvalue=xdbegin.get(0).getPointValueInDouble();
|
|
|
|
+ endvalue=xdend.get(0).getPointValueInDouble();
|
|
|
|
|
|
if (endvalue > beginvalue) {
|
|
if (endvalue > beginvalue) {
|
|
result =result+(endvalue - beginvalue);
|
|
result =result+(endvalue - beginvalue);
|
|
@@ -726,7 +743,7 @@ public class ShutdownService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
}else
|
|
}else
|
|
{
|
|
{
|
|
Calendar c=Calendar.getInstance();
|
|
Calendar c=Calendar.getInstance();
|
|
@@ -735,21 +752,23 @@ public class ShutdownService {
|
|
//获得1月1日零点值
|
|
//获得1月1日零点值
|
|
Date endtime=c.getTime();
|
|
Date endtime=c.getTime();
|
|
//年故障损失电量
|
|
//年故障损失电量
|
|
- if(wtpointmap.containsKey(Contant.WTNGZSSDL) )
|
|
|
|
|
|
+ if(wtpointmap.containsKey(ContantXk.NGZSSDL) )
|
|
{
|
|
{
|
|
double beginvalue=0.0;
|
|
double beginvalue=0.0;
|
|
double endvalue=0.0;
|
|
double endvalue=0.0;
|
|
|
|
|
|
- String[] pointid=new String[1];
|
|
|
|
- pointid[0]=wtpointmap.get(Contant.WTNGZSSDL).getCode();
|
|
|
|
- DNAVal[] xdbegin=edosUtil.getHistMatrix(pointid,Integer.valueOf(String.valueOf(startDate.getTime()/1000)));
|
|
|
|
- DNAVal[] xdend=edosUtil.getHistMatrix(pointid,Integer.valueOf(String.valueOf(endtime.getTime()/1000)));
|
|
|
|
|
|
|
|
|
|
|
|
- if(xdbegin.length==1 && xdend.length==1)
|
|
|
|
|
|
+ List<String> pointid=new ArrayList<>();
|
|
|
|
+ pointid.add(wtpointmap.get(ContantXk.NGZSSDL).getCode());
|
|
|
|
+ List<PointData> xdbegin=edosUtil.getHistMatrix(pointid,startDate.getTime()/1000);
|
|
|
|
+ List<PointData> xdend=edosUtil.getHistMatrix(pointid,endDate.getTime()/1000);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(xdbegin.size()==1 && xdend.size()==1)
|
|
{
|
|
{
|
|
- beginvalue=xdbegin[0].DValue;
|
|
|
|
- endvalue=xdend[0].DValue;
|
|
|
|
|
|
+ beginvalue=xdbegin.get(0).getPointValueInDouble();
|
|
|
|
+ endvalue=xdend.get(0).getPointValueInDouble();
|
|
|
|
|
|
if (endvalue > beginvalue) {
|
|
if (endvalue > beginvalue) {
|
|
result =result+(endvalue - beginvalue);
|
|
result =result+(endvalue - beginvalue);
|
|
@@ -761,20 +780,21 @@ public class ShutdownService {
|
|
|
|
|
|
|
|
|
|
//日故障损失电量
|
|
//日故障损失电量
|
|
- if(wtpointmap.containsKey(Contant.WTNGZSSDL) )
|
|
|
|
|
|
+ if(wtpointmap.containsKey(ContantXk.NGZSSDL) )
|
|
{
|
|
{
|
|
|
|
|
|
double endvalue=0.0;
|
|
double endvalue=0.0;
|
|
|
|
|
|
- String[] pointid=new String[1];
|
|
|
|
- pointid[0]=wtpointmap.get(Contant.WTNGZSSDL).getCode();
|
|
|
|
- DNAVal[] xdend=edosUtil.getHistMatrix(pointid,Integer.valueOf(String.valueOf(endDate.getTime()/1000)));
|
|
|
|
|
|
+
|
|
|
|
+ List<String> pointid=new ArrayList<>();
|
|
|
|
+ pointid.add(wtpointmap.get(ContantXk.NGZSSDL).getCode());
|
|
|
|
+ List<PointData> xdend=edosUtil.getHistMatrix(pointid,startDate.getTime()/1000);
|
|
|
|
|
|
|
|
|
|
- if(xdend.length==1)
|
|
|
|
|
|
+ if(xdend.size()==1)
|
|
{
|
|
{
|
|
|
|
|
|
- endvalue=xdend[0].DValue;
|
|
|
|
|
|
+ endvalue=xdend.get(0).getPointValueInDouble();
|
|
|
|
|
|
if (endvalue > 0) {
|
|
if (endvalue > 0) {
|
|
result =result+endvalue;
|
|
result =result+endvalue;
|
|
@@ -838,7 +858,7 @@ public class ShutdownService {
|
|
// retValue.WINDTURBINEID = windturbineId;
|
|
// retValue.WINDTURBINEID = windturbineId;
|
|
|
|
|
|
// Integer currentStatus = status[windturbineId];
|
|
// Integer currentStatus = status[windturbineId];
|
|
- // if (currentStatus == 2 || currentStatus == 4)
|
|
|
|
|
|
+ // if (currentStatus == 4 || currentStatus == 6)
|
|
// {
|
|
// {
|
|
// shutdwonEvent = new ProEconShutdownEvent();
|
|
// shutdwonEvent = new ProEconShutdownEvent();
|
|
// shutdwonEvent.ID = Guid.NewGuid().ToString();
|
|
// shutdwonEvent.ID = Guid.NewGuid().ToString();
|
|
@@ -849,12 +869,12 @@ public class ShutdownService {
|
|
// shutdwonEvent.WINDTURBINEID = windturbineId;
|
|
// shutdwonEvent.WINDTURBINEID = windturbineId;
|
|
|
|
|
|
|
|
|
|
- // if (currentStatus == 2)
|
|
|
|
|
|
+ // if (currentStatus == 4)
|
|
// {
|
|
// {
|
|
- // var begin = date.AddMinutes(-5);
|
|
|
|
|
|
+ // var begin = date.AddMinutes(-9);
|
|
// var temp = entities.WARNINGRECORDS.Where(it => it.WARNINGTIME >= begin && it.WARNINGTIME <= date && it.WINDTURBINEID == windturbineId).FirstOrDefault();
|
|
// var temp = entities.WARNINGRECORDS.Where(it => it.WARNINGTIME >= begin && it.WARNINGTIME <= date && it.WINDTURBINEID == windturbineId).FirstOrDefault();
|
|
|
|
|
|
- // shutdwonEvent.STOPTYPEID = currentStatus == 2 ? "gzbmq" : "wh";
|
|
|
|
|
|
+ // shutdwonEvent.STOPTYPEID = currentStatus == 4 ? "gzbmq" : "wh";
|
|
// if (temp != null)
|
|
// if (temp != null)
|
|
// {
|
|
// {
|
|
// var id = temp.WARNINGID;
|
|
// var id = temp.WARNINGID;
|
|
@@ -872,7 +892,7 @@ public class ShutdownService {
|
|
|
|
|
|
// retValue.SHUTDOWNEVENTID = shutdwonEvent.ID;
|
|
// retValue.SHUTDOWNEVENTID = shutdwonEvent.ID;
|
|
// }
|
|
// }
|
|
- // if (currentStatus == 3)
|
|
|
|
|
|
+ // if (currentStatus == 12)
|
|
// {
|
|
// {
|
|
// interrup = new ProEconInterruption();
|
|
// interrup = new ProEconInterruption();
|
|
// interrup.PROJECTID = retValue.PROJECTID;
|
|
// interrup.PROJECTID = retValue.PROJECTID;
|
|
@@ -900,7 +920,7 @@ public class ShutdownService {
|
|
retValue.setWindturbineId(windturbineId);
|
|
retValue.setWindturbineId(windturbineId);
|
|
|
|
|
|
Integer currentStatus = status.get(windturbineId);
|
|
Integer currentStatus = status.get(windturbineId);
|
|
- if (currentStatus == 2 || currentStatus == 4)
|
|
|
|
|
|
+ if (currentStatus == 4 || currentStatus == 6)
|
|
{
|
|
{
|
|
shutdwonEvent = new ProEconShutdownEvent();
|
|
shutdwonEvent = new ProEconShutdownEvent();
|
|
shutdwonEvent.setId(StringUtils.getUUID());
|
|
shutdwonEvent.setId(StringUtils.getUUID());
|
|
@@ -919,12 +939,12 @@ public class ShutdownService {
|
|
shutdwonEvent2.setWinpowerstationId(retValue.getWindpowerstationId());
|
|
shutdwonEvent2.setWinpowerstationId(retValue.getWindpowerstationId());
|
|
shutdwonEvent2.setWindturbineId(windturbineId);
|
|
shutdwonEvent2.setWindturbineId(windturbineId);
|
|
|
|
|
|
- if (currentStatus == 2)
|
|
|
|
|
|
+ if (currentStatus == 4)
|
|
{
|
|
{
|
|
- Date begin =DateUtils.addMinutes(date,-5);
|
|
|
|
- Date end = DateUtils.addMinutes(date,5);
|
|
|
|
- shutdwonEvent.setStoptypeId(currentStatus == 2 ? "gzbmq" : "wh");
|
|
|
|
- shutdwonEvent2.setStopTypeId(currentStatus == 2 ? "gzbmq" : "wh");
|
|
|
|
|
|
+ Date begin =DateUtils.addMinutes(date,-9);
|
|
|
|
+ Date end = DateUtils.addMinutes(date,9);
|
|
|
|
+ shutdwonEvent.setStoptypeId(currentStatus == 4 ? "gzbmq" : "wh");
|
|
|
|
+ shutdwonEvent2.setStopTypeId(currentStatus == 4 ? "gzbmq" : "wh");
|
|
//读取报警记录表前后五分钟数据,选取第一个报警报警类型
|
|
//读取报警记录表前后五分钟数据,选取第一个报警报警类型
|
|
String s =newMethod( windturbineId, begin, end);
|
|
String s =newMethod( windturbineId, begin, end);
|
|
if (StringUtils.notEmp(s))
|
|
if (StringUtils.notEmp(s))
|
|
@@ -943,7 +963,7 @@ public class ShutdownService {
|
|
}
|
|
}
|
|
retValue.setShutdownEventId(shutdwonEvent.getId());
|
|
retValue.setShutdownEventId(shutdwonEvent.getId());
|
|
}
|
|
}
|
|
- if (currentStatus == 3)
|
|
|
|
|
|
+ if (currentStatus == 12)
|
|
{
|
|
{
|
|
interrup = new ProEconInterruption();
|
|
interrup = new ProEconInterruption();
|
|
interrup.setProjectId(retValue.getProjectId());
|
|
interrup.setProjectId(retValue.getProjectId());
|
|
@@ -954,10 +974,10 @@ public class ShutdownService {
|
|
return retValue;
|
|
return retValue;
|
|
}
|
|
}
|
|
|
|
|
|
- //TODO-SL
|
|
|
|
|
|
+ //TODO-SL 需要添加报警记录关联停机事件方法
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 需要添加报警记录关联停机事件方法
|
|
|
|
|
|
+ *
|
|
* @param windturbineId
|
|
* @param windturbineId
|
|
* @param begin
|
|
* @param begin
|
|
* @param end
|
|
* @param end
|