|
@@ -255,8 +255,9 @@ public class StatusService {
|
|
|
public void statusReal() throws Exception {
|
|
|
Map<String, Map<String, ProBasicEquipmentPoint>> wtpAimap = CacheContext.wtpAimap;
|
|
|
List<ProBasicEquipment> wtls = CacheContext.wtls;
|
|
|
- Map<String, ProEconEquipmentmodel> modelMap = CacheContext.modelMap;
|
|
|
Map<String, List<ProBasicStatusPoint>> statusMap = CacheContext.statusMap;
|
|
|
+ Map<String, ProEconEquipmentmodel> modelMap = CacheContext.modelMap;
|
|
|
+ Map<String, Map<Integer, Integer>> aistateMap = CacheContext.aistateMap;
|
|
|
Date currentDate = DateUtils.getCurrentDate();
|
|
|
|
|
|
List<PointData> resultList = new ArrayList<>();
|
|
@@ -317,7 +318,7 @@ public class StatusService {
|
|
|
}else if (xdzt == 1){
|
|
|
mxstatus = getGpzt(1,ssgl);
|
|
|
}else {
|
|
|
- mxstatus = getMxzt(modelMap.get(wt.getModelId()).getWindturbineManufacturerId(),statusMap,wt);
|
|
|
+ mxstatus = getMxzt(modelMap,aistateMap,statusMap,wt);
|
|
|
}
|
|
|
if (mxstatus == 2){
|
|
|
boolean isJcl = isJcl(currentDate, equipmentPointMap);
|
|
@@ -836,326 +837,357 @@ public class StatusService {
|
|
|
edosUtil.sendMultiPoint(resultList);
|
|
|
}
|
|
|
|
|
|
- private double getMxzt(String windturbineManufacturerId,Map<String, List<ProBasicStatusPoint>> statusMap,ProBasicEquipment wt) throws Exception {
|
|
|
- double mxstatus = 2;
|
|
|
- //远景
|
|
|
- if (windturbineManufacturerId.equals("YJNY_MF")){
|
|
|
- if (wt.getWindpowerstationId().equals("SDL_LYDL_BEIH_FDC_STA") || wt.getWindpowerstationId().equals("SDL_LYDL_YS_FDC_STA")){
|
|
|
- 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();
|
|
|
- switch (pointValueInDouble){
|
|
|
- case 1:
|
|
|
- mxstatus = 12.0;
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- case 8:
|
|
|
- mxstatus = 6.0;
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- case 4:
|
|
|
- case 5:
|
|
|
- case 28:
|
|
|
- mxstatus = 1.0;
|
|
|
- break;
|
|
|
- case 6:
|
|
|
- case 7:
|
|
|
- mxstatus = 4.0;
|
|
|
- break;
|
|
|
- case 9:
|
|
|
- mxstatus = 10.0;
|
|
|
- break;
|
|
|
- case 10:
|
|
|
- mxstatus = 9.0;
|
|
|
- break;
|
|
|
- case 11:
|
|
|
- case 12:
|
|
|
- case 13:
|
|
|
- case 14:
|
|
|
- case 15:
|
|
|
- case 29:
|
|
|
- case 30:
|
|
|
- case 31:
|
|
|
- case 32:
|
|
|
- case 33:
|
|
|
- mxstatus = 11.0;
|
|
|
- break;
|
|
|
- case 16:
|
|
|
- case 18:
|
|
|
- case 19:
|
|
|
- case 20:
|
|
|
- case 21:
|
|
|
- mxstatus = 2.0;
|
|
|
- break;
|
|
|
- case 17:
|
|
|
- mxstatus = 0.0;
|
|
|
- break;
|
|
|
- case 22:
|
|
|
- mxstatus = 3.0;
|
|
|
- break;
|
|
|
- case 23:
|
|
|
- case 24:
|
|
|
- case 25:
|
|
|
- case 26:
|
|
|
- mxstatus = 8.0;
|
|
|
- break;
|
|
|
- case 27:
|
|
|
- mxstatus = 13.0;
|
|
|
- break;
|
|
|
- default:
|
|
|
- mxstatus = 2.0;
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- //多状态根据一个点来判断
|
|
|
- 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();
|
|
|
- switch (pointValueInDouble){
|
|
|
- case 1:
|
|
|
- case 3:
|
|
|
- case 4:
|
|
|
- mxstatus = 1.0;
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- case 10:
|
|
|
- mxstatus = 4.0;
|
|
|
- break;
|
|
|
- case 5:
|
|
|
- case 6:
|
|
|
- mxstatus = 2.0;
|
|
|
- break;
|
|
|
- case 7:
|
|
|
- mxstatus = 8.0;
|
|
|
- break;
|
|
|
- case 8:
|
|
|
- mxstatus = 13.0;
|
|
|
- break;
|
|
|
- case 9:
|
|
|
- mxstatus = 0.0;
|
|
|
- break;
|
|
|
- case 11:
|
|
|
- case 12:
|
|
|
- mxstatus = 6.0;
|
|
|
- break;
|
|
|
- default:
|
|
|
- mxstatus = 2.0;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }else if (windturbineManufacturerId.equals("JFKJ_MF") && wt.getCompanyId().equals("SDL_LYDL_ZGS")){
|
|
|
- //多状态根据一个点来判断
|
|
|
- Optional<ProBasicStatusPoint> first = statusMap.get(wt.getId()).stream().filter(w -> w.getUniformCode().equals(Contant.AI422)).findFirst();
|
|
|
- if (first.isPresent()){
|
|
|
- ProBasicStatusPoint windturbinestatusdi = first.get();
|
|
|
+ private double getMxzt(Map<String, ProEconEquipmentmodel> modelMap,Map<String, Map<Integer, Integer>> aistateMap,Map<String, List<ProBasicStatusPoint>> statusMap,ProBasicEquipment wt) throws Exception {
|
|
|
|
|
|
- int pointValueInDouble = (int) edosUtil.getRealData(windturbinestatusdi.getNemCode()).getPointValueInDouble();
|
|
|
- switch (pointValueInDouble){
|
|
|
- case 0:
|
|
|
- case 3:
|
|
|
- mxstatus = 0.0;
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- mxstatus = 1.0;
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- mxstatus = 4.0;
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- case 5:
|
|
|
- mxstatus = 2.0;
|
|
|
- break;
|
|
|
- case 6:
|
|
|
- case 8:
|
|
|
- case 9:
|
|
|
- mxstatus = 6.0;
|
|
|
- break;
|
|
|
- default:
|
|
|
- mxstatus = 2.0;
|
|
|
- }
|
|
|
- }
|
|
|
- }else if (windturbineManufacturerId.equals("LHDL_MF") && wt.getCompanyId().equals("SDL_SXNY_ZGS")){
|
|
|
- //多状态根据一个点来判断
|
|
|
- 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();
|
|
|
- switch (pointValueInDouble){
|
|
|
- //待机
|
|
|
- case 1:
|
|
|
- case 2:
|
|
|
- case 16:
|
|
|
- case 128:
|
|
|
- case 256:
|
|
|
- case 1024:
|
|
|
- mxstatus = 0.0;
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- //故障
|
|
|
- mxstatus = 4.0;
|
|
|
- break;
|
|
|
- case 8:
|
|
|
- //维护
|
|
|
- mxstatus = 6.0;
|
|
|
- break;
|
|
|
- case 32://限电
|
|
|
- mxstatus = 8.0;
|
|
|
- break;
|
|
|
- case 64:
|
|
|
- case 512://运行
|
|
|
- mxstatus = 2.0;
|
|
|
- break;
|
|
|
- default:
|
|
|
- mxstatus = 2.0;
|
|
|
- }
|
|
|
- }
|
|
|
- }else if (windturbineManufacturerId.equals("SHDQ_MF")){ //山东
|
|
|
- //多状态根据一个点来判断
|
|
|
- Optional<ProBasicStatusPoint> first = statusMap.get(wt.getId()).stream().filter(w -> w.getUniformCode().equals(Contant.AI422)).findFirst();
|
|
|
- if (first.isPresent()){
|
|
|
- ProBasicStatusPoint windturbinestatusdi = first.get();
|
|
|
+ double mxstatus = 2;
|
|
|
|
|
|
- int pointValueInDouble = (int) edosUtil.getRealData(windturbinestatusdi.getNemCode()).getPointValueInDouble();
|
|
|
- switch (pointValueInDouble){
|
|
|
- //待机
|
|
|
- case 0:
|
|
|
- case 3:
|
|
|
- case 4:
|
|
|
- case 5:
|
|
|
- case 6:
|
|
|
- case 9:
|
|
|
- mxstatus = 0.0;
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- //故障
|
|
|
- mxstatus = 4.0;
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- //维护
|
|
|
- mxstatus = 6.0;
|
|
|
- break;
|
|
|
- case 12://限电
|
|
|
- mxstatus = 8.0;
|
|
|
- break;
|
|
|
- case 7:
|
|
|
- case 8://运行
|
|
|
- case 11:
|
|
|
- mxstatus = 2.0;
|
|
|
- break;
|
|
|
- default:
|
|
|
- mxstatus = 2.0;
|
|
|
- }
|
|
|
- }
|
|
|
- }else if (windturbineManufacturerId.equals("SYHC_MF")){ //山东
|
|
|
- //多状态根据一个点来判断
|
|
|
+ String aiordi = modelMap.get(wt.getModelId()).getDescription();
|
|
|
+ if (aiordi.equals("AI")){
|
|
|
+ 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();
|
|
|
- switch (pointValueInDouble){
|
|
|
- //待机
|
|
|
- case 1:
|
|
|
- case 3:
|
|
|
- case 4:
|
|
|
- case 5:
|
|
|
- case 6:
|
|
|
- case 9:
|
|
|
- case 10:
|
|
|
- case 11:
|
|
|
- case 12:
|
|
|
- case 21:
|
|
|
- case 22:
|
|
|
- case 23:
|
|
|
- case 24:
|
|
|
- case 25:
|
|
|
- case 26:
|
|
|
- case 27:
|
|
|
- case 50:
|
|
|
- case 99:
|
|
|
- case 200:
|
|
|
- mxstatus = 0.0;
|
|
|
- break;
|
|
|
- case 30:
|
|
|
- //手动停机
|
|
|
- mxstatus = 1.0;
|
|
|
- case 199:
|
|
|
- //故障
|
|
|
- mxstatus = 4.0;
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- //维护
|
|
|
- mxstatus = 6.0;
|
|
|
- break;
|
|
|
- case 0://
|
|
|
- mxstatus = 12.0;
|
|
|
- break;
|
|
|
- case 7:
|
|
|
- case 8://运行
|
|
|
- mxstatus = 2.0;
|
|
|
- break;
|
|
|
- default:
|
|
|
- mxstatus = 2.0;
|
|
|
- }
|
|
|
- }
|
|
|
- }else if (windturbineManufacturerId.equals("LHDL_MF")){//联合动力
|
|
|
-
|
|
|
- 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();
|
|
|
- switch (pointValueInDouble){
|
|
|
- case 0:
|
|
|
- mxstatus = 12.0;
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- case 6:
|
|
|
- mxstatus = 4.0;
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- mxstatus = 6.0;
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- mxstatus = 0.0;
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- case 5:
|
|
|
- mxstatus = 2.0;
|
|
|
- break;
|
|
|
- case 11:
|
|
|
- mxstatus = 1.0;
|
|
|
- break;
|
|
|
- default:
|
|
|
- mxstatus = 2.0;
|
|
|
- }
|
|
|
- }
|
|
|
- //每个状态一个状态点
|
|
|
- List<ProBasicStatusPoint> windturbinestatusdis = statusMap.get(wt.getId()).stream().filter(w -> w.getUniformCode().equals(Contant.MX000) || w.getUniformCode().equals(Contant.MX002) || w.getUniformCode().equals(Contant.MX004) || w.getUniformCode().equals(Contant.MX006) || w.getUniformCode().equals(Contant.MX008)).collect(Collectors.toList());
|
|
|
- for(ProBasicStatusPoint w : windturbinestatusdis){
|
|
|
- PointData realData = edosUtil.getRealData(w.getNemCode());
|
|
|
- if (realData.getPointValueInDouble()==1){
|
|
|
- mxstatus = Double.parseDouble(w.getTypeId());
|
|
|
- break;
|
|
|
- }
|
|
|
+ int pointValueInDouble = (int) edosUtil.getRealData(windturbinestatusdi.getId()).getPointValueInDouble();
|
|
|
+ mxstatus = (double)stateMap.get(pointValueInDouble);
|
|
|
}
|
|
|
}else {
|
|
|
//每个状态一个状态点
|
|
|
- List<ProBasicStatusPoint> windturbinestatusdis = statusMap.get(wt.getId()).stream().filter(w -> w.getUniformCode().equals(Contant.MX000) || w.getUniformCode().equals(Contant.MX002) || w.getUniformCode().equals(Contant.MX004) || w.getUniformCode().equals(Contant.MX006) || w.getUniformCode().equals(Contant.MX008)).collect(Collectors.toList());
|
|
|
+ Map<String,String> stateMap = new HashMap<>();
|
|
|
+ List<ProBasicStatusPoint> windturbinestatusdis = statusMap.get(wt.getId()).stream().filter(w -> w.getUniformCode().equals(Contant.MX000) || w.getUniformCode().equals(Contant.MX002) || w.getUniformCode().equals(Contant.MX003) || w.getUniformCode().equals(Contant.MX006) || w.getUniformCode().equals(Contant.MX008)).collect(Collectors.toList());
|
|
|
for(ProBasicStatusPoint w : windturbinestatusdis){
|
|
|
- PointData realData = edosUtil.getRealData(w.getNemCode());
|
|
|
+ PointData realData = edosUtil.getRealData(w.getId());
|
|
|
if (realData.getPointValueInDouble()==1){
|
|
|
+ stateMap.put(w.getUniformCode(),w.getTypeId());
|
|
|
mxstatus = Double.parseDouble(w.getTypeId());
|
|
|
- break;
|
|
|
}
|
|
|
}
|
|
|
+ if (stateMap.containsKey("MX006") && stateMap.containsKey("MX008")){
|
|
|
+ mxstatus = Double.parseDouble(stateMap.get("MX008"));
|
|
|
+ }
|
|
|
+ if (stateMap.containsKey("MX002") && stateMap.containsKey("MX003")){
|
|
|
+ mxstatus = Double.parseDouble(stateMap.get("MX003"));
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+// //远景
|
|
|
+// if (windturbineManufacturerId.equals("YJNY_MF")){
|
|
|
+// if (wt.getWindpowerstationId().equals("SDL_LYDL_BEIH_FDC_STA") || wt.getWindpowerstationId().equals("SDL_LYDL_YS_FDC_STA")){
|
|
|
+// 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();
|
|
|
+// switch (pointValueInDouble){
|
|
|
+// case 1:
|
|
|
+// mxstatus = 12.0;
|
|
|
+// break;
|
|
|
+// case 2:
|
|
|
+// case 8:
|
|
|
+// mxstatus = 6.0;
|
|
|
+// break;
|
|
|
+// case 3:
|
|
|
+// case 4:
|
|
|
+// case 5:
|
|
|
+// case 28:
|
|
|
+// mxstatus = 1.0;
|
|
|
+// break;
|
|
|
+// case 6:
|
|
|
+// case 7:
|
|
|
+// mxstatus = 4.0;
|
|
|
+// break;
|
|
|
+// case 9:
|
|
|
+// mxstatus = 10.0;
|
|
|
+// break;
|
|
|
+// case 10:
|
|
|
+// mxstatus = 9.0;
|
|
|
+// break;
|
|
|
+// case 11:
|
|
|
+// case 12:
|
|
|
+// case 13:
|
|
|
+// case 14:
|
|
|
+// case 15:
|
|
|
+// case 29:
|
|
|
+// case 30:
|
|
|
+// case 31:
|
|
|
+// case 32:
|
|
|
+// case 33:
|
|
|
+// mxstatus = 11.0;
|
|
|
+// break;
|
|
|
+// case 16:
|
|
|
+// case 18:
|
|
|
+// case 19:
|
|
|
+// case 20:
|
|
|
+// case 21:
|
|
|
+// mxstatus = 2.0;
|
|
|
+// break;
|
|
|
+// case 17:
|
|
|
+// mxstatus = 0.0;
|
|
|
+// break;
|
|
|
+// case 22:
|
|
|
+// mxstatus = 3.0;
|
|
|
+// break;
|
|
|
+// case 23:
|
|
|
+// case 24:
|
|
|
+// case 25:
|
|
|
+// case 26:
|
|
|
+// mxstatus = 8.0;
|
|
|
+// break;
|
|
|
+// case 27:
|
|
|
+// mxstatus = 13.0;
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// mxstatus = 2.0;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// //多状态根据一个点来判断
|
|
|
+// 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();
|
|
|
+// switch (pointValueInDouble){
|
|
|
+// case 1:
|
|
|
+// case 3:
|
|
|
+// case 4:
|
|
|
+// mxstatus = 1.0;
|
|
|
+// break;
|
|
|
+// case 2:
|
|
|
+// case 10:
|
|
|
+// mxstatus = 4.0;
|
|
|
+// break;
|
|
|
+// case 5:
|
|
|
+// case 6:
|
|
|
+// mxstatus = 2.0;
|
|
|
+// break;
|
|
|
+// case 7:
|
|
|
+// mxstatus = 8.0;
|
|
|
+// break;
|
|
|
+// case 8:
|
|
|
+// mxstatus = 13.0;
|
|
|
+// break;
|
|
|
+// case 9:
|
|
|
+// mxstatus = 0.0;
|
|
|
+// break;
|
|
|
+// case 11:
|
|
|
+// case 12:
|
|
|
+// mxstatus = 6.0;
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// mxstatus = 2.0;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// }else if (windturbineManufacturerId.equals("JFKJ_MF") && wt.getCompanyId().equals("SDL_LYDL_ZGS")){
|
|
|
+// //多状态根据一个点来判断
|
|
|
+// 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();
|
|
|
+// switch (pointValueInDouble){
|
|
|
+// case 0:
|
|
|
+// case 3:
|
|
|
+// mxstatus = 0.0;
|
|
|
+// break;
|
|
|
+// case 1:
|
|
|
+// mxstatus = 1.0;
|
|
|
+// break;
|
|
|
+// case 2:
|
|
|
+// mxstatus = 4.0;
|
|
|
+// break;
|
|
|
+// case 4:
|
|
|
+// case 5:
|
|
|
+// mxstatus = 2.0;
|
|
|
+// break;
|
|
|
+// case 6:
|
|
|
+// case 8:
|
|
|
+// case 9:
|
|
|
+// mxstatus = 6.0;
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// mxstatus = 2.0;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }else if (windturbineManufacturerId.equals("LHDL_MF") && wt.getCompanyId().equals("SDL_SXNY_ZGS")){
|
|
|
+// //多状态根据一个点来判断
|
|
|
+// 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();
|
|
|
+// switch (pointValueInDouble){
|
|
|
+// //待机
|
|
|
+// case 1:
|
|
|
+// case 2:
|
|
|
+// case 16:
|
|
|
+// case 128:
|
|
|
+// case 256:
|
|
|
+// case 1024:
|
|
|
+// mxstatus = 0.0;
|
|
|
+// break;
|
|
|
+// case 4:
|
|
|
+// //故障
|
|
|
+// mxstatus = 4.0;
|
|
|
+// break;
|
|
|
+// case 8:
|
|
|
+// //维护
|
|
|
+// mxstatus = 6.0;
|
|
|
+// break;
|
|
|
+// case 32://限电
|
|
|
+// mxstatus = 8.0;
|
|
|
+// break;
|
|
|
+// case 64:
|
|
|
+// case 512://运行
|
|
|
+// mxstatus = 2.0;
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// mxstatus = 2.0;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }else if (windturbineManufacturerId.equals("SHDQ_MF")){ //山东
|
|
|
+// //多状态根据一个点来判断
|
|
|
+// 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();
|
|
|
+// switch (pointValueInDouble){
|
|
|
+// //待机
|
|
|
+// case 0:
|
|
|
+// case 3:
|
|
|
+// case 4:
|
|
|
+// case 5:
|
|
|
+// case 6:
|
|
|
+// case 9:
|
|
|
+// mxstatus = 0.0;
|
|
|
+// break;
|
|
|
+// case 1:
|
|
|
+// //故障
|
|
|
+// mxstatus = 4.0;
|
|
|
+// break;
|
|
|
+// case 2:
|
|
|
+// //维护
|
|
|
+// mxstatus = 6.0;
|
|
|
+// break;
|
|
|
+// case 12://限电
|
|
|
+// mxstatus = 8.0;
|
|
|
+// break;
|
|
|
+// case 7:
|
|
|
+// case 8://运行
|
|
|
+// case 11:
|
|
|
+// mxstatus = 2.0;
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// mxstatus = 2.0;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }else if (windturbineManufacturerId.equals("SYHC_MF")){ //山东
|
|
|
+// //多状态根据一个点来判断
|
|
|
+// 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();
|
|
|
+// switch (pointValueInDouble){
|
|
|
+// //待机
|
|
|
+// case 1:
|
|
|
+// case 3:
|
|
|
+// case 4:
|
|
|
+// case 5:
|
|
|
+// case 6:
|
|
|
+// case 9:
|
|
|
+// case 10:
|
|
|
+// case 11:
|
|
|
+// case 12:
|
|
|
+// case 21:
|
|
|
+// case 22:
|
|
|
+// case 23:
|
|
|
+// case 24:
|
|
|
+// case 25:
|
|
|
+// case 26:
|
|
|
+// case 27:
|
|
|
+// case 50:
|
|
|
+// case 99:
|
|
|
+// case 200:
|
|
|
+// mxstatus = 0.0;
|
|
|
+// break;
|
|
|
+// case 30:
|
|
|
+// //手动停机
|
|
|
+// mxstatus = 1.0;
|
|
|
+// case 199:
|
|
|
+// //故障
|
|
|
+// mxstatus = 4.0;
|
|
|
+// break;
|
|
|
+// case 2:
|
|
|
+// //维护
|
|
|
+// mxstatus = 6.0;
|
|
|
+// break;
|
|
|
+// case 0://
|
|
|
+// mxstatus = 12.0;
|
|
|
+// break;
|
|
|
+// case 7:
|
|
|
+// case 8://运行
|
|
|
+// mxstatus = 2.0;
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// mxstatus = 2.0;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }else if (windturbineManufacturerId.equals("LHDL_MF")){//联合动力
|
|
|
+//
|
|
|
+// 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();
|
|
|
+// switch (pointValueInDouble){
|
|
|
+// case 0:
|
|
|
+// mxstatus = 12.0;
|
|
|
+// break;
|
|
|
+// case 1:
|
|
|
+// case 6:
|
|
|
+// mxstatus = 4.0;
|
|
|
+// break;
|
|
|
+// case 2:
|
|
|
+// mxstatus = 6.0;
|
|
|
+// break;
|
|
|
+// case 3:
|
|
|
+// mxstatus = 0.0;
|
|
|
+// break;
|
|
|
+// case 4:
|
|
|
+// case 5:
|
|
|
+// mxstatus = 2.0;
|
|
|
+// break;
|
|
|
+// case 11:
|
|
|
+// mxstatus = 1.0;
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// mxstatus = 2.0;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// //每个状态一个状态点
|
|
|
+// List<ProBasicStatusPoint> windturbinestatusdis = statusMap.get(wt.getId()).stream().filter(w -> w.getUniformCode().equals(Contant.MX000) || w.getUniformCode().equals(Contant.MX002) || w.getUniformCode().equals(Contant.MX004) || w.getUniformCode().equals(Contant.MX006) || w.getUniformCode().equals(Contant.MX008)).collect(Collectors.toList());
|
|
|
+// for(ProBasicStatusPoint w : windturbinestatusdis){
|
|
|
+// PointData realData = edosUtil.getRealData(w.getNemCode());
|
|
|
+// if (realData.getPointValueInDouble()==1){
|
|
|
+// mxstatus = Double.parseDouble(w.getTypeId());
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }else {
|
|
|
+// //每个状态一个状态点
|
|
|
+// List<ProBasicStatusPoint> windturbinestatusdis = statusMap.get(wt.getId()).stream().filter(w -> w.getUniformCode().equals(Contant.MX000) || w.getUniformCode().equals(Contant.MX002) || w.getUniformCode().equals(Contant.MX004) || w.getUniformCode().equals(Contant.MX006) || w.getUniformCode().equals(Contant.MX008)).collect(Collectors.toList());
|
|
|
+// for(ProBasicStatusPoint w : windturbinestatusdis){
|
|
|
+// PointData realData = edosUtil.getRealData(w.getNemCode());
|
|
|
+// if (realData.getPointValueInDouble()==1){
|
|
|
+// mxstatus = Double.parseDouble(w.getTypeId());
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
return mxstatus;
|
|
|
}
|
|
|
|