whyclxw
2025-05-28 e16302f9d475c7cc4dd18c5abf1a23cb5502e362
src/main/java/com/whyc/webSocket/HomeMonitorSocket.java
@@ -41,7 +41,7 @@
    private static StationInfService sinfService;
    private static BatttestdataInfService batttestdataInfService;
    private static Fbs9100StateService fbs9100StateService;
    private Session session;
@@ -72,8 +72,8 @@
    }
    @Autowired
    public void setBatttestdataInfService(BatttestdataInfService batttestdataInfService) {
        HomeMonitorSocket.batttestdataInfService = batttestdataInfService;
    public void setFbs9100StateService(Fbs9100StateService fbs9100StateService) {
        HomeMonitorSocket.fbs9100StateService = fbs9100StateService;
    }
    @OnOpen
@@ -82,7 +82,7 @@
        HttpSession httpSession = (HttpSession) config.getUserProperties().get("httpSession");
        UserInf user = (UserInf) httpSession.getAttribute("user");
        final int userId = user.getUId().intValue();
        //final int userId = 1001;
        //final int userId = 1087;
        thread = new Thread("Thread_homeMonitor") {
            @Override
            public void run() {
@@ -94,19 +94,22 @@
                            //推送信息
                            synchronized (session) {
                                Map<String, Object> map = new HashMap<>();
                                //今日放电任务统计
                                /*//今日放电任务统计
                                Response planRes = planService.getPlanStaticToday(userId);
                                map.put("planRes", planRes);
                                map.put("planRes", planRes);*/
                                //今日放电站点统计
                                Response chargeRes = batttestdataInfService.getChargeStaticToday(userId);
                                Response chargeRes = fbs9100StateService.getChargeStaticToday(userId);
                                map.put("chargeRes", chargeRes);
                                //今日实时告警
                                //今日实时告警(实时告警)
                                Response bAlmRes = bAlmService.getBalmToday(userId);
                                map.put("bAlmRes", bAlmRes);
                                Response bDebRes = dAlmService.getDalmToday(userId);
                                map.put("bDebRes", bDebRes);
                                Response bPwrRes = pAlmService.getPalmToday(userId);
                                map.put("bPwrRes", bPwrRes);
                                //追加今日计划放电的站点数
                                int stationNumOfDischargePlanToday = planService.getPlanStationToday(userId);
                                map.put("stationNumOfDischargePlanToday",stationNumOfDischargePlanToday);
                                //站点地图
                                List<StationInf> mapInMonitor = sinfService.getStationMapInMonitor(userId);
                                map.put("stationMap", mapInMonitor);