lxw
2023-08-15 160e150009b51a39fa95d9462c3798ba28d51a09
src/main/java/com/whyc/webSocket/ScreenSocket.java
@@ -43,6 +43,8 @@
    private static BattEnduranceService battEnduranceService;
    private static BaoJiGroupService baoJiGroupService;
    @Autowired
    public void setPowerAlarmService(PwrdevAlarmService powerAlarmService) {
        ScreenSocket.powerAlarmService = powerAlarmService;
@@ -68,6 +70,10 @@
    public void setBattEnduranceService(BattEnduranceService battEnduranceService) {
        ScreenSocket.battEnduranceService = battEnduranceService;
    }
    @Autowired
    public void setBaoJiGroupService(BaoJiGroupService baoJiGroupService) {
        ScreenSocket.baoJiGroupService = baoJiGroupService;
    }
    @OnOpen
    public void onOpen(Session session, EndpointConfig config){
@@ -83,7 +89,7 @@
                    Map<String, Object> res = new HashMap<>();
                    while (!currentThread().isInterrupted()) {
                        ThreadPoolExecutor poolExecutor = ThreadPoolExecutorFactory.getPoolExecutor();
                        CountDownLatch latch = new CountDownLatch(8);
                        CountDownLatch latch = new CountDownLatch(9);
                        poolExecutor.execute(()->{
                            //一体   告警:交流ABC
                            Response res_acABC = powerAlarmService.getAcABCAnalysis(userId);
@@ -150,7 +156,7 @@
                        });
                        poolExecutor.execute(()->{
                            //一体   统计:设备状态
                            Response<Map> res_devStates = fbs9100StateService.getBTSEquipStatus(userId);
                            Response<Map> res_devStates = fbs9100StateService.getBTSEquipStatus2(userId);
                            res.put("devStates", res_devStates);
                            latch.countDown();
                        });
@@ -165,6 +171,11 @@
                            res.put("enduranceLow", res_endurance);
                            latch.countDown();
                        });
                        poolExecutor.execute(()->{
                            Response res_groupInfo = baoJiGroupService.getGroupWithStationAndAlarmForScreen(userId);
                            res.put("res_groupInfo", res_groupInfo);
                            latch.countDown();
                        });
                        /*//一体   告警:交流ABC
                        Response res_acABC = powerAlarmService.getAcABCAnalysis(userId);