whyclxw
2025-05-07 45ef9e340f9bb4b98fd88a758343470dfe125cb3
src/main/java/com/whyc/webSocket/ScreenForSZ2Socket.java
@@ -89,7 +89,7 @@
    public Map<String, Object> getStatic(Integer userId) throws InterruptedException {
        Map<String, Object> res = new HashMap<>();
        ThreadPoolExecutor poolExecutor = ThreadPoolExecutorFactory.getPoolExecutor();
        CountDownLatch latch = new CountDownLatch(3);
        CountDownLatch latch = new CountDownLatch(4);
        poolExecutor.execute(()->{
            //1统计机房个数,设备个数,电池组个数
            Response<Map> res_inf = battInfService.getAllInfInSz2(userId);
@@ -108,6 +108,12 @@
            res.put("res_battState", res_battState);
            latch.countDown();
        });
        poolExecutor.execute(()->{
            //4.中间地图
            Response<Map> res_station = battInfService.getAllStationInSz2(userId);
            res.put("res_station", res_station);
            latch.countDown();
        });
        latch.await(10, TimeUnit.MINUTES);
        return res;