|
@@ -7,7 +7,6 @@ import com.gyee.frame.common.spring.Constant;
|
|
|
import com.gyee.frame.common.spring.InitialRunner;
|
|
|
import com.gyee.frame.model.auto.*;
|
|
|
import com.gyee.frame.model.custom.PointData;
|
|
|
-import com.gyee.frame.model.custom.SawVo;
|
|
|
import com.gyee.frame.service.*;
|
|
|
import com.gyee.frame.util.*;
|
|
|
import org.apache.commons.compress.utils.Lists;
|
|
@@ -28,6 +27,7 @@ public class WtInfoPushService {
|
|
|
private WindturbineinfodayService windturbineinfodayService;
|
|
|
@Resource
|
|
|
private WarningRecordsService warningRecordsService;
|
|
|
+
|
|
|
@Resource
|
|
|
private AlarmsnapService alarmsnapService;
|
|
|
IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
|
|
@@ -110,13 +110,7 @@ public class WtInfoPushService {
|
|
|
|
|
|
zbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FJSSFS).getCode());// 风速
|
|
|
zbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FJGL).getCode());// 风机功率
|
|
|
- if (wt.getWindpowerstationid().equals(QS_FDC)) {
|
|
|
- zbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.QSTPOINT_WT_FDJZS).getCode());// 风机转数
|
|
|
-
|
|
|
- }else
|
|
|
- {
|
|
|
- zbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FDJZS).getCode());// 风机转数
|
|
|
- }
|
|
|
+ zbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FDJZS).getCode());// 风机转数
|
|
|
zbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_JCWWD).getCode());//环境温度
|
|
|
|
|
|
keyls.add("FJKYL");// 可利用率
|
|
@@ -576,7 +570,7 @@ public class WtInfoPushService {
|
|
|
uids.add(Constant.TPOINT_WT_WGGL);
|
|
|
uids.add(Constant.TPOINT_WT_FJFX);
|
|
|
uids.add(Constant.TPOINT_WT_YLZS);
|
|
|
- uids.add(Constant.QSTPOINT_WT_FDJZS);
|
|
|
+ uids.add(Constant.TPOINT_WT_FDJZS);
|
|
|
uids.add(Constant.TPOINT_WT_JCWWD);
|
|
|
uids.add(Constant.TPOINT_WT_JCWD);
|
|
|
uids.add(Constant.TPOINT_WT_TDGWD);
|
|
@@ -701,8 +695,13 @@ public class WtInfoPushService {
|
|
|
List<Object> phls=new ArrayList<>();
|
|
|
List<Object> yyls=new ArrayList<>();
|
|
|
List<Object> jcls=new ArrayList<>();
|
|
|
-
|
|
|
- List<PointData> zblist = realApiUtil.getRealData(zbls);
|
|
|
+ List<PointData> zblist = new ArrayList<>();
|
|
|
+ for(String str:zbls)
|
|
|
+ {
|
|
|
+ PointData po= realApiUtil.getRealData(str);
|
|
|
+ zblist.add(po);
|
|
|
+ }
|
|
|
+// List<PointData> zblist = realApiUtil.getRealData(zbls);
|
|
|
|
|
|
|
|
|
if (!zblist.isEmpty() && zblist.size() == zbls.size() && keyls.size() == zbls.size()) {
|
|
@@ -826,20 +825,24 @@ public class WtInfoPushService {
|
|
|
if(namemap.containsKey(keyls.get(i)))
|
|
|
{
|
|
|
String[] temparr=namemap.get(keyls.get(i));
|
|
|
- if (keyls.get(i).equals("FDJZS")) {
|
|
|
- Equipmentmodel model = InitialRunner.mlmap.get(wt.getModelid());
|
|
|
- Double fdjzs = (zblist.get(num).getPointValueInDouble());
|
|
|
- if (model.getPowerproduction() == 2000) {
|
|
|
- temparr[3]=String.valueOf(StringUtils.round(fdjzs * 9.55, 2));
|
|
|
- } else {
|
|
|
- temparr[3]=String.valueOf(StringUtils.round(fdjzs, 2));
|
|
|
- }
|
|
|
- }else{
|
|
|
- temparr[3]=String.valueOf(MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));
|
|
|
+// if (keyls.get(i).equals("FDJZS")) {
|
|
|
+// Equipmentmodel model = InitialRunner.mlmap.get(wt.getModelid());
|
|
|
+// Double fdjzs = (zblist.get(num).getPointValueInDouble());
|
|
|
+// if (model.getPowerproduction() == 2000) {
|
|
|
+// temparr[3]=String.valueOf(StringUtils.round(fdjzs * 9.55, 2));
|
|
|
+// } else {
|
|
|
+// temparr[3]=String.valueOf(StringUtils.round(fdjzs, 2));
|
|
|
+// }
|
|
|
+// }else{
|
|
|
+// temparr[3]=String.valueOf(MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));
|
|
|
+// }
|
|
|
+ temparr[3]=String.valueOf(MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));
|
|
|
+// jcmap.put(keyls.get(i),temparr);//
|
|
|
+ if(!jcls.contains(temparr))
|
|
|
+ {
|
|
|
+ jcls.add(temparr);
|
|
|
}
|
|
|
|
|
|
-// jcmap.put(keyls.get(i),temparr);//
|
|
|
- jcls.add(temparr);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -924,21 +927,21 @@ public class WtInfoPushService {
|
|
|
gxkmap.put("ytjxs", 0.0);
|
|
|
}
|
|
|
|
|
|
-// WarningRecords warningRecords= warningRecordsService.getWarningRecords(id);
|
|
|
-//
|
|
|
-// if(null !=warningRecords && null !=warningRecords.getWarningid() && InitialRunner.warningmap.containsKey(warningRecords.getWarningid()))
|
|
|
-// {
|
|
|
-// Warning2 warning2=InitialRunner.warningmap.get(warningRecords.getWarningid());
|
|
|
-// gxkmap.put("bjmc", warning2.getChinesetext());
|
|
|
-// gxkmap.put("bjsj", DateUtils.formatDateTime(warningRecords.getWarningtime()));
|
|
|
-// }
|
|
|
+ WarningRecords warningRecords= warningRecordsService.getWarningRecords(id);
|
|
|
|
|
|
- List<SawVo> ls=alarmsnapService.getWarningRecordsList(id);
|
|
|
- if(!ls.isEmpty())
|
|
|
+ if(null !=warningRecords && null !=warningRecords.getWarningid() && InitialRunner.warningmap.containsKey(warningRecords.getWarningid()))
|
|
|
{
|
|
|
- gxkmap.put("bjmc", ls.get(0).getName());
|
|
|
- gxkmap.put("bjsj", DateUtils.formatDateTime(ls.get(0).getTime()));
|
|
|
+ Warning2 warning2=InitialRunner.warningmap.get(warningRecords.getWarningid());
|
|
|
+ gxkmap.put("bjmc", warning2.getChinesetext());
|
|
|
+ gxkmap.put("bjsj", DateUtils.formatDateTime(warningRecords.getWarningtime()));
|
|
|
}
|
|
|
+
|
|
|
+// List<SawVo> ls=alarmsnapService.getWarningRecordsList(id);
|
|
|
+// if(!ls.isEmpty())
|
|
|
+// {
|
|
|
+// gxkmap.put("bjmc", ls.get(0).getName());
|
|
|
+// gxkmap.put("bjsj", DateUtils.formatDateTime(ls.get(0).getTime()));
|
|
|
+// }
|
|
|
map.put("gxkmap", gxkmap);
|
|
|
|
|
|
/*************************************************关系库指标**************************************************************/
|
|
@@ -1169,7 +1172,7 @@ public class WtInfoPushService {
|
|
|
{ "AIG071", "机内温度"},
|
|
|
{ "AIG072", "逆变效率" },
|
|
|
{ "AI130", "功率"},
|
|
|
- { "AIG104", "功率因数" },
|
|
|
+ { "AI067", "功率因数" },
|
|
|
{ "RFDL", "日发电量" },
|
|
|
{ "YFDL", "月发电量" },
|
|
|
{ "NFDL", "年发电量" },
|
|
@@ -1262,16 +1265,16 @@ public class WtInfoPushService {
|
|
|
{"AIG081", "直流电压","V"},
|
|
|
{"AIG060", "交流电流","A"},
|
|
|
{"AIG078", "直流电流","A"},
|
|
|
- {"AIG073", "电网频率","Hz"},
|
|
|
+ {"AI068", "电网频率","Hz"},
|
|
|
{"AI130", "功率","W"},
|
|
|
- {"AIG104", "功率因数",""},
|
|
|
+ {"AI067", "功率因数",""},
|
|
|
{"RFDL", "日发电量","kwh"},//TODO 疑似 各厂发电量单位不統一
|
|
|
{"YFDL", "月发电量","kwh"},
|
|
|
{"NFDL", "年发电量","kwh"},
|
|
|
{"AIG064", "累计发电量","kwh"},
|
|
|
{"AIG071", "逆变器温度","℃"},
|
|
|
{"AIG072", "效率",""},
|
|
|
- {"eyht", "累计二氧化碳减排量","kg"}
|
|
|
+ {"AI962", "累计二氧化碳减排量","kg"}
|
|
|
};
|
|
|
// 遍历定义码,获取测点Id集合
|
|
|
Map<String, String> pointUniformMap = Maps.newHashMap();
|