whyclxw
2025-05-29 6795032d9f4da24aa18a0e6dd9d71688e36a7160
实时页面
1个文件已修改
31 ■■■■ 已修改文件
src/main/java/com/whyc/webSocket/RealTimeSocket.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/webSocket/RealTimeSocket.java
@@ -285,19 +285,37 @@
    }
    //获取管理界面信息
    private Response getManagePage(RealTimeDto realDto) {
        return new Response().set(1);
        Map<String, Object> map=new HashMap<>();
        try {
            StationInf sinf=stationInfService.getStationInfById(realDto.getStaitonId());
            map.put("sinf",sinf);
            PowerInf pinf=powerInfService.getPowerInfById(realDto.getPowerId());
            map.put("pinf",pinf);
            BattInf binf=battInfService.getBinfByBattgroupId(realDto.getBattgroupId());
            map.put("binf",binf);
            map.put("pageType",realDto.getPageType());
            return new Response().setII(1,true,map,"管理界面信息推送");
        }catch (Exception e){
            return new Response().set(1,false,"管理界面信息推送");
        }
    }
    //获取自愈能力界面信息
    private Response getSelfPage(RealTimeDto realDto) {
        return new Response().set(1);
        Map<String, Object> map=new HashMap<>();
        map.put("pageType",realDto.getPageType());
        return new Response().setII(1,true,map,"自愈能力界面信息推送");
    }
    //获取3D界面信息
    private Response get3DPage(RealTimeDto realDto) {
        return new Response().set(1);
        Map<String, Object> map=new HashMap<>();
        map.put("pageType",realDto.getPageType());
        return new Response().setII(1,true,map,"3D界面信息信息推送");
    }
    //获取图片界面信息
    private Response getImgPage(RealTimeDto realDto) {
        return new Response().set(1);
        Map<String, Object> map=new HashMap<>();
        map.put("pageType",realDto.getPageType());
        return new Response().setII(1,true,map,"图片界面信息信息推送");
    }
    //获取温度界面信息
    private Response getTmpPage(RealTimeDto realDto) {
@@ -329,6 +347,7 @@
            map.put("maxData",maxData);
            map.put("minData",minData);
            map.put("avgData",avgData);
            map.put("pageType",realDto.getPageType());
            return new Response().setII(1,true,map,"温度界面信息推送");
        }catch (Exception e){
            return new Response().set(1,false,"温度界面信息推送");
@@ -367,6 +386,7 @@
            //上一次内阻测试数据
            BattresdataInf rinfData= battresdataInfService.getLastTestData(realDto.getBattgroupId());
            map.put("rinfData",rinfData);
            map.put("pageType",realDto.getPageType());
            return new Response().setII(1,true,map,"内阻界面信息推送");
        }catch (Exception e){
            return new Response().set(1,false,"内阻界面信息推送");
@@ -402,6 +422,7 @@
            map.put("maxData",maxData);
            map.put("minData",minData);
            map.put("avgData",avgData);
            map.put("pageType",realDto.getPageType());
            return new Response().setII(1,true,map,"电压界面信息推送");
        }catch (Exception e){
            return new Response().set(1,false,"电压界面信息推送");
@@ -414,6 +435,7 @@
            //实时获取电源信息
            PwrdevAcdcdata pwrdevAcdcdata = pwrdevAcdcdataService.getPwrRealInfo(realDto.getPowerId());
            map.put("pwrdevAcdcdata",pwrdevAcdcdata);
            map.put("pageType",realDto.getPageType());
            return new Response().setII(1,true,map,"电源界面信息推送");
        }catch (Exception e){
            return new Response().set(1,false,"电源界面信息推送");
@@ -435,6 +457,7 @@
            //获取近半小时电源数据,整流器数据,核容设备数据(推送实时,接口查询最近半小时数据)
            PwrdevAcdcdata pwrdevAcdcdata = pwrdevAcdcdataService.getPwrRealInfo(realDto.getPowerId());
            map.put("pwrdevAcdcdata",pwrdevAcdcdata);
            map.put("pageType",realDto.getPageType());
            return new Response().setII(1,true,map,"系统概述推送");
        }catch (Exception e) {
            e.printStackTrace();