Просмотр исходного кода

修改配置信息和多适配器切换

shilin 2 лет назад
Родитель
Сommit
a961c955b9

+ 1 - 1
web/monitor-hb/src/main/java/com/gyee/frame/common/spring/Constant.java

@@ -527,7 +527,7 @@ public class Constant {
 	public static final String TPOINT_WT_FJGL = "AI130";// 风机功率
 	public static final String TPOINT_WT_GLYS = "AI067";// 功率因数
 	public static final String QSTPOINT_WT_BJJD1 = "AI184";// 青山变桨角度1
-	public static final String QSTPOINT_WT_FDJZS = "AI223";// 发电机转速
+
 	public static final String TPOINT_WT_BJJD1 = "AI076";// 变桨角度1
 	public static final String TPOINT_WT_FDJZS = "AI128";// 发电机转速
 	public static final String TPOINT_WT_YLZS = "AI012";// 叶轮转速

+ 132 - 0
web/monitor-hb/src/main/java/com/gyee/frame/controller/monitor/GenreSetPushController.java

@@ -85,6 +85,138 @@ public class GenreSetPushController {
 
     }
 
+
+
+    @GetMapping("/findBasicDataInfo_fcmap")
+    @ResponseBody
+    @ApiOperation(value = "获取驾驶舱基础信息", notes = "获取驾驶舱基础信息")
+    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "对象编号", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult findBasicDataInfo_fcmap(String id) throws Exception {
+
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        if(StringUtils.notEmp(id))
+        {
+            map=genreSetPushService.findBasicDataInfo_fcmap(id);
+        }
+
+        if (null!=map){
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, map);
+        }
+
+    }
+
+
+    @GetMapping("/findBasicDataInfo_mxztmap")
+    @ResponseBody
+    @ApiOperation(value = "获取驾驶舱基础信息", notes = "获取驾驶舱基础信息")
+    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "对象编号", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult findBasicDataInfo_mxztmap(String id) throws Exception {
+
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        if(StringUtils.notEmp(id))
+        {
+            map=genreSetPushService.findBasicDataInfo_mxztmap(id);
+        }
+
+        if (null!=map){
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, map);
+        }
+
+    }
+
+
+    @GetMapping("/findBasicDataInfo_jczbmap")
+    @ResponseBody
+    @ApiOperation(value = "获取驾驶舱基础信息", notes = "获取驾驶舱基础信息")
+    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "对象编号", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult findBasicDataInfo_jczbmap(String id) throws Exception {
+
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        if(StringUtils.notEmp(id))
+        {
+            map=genreSetPushService.findBasicDataInfo_jczbmap(id);
+        }
+
+        if (null!=map){
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, map);
+        }
+
+    }
+
+
+    @GetMapping("/findBasicDataInfo_tqmap_xtmap")
+    @ResponseBody
+    @ApiOperation(value = "获取驾驶舱基础信息", notes = "获取驾驶舱基础信息")
+    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "对象编号", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult findBasicDataInfo_tqmap_xtmap(String id) throws Exception {
+
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        if(StringUtils.notEmp(id))
+        {
+            map=genreSetPushService.findBasicDataInfo_tqmap_xtmap(id);
+        }
+
+        if (null!=map){
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, map);
+        }
+
+    }
+
+
+    @GetMapping("/findBasicDataInfo_wxssmap")
+    @ResponseBody
+    @ApiOperation(value = "获取驾驶舱基础信息", notes = "获取驾驶舱基础信息")
+    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "对象编号", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult findBasicDataInfo_wxssmap(String id) throws Exception {
+
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        if(StringUtils.notEmp(id))
+        {
+            map=genreSetPushService.findBasicDataInfo_wxssmap(id);
+        }
+
+        if (null!=map){
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, map);
+        }
+
+    }
+
+    @GetMapping("/findBasicDataInfo_gxkmap")
+    @ResponseBody
+    @ApiOperation(value = "获取驾驶舱基础信息", notes = "获取驾驶舱基础信息")
+    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "对象编号", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult findBasicDataInfo_gxkmap(String id) throws Exception {
+
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        if(StringUtils.notEmp(id))
+        {
+            map=genreSetPushService.findBasicDataInfo_gxkmap(id);
+        }
+
+        if (null!=map){
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, map);
+        }
+
+    }
+
     @GetMapping("/findPowerInfo")
     @ResponseBody
     @ApiOperation(value = "获取驾驶舱功率曲线图和电量柱状图信息", notes = "获取驾驶舱功率曲线图和电量柱状图信息")

Разница между файлами не показана из-за своего большого размера
+ 1439 - 0
web/monitor-hb/src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java


+ 1 - 1
web/monitor-hb/src/main/java/com/gyee/frame/service/websocket/MatrixDetialPushService.java

@@ -324,7 +324,7 @@ public class MatrixDetialPushService {
 //                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FDJZS).getCode());
 //                }
 
-                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.QSTPOINT_WT_FDJZS).getCode());
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FDJZS).getCode());
             }
 
             List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);

+ 5 - 4
web/monitor-hb/src/main/java/com/gyee/frame/service/websocket/MatrixPushService.java

@@ -224,7 +224,7 @@ public class MatrixPushService {
             }
 
             List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
-            jczbmap.put("slts", 0.0);
+
             if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
 
 
@@ -236,14 +236,15 @@ public class MatrixPushService {
                     MatrixVo vo = new MatrixVo();
                     vo.setWtId(wt.getId());
                     if (StringUtils.notEmp(wt.getStatus())) {
-                        String num = wt.getStatus().substring(wt.getStatus().length() - 3);
+                        // String num = wt.getStatus().substring(wt.getStatus().length() - 3);
+                        String num = wt.getStatus().substring(wt.getId().indexOf("_")+1);
                         vo.setWtnum(num);
 
                     }
 
 
                     double fjzt = MathUtil.twoBit(fjzblist.get(i * step).getPointValueInDouble());
-                    if (fjzt == 7) {
+                    if (fjzt == 6) {
                         slts++;
                     }
                     vo.setFjzt(fjzt);
@@ -256,7 +257,7 @@ public class MatrixPushService {
                 }
 
 
-                jczbmap.put("slts", slts);
+                jczbmap.put("slts", 0.0);
 
                 double djts=(Double)jczbmap.get("djts");
                 double yxts=(Double)jczbmap.get("yxts");

+ 42 - 39
web/monitor-hb/src/main/java/com/gyee/frame/service/websocket/WtInfoPushService.java

@@ -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();