whycxzp
2024-03-11 8cb55f0d37d5eb774a82e59dab1e7dc0332fb270
src/main/java/com/whyc/webSocket/ScreenForNWKMSocket.java
@@ -51,6 +51,9 @@
    //private static BatttestdataInfService testInfService;
    private static BatttestdataInfService batttestdataInfService;
    private static BattRtstateService battRtStateService;
    @Autowired
    public void setPowerAlarmService(PwrdevAlarmService powerAlarmService) {
        ScreenForNWKMSocket.powerAlarmService = powerAlarmService;
@@ -91,6 +94,12 @@
    public void setBatttestdataInfService(BatttestdataInfService batttestdataInfService) {
        ScreenForNWKMSocket.batttestdataInfService = batttestdataInfService;
    }
    @Autowired
    public void setBattRtStateService(BattRtstateService battRtStateService) {
        ScreenForNWKMSocket.battRtStateService = battRtStateService;
    }
    @OnOpen
    public void onOpen(Session session, EndpointConfig config){
        this.session = session;
@@ -160,10 +169,9 @@
                            latch.countDown();
                        });*/
                        poolExecutor.execute(()->{
                            //6.统计:实时放电信息 TODO 正在放电的电池信息展示
                            Response res_alarm = new Response();
                            res.put("dischargingBattery", res_alarm);
                            //6.统计:实时放电信息 正在放电的电池信息展示
                            Response dischargingList = battRtStateService.getDischargingList(userId);
                            res.put("dischargingBattery", dischargingList);
                            latch.countDown();
                        });
                        poolExecutor.execute(()->{