|
@@ -73,6 +73,38 @@ public class StatusService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 判断整场通讯
|
|
|
+ */
|
|
|
+ public void calWpStatus(){
|
|
|
+ init();
|
|
|
+ wpls.stream().forEach(wp->{
|
|
|
+ Windpowerstationpointnew windpowerstationpointnew = wppointmap.get(wp.getId()).get(Contant.FJ5T);
|
|
|
+
|
|
|
+ List<Windturbine> windturbines = wtls.stream().filter(wt -> wt.getWindpowerstationid().equals(wp.getId())).collect(Collectors.toList());
|
|
|
+ List<String> list = new ArrayList<>();
|
|
|
+ List<PointData> realData = null;
|
|
|
+ windturbines.stream().forEach(wt->{
|
|
|
+ Windturbinetestingpointnew windturbinetestingpointnew = wtpAimap.get(wt.getId()).get(Contant.FJ5T);
|
|
|
+ list.add(windturbinetestingpointnew.getCode());
|
|
|
+ });
|
|
|
+ try {
|
|
|
+ realData = edosUtil.getRealData(list);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ boolean b = realData.stream().allMatch(pointData -> pointData.getPointValueInDouble() == 3.0);
|
|
|
+ if (b){
|
|
|
+ try {
|
|
|
+ edosUtil.sendSinglePoint(createWpPoint(new AtomicInteger(1),windpowerstationpointnew));
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 计算状态
|
|
|
* @throws Exception
|
|
|
*/
|