|
@@ -457,16 +457,151 @@ public class StatusService {
|
|
Map<String, ProEconEquipmentmodel> modelMap = CacheContext.modelMap;
|
|
Map<String, ProEconEquipmentmodel> modelMap = CacheContext.modelMap;
|
|
Map<String, Map<Integer, Integer>> aistateMap = CacheContext.aistateMap;
|
|
Map<String, Map<Integer, Integer>> aistateMap = CacheContext.aistateMap;
|
|
Date currentDate = DateUtils.getCurrentDate();
|
|
Date currentDate = DateUtils.getCurrentDate();
|
|
-
|
|
|
|
|
|
+ List<ProBasicEquipment> wtls = CacheContext.wtls;
|
|
|
|
+ /********************************************************************************************************************/
|
|
List<PointData> resultList = new ArrayList<>();
|
|
List<PointData> resultList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+ List<String> dipointls=new ArrayList<>();
|
|
|
|
+
|
|
|
|
+ List<PointData> dipointDatals = new ArrayList<>();
|
|
|
|
+
|
|
|
|
+ Map<String, PointData> divalueMap = new HashMap<>();
|
|
|
|
+
|
|
|
|
+ Map<String, Map<String, PointData>> diresultMaps = new HashMap<>();
|
|
|
|
+
|
|
|
|
+ for(ProBasicEquipment wt:wtls) {
|
|
|
|
+
|
|
|
|
+ //每个状态一个状态点
|
|
|
|
+
|
|
|
|
+ if(statusMap.containsKey(wt.getId()))
|
|
|
|
+ {
|
|
|
|
+ List<ProBasicStatusPoint> windturbinestatusdis = statusMap.get(wt.getId()).stream()
|
|
|
|
+ .filter(w -> w.getUniformCode().equals(ContantXk.MX000) || w.getUniformCode().equals(ContantXk.MX001) ||
|
|
|
|
+ w.getUniformCode().equals(ContantXk.MX002) || w.getUniformCode().equals(ContantXk.MX003) ||
|
|
|
|
+ w.getUniformCode().equals(ContantXk.MX004) || w.getUniformCode().equals(ContantXk.MX005) ||
|
|
|
|
+ w.getUniformCode().equals(ContantXk.MX006) || w.getUniformCode().equals(ContantXk.MX007) ||
|
|
|
|
+ w.getUniformCode().equals(ContantXk.MX008) || w.getUniformCode().equals(ContantXk.MX009) ||
|
|
|
|
+ w.getUniformCode().equals(ContantXk.MX010) || w.getUniformCode().equals(ContantXk.MX011) ||
|
|
|
|
+ w.getUniformCode().equals(ContantXk.MX012) || w.getUniformCode().equals(ContantXk.MX013)
|
|
|
|
+
|
|
|
|
+ ).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ for (ProBasicStatusPoint w : windturbinestatusdis) {
|
|
|
|
+ dipointls.add(w.getNemCode());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(dipointls.size()>=3000)
|
|
|
|
+ {
|
|
|
|
+ List<PointData> templs=edosUtil.getRealData(dipointls);
|
|
|
|
+ dipointDatals.addAll(templs);
|
|
|
|
+ dipointls=new ArrayList<>();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(!dipointls.isEmpty())
|
|
|
|
+ {
|
|
|
|
+ List<PointData> templs=edosUtil.getRealData(dipointls);
|
|
|
|
+ dipointDatals.addAll(templs);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(!dipointDatals.isEmpty())
|
|
|
|
+ {
|
|
|
|
+ for(PointData po:dipointDatals)
|
|
|
|
+ {
|
|
|
|
+ divalueMap.put(po.getEdnaId(),po);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ for(ProBasicEquipment wt:wtls) {
|
|
|
|
+
|
|
|
|
+ if(statusMap.containsKey(wt.getId()))
|
|
|
|
+ {
|
|
|
|
+ //每个状态一个状态点
|
|
|
|
+ List<ProBasicStatusPoint> windturbinestatusdis = statusMap.get(wt.getId()).stream()
|
|
|
|
+ .filter(w -> w.getUniformCode().equals(ContantXk.MX000) || w.getUniformCode().equals(ContantXk.MX001) ||
|
|
|
|
+ w.getUniformCode().equals(ContantXk.MX002) || w.getUniformCode().equals(ContantXk.MX003) ||
|
|
|
|
+ w.getUniformCode().equals(ContantXk.MX004) || w.getUniformCode().equals(ContantXk.MX005) ||
|
|
|
|
+ w.getUniformCode().equals(ContantXk.MX006) || w.getUniformCode().equals(ContantXk.MX007) ||
|
|
|
|
+ w.getUniformCode().equals(ContantXk.MX008) || w.getUniformCode().equals(ContantXk.MX009) ||
|
|
|
|
+ w.getUniformCode().equals(ContantXk.MX010) || w.getUniformCode().equals(ContantXk.MX011) ||
|
|
|
|
+ w.getUniformCode().equals(ContantXk.MX012) || w.getUniformCode().equals(ContantXk.MX013)
|
|
|
|
+
|
|
|
|
+ ).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+ for (ProBasicStatusPoint w : windturbinestatusdis) {
|
|
|
|
+
|
|
|
|
+ if(divalueMap.containsKey(w.getNemCode()))
|
|
|
|
+ {
|
|
|
|
+ if(diresultMaps.containsKey(w.getWindturbineId()))
|
|
|
|
+ {
|
|
|
|
+ Map<String,PointData> map=diresultMaps.get(w.getWindturbineId());
|
|
|
|
+
|
|
|
|
+ map.put(w.getUniformCode(),divalueMap.get(w.getNemCode()));
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ Map<String,PointData> map=new HashMap<>();
|
|
|
|
+ map.put(w.getUniformCode(),divalueMap.get(w.getNemCode()));
|
|
|
|
+ diresultMaps.put(w.getWindturbineId(),map);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ /********************************************************************************************************************/
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ List<String> aipointls=new ArrayList<>();
|
|
|
|
+ List<String> aiwtls=new ArrayList<>();
|
|
|
|
+ List<PointData> aipointDatals = new ArrayList<>();
|
|
|
|
+
|
|
|
|
+ Map<String, PointData> aivalueMap = new HashMap<>();
|
|
|
|
+
|
|
|
|
+ for(ProBasicEquipment wt:wtls) {
|
|
|
|
+
|
|
|
|
+ String aiordi = modelMap.get(wt.getModelId()).getDescription();
|
|
|
|
+ if (aiordi.equals("AI")){
|
|
|
|
+
|
|
|
|
+ Optional<ProBasicStatusPoint> first = statusMap.get(wt.getId()).stream().filter(w -> w.getUniformCode().equals(Contant.AI422)).findFirst();
|
|
|
|
+ if (first.isPresent()){
|
|
|
|
+ ProBasicStatusPoint windturbinestatusdi = first.get();
|
|
|
|
+ aipointls.add(windturbinestatusdi.getNemCode());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ aiwtls.add(wt.getId());
|
|
|
|
+ if(aipointls.size()>=3000)
|
|
|
|
+ {
|
|
|
|
+ List<PointData> templs=edosUtil.getRealData(aipointls);
|
|
|
|
+ aipointDatals.addAll(templs);
|
|
|
|
+ aipointls=new ArrayList<>();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(!aipointls.isEmpty())
|
|
|
|
+ {
|
|
|
|
+ List<PointData> templs=edosUtil.getRealData(aipointls);
|
|
|
|
+ aipointDatals.addAll(templs);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(aipointDatals.size() == aiwtls.size())
|
|
|
|
+ {
|
|
|
|
+ for(int i=0;i<aipointDatals.size();i++)
|
|
|
|
+ {
|
|
|
|
+ PointData po=aipointDatals.get(i);
|
|
|
|
+ aivalueMap.put(aiwtls.get(i),po);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ /**************************************************************************************************************************************/
|
|
|
|
+
|
|
List<String> pointls=new ArrayList<>();
|
|
List<String> pointls=new ArrayList<>();
|
|
|
|
|
|
List<PointData> pointDatals = new ArrayList<>();
|
|
List<PointData> pointDatals = new ArrayList<>();
|
|
|
|
|
|
- List<ProBasicEquipment> wtls = CacheContext.wtls;
|
|
|
|
-
|
|
|
|
for(ProBasicEquipment wt:wtls) {
|
|
for(ProBasicEquipment wt:wtls) {
|
|
Map<String, ProBasicEquipmentPoint> equipmentPointMap = wtpAimap.get(wt.getId());
|
|
Map<String, ProBasicEquipmentPoint> equipmentPointMap = wtpAimap.get(wt.getId());
|
|
//中间状态点
|
|
//中间状态点
|
|
@@ -475,19 +610,19 @@ public class StatusService {
|
|
ProBasicEquipmentPoint gpztPoint = equipmentPointMap.get(ContantXk.GPZT);
|
|
ProBasicEquipmentPoint gpztPoint = equipmentPointMap.get(ContantXk.GPZT);
|
|
//明细状态点
|
|
//明细状态点
|
|
ProBasicEquipmentPoint mxztPoint = equipmentPointMap.get(ContantXk.MXZT);
|
|
ProBasicEquipmentPoint mxztPoint = equipmentPointMap.get(ContantXk.MXZT);
|
|
-
|
|
|
|
//状态持续时间,以秒计算
|
|
//状态持续时间,以秒计算
|
|
ProBasicEquipmentPoint ztcxsjPoint = equipmentPointMap.get(ContantXk.ZTCXSJ);
|
|
ProBasicEquipmentPoint ztcxsjPoint = equipmentPointMap.get(ContantXk.ZTCXSJ);
|
|
|
|
+ //实时功率点
|
|
|
|
+ ProBasicEquipmentPoint ssglPoint = equipmentPointMap.get(ContantXk.CJ_SSGL);
|
|
|
|
|
|
pointls.add(zjztPoint.getNemCode());
|
|
pointls.add(zjztPoint.getNemCode());
|
|
pointls.add(gpztPoint.getNemCode());
|
|
pointls.add(gpztPoint.getNemCode());
|
|
-
|
|
|
|
pointls.add(mxztPoint.getNemCode());
|
|
pointls.add(mxztPoint.getNemCode());
|
|
-
|
|
|
|
pointls.add(ztcxsjPoint.getNemCode());
|
|
pointls.add(ztcxsjPoint.getNemCode());
|
|
|
|
+ pointls.add(ssglPoint.getNemCode());
|
|
|
|
|
|
|
|
|
|
- if(pointls.size()>=1000)
|
|
|
|
|
|
+ if(pointls.size()>=3000)
|
|
{
|
|
{
|
|
List<PointData> templs=edosUtil.getRealData(pointls);
|
|
List<PointData> templs=edosUtil.getRealData(pointls);
|
|
pointDatals.addAll(templs);
|
|
pointDatals.addAll(templs);
|
|
@@ -501,8 +636,6 @@ public class StatusService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
for(int x=0;x<wtls.size();x++) {
|
|
for(int x=0;x<wtls.size();x++) {
|
|
ProBasicEquipment wt=wtls.get(x);
|
|
ProBasicEquipment wt=wtls.get(x);
|
|
Map<String, ProBasicEquipmentPoint> equipmentPointMap = wtpAimap.get(wt.getId());
|
|
Map<String, ProBasicEquipmentPoint> equipmentPointMap = wtpAimap.get(wt.getId());
|
|
@@ -513,69 +646,34 @@ public class StatusService {
|
|
ProBasicEquipmentPoint mxztPoint = equipmentPointMap.get(ContantXk.MXZT);
|
|
ProBasicEquipmentPoint mxztPoint = equipmentPointMap.get(ContantXk.MXZT);
|
|
//状态持续时间,以秒计算
|
|
//状态持续时间,以秒计算
|
|
ProBasicEquipmentPoint ztcxsjPoint = equipmentPointMap.get(ContantXk.ZTCXSJ);
|
|
ProBasicEquipmentPoint ztcxsjPoint = equipmentPointMap.get(ContantXk.ZTCXSJ);
|
|
|
|
+ //实时功率点
|
|
|
|
+ ProBasicEquipmentPoint ssglPoint = equipmentPointMap.get(ContantXk.CJ_SSGL);
|
|
|
|
|
|
- String[] interruption = null;
|
|
|
|
- if (wt.getEquipmentCategory() == -1) {
|
|
|
|
- interruption = ContantXk.INTERRUPTION.split(",");
|
|
|
|
- } else if (wt.getEquipmentCategory() == -2) {
|
|
|
|
-
|
|
|
|
- interruption = ContantXk.INTERRUPTIONGF.split(",");
|
|
|
|
- }
|
|
|
|
|
|
|
|
- List<String> interruptionList = new ArrayList<>();
|
|
|
|
- Arrays.stream(interruption).forEach(i -> {
|
|
|
|
- ProBasicEquipmentPoint equipmentPoint = equipmentPointMap.get(i);
|
|
|
|
- if (!equipmentPoint.getNemCode().equals("INITIAL")) {
|
|
|
|
- interruptionList.add(equipmentPoint.getNemCode());
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- double mxzt = 0;
|
|
|
|
- double ztcxsj = 0;
|
|
|
|
- try {
|
|
|
|
- mxzt = pointDatals.get(x*4+2).getPointValueInDouble();
|
|
|
|
- ztcxsj =pointDatals.get(x*4+3).getPointValueInDouble();
|
|
|
|
|
|
+ double zjzt = pointDatals.get(x*5).getPointValueInDouble();
|
|
|
|
+ double gpzt = pointDatals.get(x*5+1).getPointValueInDouble();
|
|
|
|
+ double mxzt = pointDatals.get(x*5+2).getPointValueInDouble();
|
|
|
|
+ double ztcxsj =pointDatals.get(x*5+3).getPointValueInDouble();
|
|
|
|
+ double ssgl = pointDatals.get(x*5+4).getPointValueInDouble();;
|
|
|
|
|
|
-// mxzt = edosUtil.getSectionData(mxztPoint, currentDate.getTime()).getPointValueInDouble();
|
|
|
|
-// ztcxsj = edosUtil.getSectionData(ztcxsjPoint, currentDate.getTime()).getPointValueInDouble();
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
|
|
+// if (wt.getId().equals("SXJ_KGDL_YF_F_WT_0021_EQ")) {
|
|
|
|
+// System.out.println("");
|
|
|
|
+// }
|
|
|
|
|
|
- Double status = 0.0;
|
|
|
|
- Double mxstatus = 2.0;
|
|
|
|
|
|
+ double status = 0.0;
|
|
|
|
+ double mxstatus = 2.0;
|
|
try {
|
|
try {
|
|
- if (StringUtils.isEmpty(interruptionList)) {
|
|
|
|
|
|
+ if (zjzt == 1) {
|
|
mxstatus = 12.0;
|
|
mxstatus = 12.0;
|
|
status = 6.0;
|
|
status = 6.0;
|
|
|
|
+ }else if (zjzt == 3) {
|
|
|
|
+ mxstatus = getGpzt(gpzt, ssgl);
|
|
} else {
|
|
} else {
|
|
|
|
|
|
-
|
|
|
|
Calendar c = Calendar.getInstance();
|
|
Calendar c = Calendar.getInstance();
|
|
c.setTime(currentDate);
|
|
c.setTime(currentDate);
|
|
|
|
|
|
-
|
|
|
|
-// if (wt.getId().equals("SXJ_KGDL_YF_F_WT_0021_EQ")) {
|
|
|
|
-// System.out.println("");
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
- //实时功率点
|
|
|
|
- ProBasicEquipmentPoint ssglPoint = equipmentPointMap.get(ContantXk.CJ_SSGL);
|
|
|
|
- PointData ssgldata= edosUtil.getRealData(ssglPoint);
|
|
|
|
-
|
|
|
|
- double ssgl = ssgldata.getPointValueInDouble();
|
|
|
|
- double gpzt = pointDatals.get(x*4+1).getPointValueInDouble();
|
|
|
|
- double zjzt = pointDatals.get(x*4).getPointValueInDouble();
|
|
|
|
-// double ssgl = edosUtil.getSectionData(ssglPoint, currentDate.getTime()).getPointValueInDouble();
|
|
|
|
-// double gpzt = edosUtil.getSectionData(gpztPoint, currentDate.getTime()).getPointValueInDouble();
|
|
|
|
-// double xdzt = edosUtil.getSectionData(xdztPoint, currentDate.getTime()).getPointValueInDouble();
|
|
|
|
-
|
|
|
|
- if (zjzt == 1) {
|
|
|
|
- mxstatus = 12.0;
|
|
|
|
- }else if (zjzt == 3) {
|
|
|
|
- mxstatus = getGpzt(gpzt, ssgl);
|
|
|
|
- } else {
|
|
|
|
- mxstatus = getMxzt(zjzt,modelMap, aistateMap, statusMap, wt,ssgl);
|
|
|
|
- }
|
|
|
|
|
|
+ mxstatus = getMxzt(zjzt,modelMap, aistateMap, statusMap, wt,ssgl,aivalueMap, diresultMaps);
|
|
|
|
|
|
if (mxstatus == 0 || mxstatus == 1) {
|
|
if (mxstatus == 0 || mxstatus == 1) {
|
|
status = 0.0;
|
|
status = 0.0;
|
|
@@ -1082,26 +1180,27 @@ public class StatusService {
|
|
edosUtil.sendMultiPoint(resultList);
|
|
edosUtil.sendMultiPoint(resultList);
|
|
}
|
|
}
|
|
|
|
|
|
- private double getMxzt(double zjzt,Map<String, ProEconEquipmentmodel> modelMap,Map<String, Map<Integer, Integer>> aistateMap,Map<String, List<ProBasicStatusPoint>> statusMap,ProBasicEquipment wt,double ssgl) throws Exception {
|
|
|
|
|
|
+ private double getMxzt(double zjzt,Map<String, ProEconEquipmentmodel> modelMap,Map<String, Map<Integer, Integer>> aistateMap,
|
|
|
|
+ Map<String, List<ProBasicStatusPoint>> statusMap,ProBasicEquipment wt,double ssgl,
|
|
|
|
+ Map<String, PointData> aivalueMap,Map<String, Map<String, PointData>> diresultMaps) throws Exception {
|
|
|
|
|
|
double mxstatus = 2;
|
|
double mxstatus = 2;
|
|
|
|
|
|
String aiordi = modelMap.get(wt.getModelId()).getDescription();
|
|
String aiordi = modelMap.get(wt.getModelId()).getDescription();
|
|
if (aiordi.equals("AI")){
|
|
if (aiordi.equals("AI")){
|
|
Map<Integer, Integer> stateMap = aistateMap.get(wt.getModelId());
|
|
Map<Integer, Integer> stateMap = aistateMap.get(wt.getModelId());
|
|
- Optional<ProBasicStatusPoint> first = statusMap.get(wt.getId()).stream().filter(w -> w.getUniformCode().equals(Contant.AI422)).findFirst();
|
|
|
|
- if (first.isPresent()){
|
|
|
|
- ProBasicStatusPoint windturbinestatusdi = first.get();
|
|
|
|
- int pointValueInDouble = (int) edosUtil.getRealData(windturbinestatusdi.getNemCode()).getPointValueInDouble();
|
|
|
|
|
|
+ if(aivalueMap.containsKey(wt.getId()))
|
|
|
|
+ {
|
|
|
|
+ PointData po=aivalueMap.get(wt.getId());
|
|
|
|
+ int pointValueInDouble = (int) po.getPointValueInDouble();
|
|
|
|
|
|
if(stateMap.containsKey(pointValueInDouble))
|
|
if(stateMap.containsKey(pointValueInDouble))
|
|
{
|
|
{
|
|
mxstatus = (double)stateMap.get(pointValueInDouble);
|
|
mxstatus = (double)stateMap.get(pointValueInDouble);
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- if(wt.getId().contains("_F_"))
|
|
|
|
|
|
+ if(wt.getId().contains("_F_"))
|
|
{
|
|
{
|
|
if (mxstatus==2 || (mxstatus==3)){
|
|
if (mxstatus==2 || (mxstatus==3)){
|
|
if(ssgl<=10 )
|
|
if(ssgl<=10 )
|
|
@@ -1114,10 +1213,10 @@ public class StatusService {
|
|
mxstatus=2;
|
|
mxstatus=2;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }else
|
|
|
|
|
|
+ }else if(wt.getId().contains("_G_"))
|
|
{
|
|
{
|
|
if (mxstatus==2 || (mxstatus==3)){
|
|
if (mxstatus==2 || (mxstatus==3)){
|
|
- if(ssgl<=1 )
|
|
|
|
|
|
+ if(ssgl<1 )
|
|
{
|
|
{
|
|
mxstatus=0;
|
|
mxstatus=0;
|
|
}
|
|
}
|
|
@@ -1128,96 +1227,66 @@ public class StatusService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
}else {
|
|
}else {
|
|
- //每个状态一个状态点
|
|
|
|
- Map<String,String> stateMap = new HashMap<>();
|
|
|
|
- List<ProBasicStatusPoint> windturbinestatusdis = statusMap.get(wt.getId()).stream()
|
|
|
|
- .filter(w -> w.getUniformCode().equals(ContantXk.MX000) || w.getUniformCode().equals(ContantXk.MX001) ||
|
|
|
|
- w.getUniformCode().equals(ContantXk.MX002) || w.getUniformCode().equals(ContantXk.MX003) ||
|
|
|
|
- w.getUniformCode().equals(ContantXk.MX004) || w.getUniformCode().equals(ContantXk.MX005) ||
|
|
|
|
- w.getUniformCode().equals(ContantXk.MX006) || w.getUniformCode().equals(ContantXk.MX007) ||
|
|
|
|
- w.getUniformCode().equals(ContantXk.MX008) || w.getUniformCode().equals(ContantXk.MX009) ||
|
|
|
|
- w.getUniformCode().equals(ContantXk.MX010) || w.getUniformCode().equals(ContantXk.MX011) ||
|
|
|
|
- w.getUniformCode().equals(ContantXk.MX012) || w.getUniformCode().equals(ContantXk.MX013)
|
|
|
|
-
|
|
|
|
- ).collect(Collectors.toList());
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- List<String> pointls=new ArrayList<>();
|
|
|
|
- for (ProBasicStatusPoint w : windturbinestatusdis) {
|
|
|
|
- pointls.add(w.getNemCode());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- List<PointData> values= edosUtil.getRealData(pointls);
|
|
|
|
-
|
|
|
|
|
|
|
|
- if(values.size()==windturbinestatusdis.size())
|
|
|
|
- {
|
|
|
|
- for (int i=0;i< windturbinestatusdis.size();i++) {
|
|
|
|
- ProBasicStatusPoint w=windturbinestatusdis.get(i);
|
|
|
|
- if (values.get(i).getPointValueInDouble() == 1) {
|
|
|
|
- stateMap.put(w.getUniformCode(), w.getTypeId());
|
|
|
|
- mxstatus = Double.parseDouble(w.getTypeId());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }else
|
|
|
|
|
|
+ if(diresultMaps.containsKey(wt.getId()))
|
|
{
|
|
{
|
|
- for (ProBasicStatusPoint w : windturbinestatusdis) {
|
|
|
|
- PointData realData = edosUtil.getRealData(w.getNemCode());
|
|
|
|
- if (realData.getPointValueInDouble() == 1) {
|
|
|
|
- stateMap.put(w.getUniformCode(), w.getTypeId());
|
|
|
|
- mxstatus = Double.parseDouble(w.getTypeId());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (stateMap.containsKey("MX004") && stateMap.containsKey("MX006")){
|
|
|
|
- mxstatus = Double.parseDouble(stateMap.get("MX006"));
|
|
|
|
- }
|
|
|
|
|
|
+ Map<String, PointData> stateMap = diresultMaps.get(wt.getId());
|
|
|
|
|
|
- if (stateMap.containsKey("MX002") && stateMap.containsKey("MX003")){
|
|
|
|
- mxstatus = Double.parseDouble(stateMap.get("MX003"));
|
|
|
|
- }
|
|
|
|
|
|
+ for (Map.Entry<String, PointData> entry : stateMap.entrySet()) {
|
|
|
|
+ if (entry.getValue().getPointValueInDouble() == 1) {
|
|
|
|
+ mxstatus = entry.getValue().getPointValueInDouble();
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ if (stateMap.containsKey("MX004") && stateMap.containsKey("MX006")){
|
|
|
|
+ mxstatus = stateMap.get("MX006").getPointValueInDouble();
|
|
|
|
+ }
|
|
|
|
|
|
- if(wt.getId().contains("_F_"))
|
|
|
|
- {
|
|
|
|
- if (mxstatus==2 || (mxstatus==3)){
|
|
|
|
- if(ssgl<=10 )
|
|
|
|
- {
|
|
|
|
- mxstatus=0;
|
|
|
|
|
|
+ if (stateMap.containsKey("MX002") && stateMap.containsKey("MX003")){
|
|
|
|
+ mxstatus = stateMap.get("MX003").getPointValueInDouble();
|
|
}
|
|
}
|
|
- }else if (mxstatus==0 || (mxstatus==1)){
|
|
|
|
- if(ssgl>10 )
|
|
|
|
|
|
+
|
|
|
|
+ if(wt.getId().contains("_F_"))
|
|
{
|
|
{
|
|
- mxstatus=2;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }else
|
|
|
|
- {
|
|
|
|
- if (mxstatus==2 || (mxstatus==3)){
|
|
|
|
- if(ssgl<=1 )
|
|
|
|
|
|
+ if (mxstatus==2 || (mxstatus==3)){
|
|
|
|
+ if(ssgl<=10 )
|
|
|
|
+ {
|
|
|
|
+ mxstatus=0;
|
|
|
|
+ }
|
|
|
|
+ }else if (mxstatus==0 || (mxstatus==1)){
|
|
|
|
+ if(ssgl>10 )
|
|
|
|
+ {
|
|
|
|
+ mxstatus=2;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else if(wt.getId().contains("_G_"))
|
|
{
|
|
{
|
|
- mxstatus=0;
|
|
|
|
|
|
+ if (mxstatus==2 || (mxstatus==3)){
|
|
|
|
+ if(ssgl<1 )
|
|
|
|
+ {
|
|
|
|
+ mxstatus=0;
|
|
|
|
+ }
|
|
|
|
+ }else if (mxstatus==0 ){
|
|
|
|
+ if(ssgl>1 )
|
|
|
|
+ {
|
|
|
|
+ mxstatus=2;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }else if (mxstatus==0 ){
|
|
|
|
- if(ssgl>1 )
|
|
|
|
- {
|
|
|
|
- mxstatus=2;
|
|
|
|
|
|
+
|
|
|
|
+ if (zjzt==3){
|
|
|
|
+ if ( stateMap.containsKey("MX009")){
|
|
|
|
+ mxstatus = 9;
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ mxstatus = 8;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
|
|
- if (zjzt==3){
|
|
|
|
- if ( stateMap.containsKey("MX009")){
|
|
|
|
- mxstatus = 9;
|
|
|
|
- }else
|
|
|
|
- {
|
|
|
|
- mxstatus = 8;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1587,7 +1656,7 @@ public class StatusService {
|
|
// System.out.println("完成!。。。。。。");
|
|
// System.out.println("完成!。。。。。。");
|
|
|
|
|
|
Date end=new Date();
|
|
Date end=new Date();
|
|
- System.out.println("执行用时"+ DateUtils.secondsDiff(begin,end) +"秒");
|
|
|
|
|
|
+ System.out.println("执行用时"+ DateUtils.millisecondDiff(begin,end) +"秒");
|
|
System.out.println("设状态判定调度程序执行结束!。。。。。。");
|
|
System.out.println("设状态判定调度程序执行结束!。。。。。。");
|
|
|
|
|
|
Thread.sleep(200);
|
|
Thread.sleep(200);
|
|
@@ -1595,7 +1664,7 @@ public class StatusService {
|
|
}
|
|
}
|
|
public void startMiddleStatusReal() throws Exception {
|
|
public void startMiddleStatusReal() throws Exception {
|
|
|
|
|
|
- System.out.println("中间状态判定调度程序执行开始!。。。。。。");
|
|
|
|
|
|
+// System.out.println("中间状态判定调度程序执行开始!。。。。。。");
|
|
while (true)
|
|
while (true)
|
|
{
|
|
{
|
|
// Calendar c = Calendar.getInstance();
|
|
// Calendar c = Calendar.getInstance();
|