whycxzp
2025-03-18 f127214ad1076769c9cb4a97963ee3ad5053e970
src/main/java/com/whyc/webSocket/DevLithiumStatisticSocket.java
@@ -4,7 +4,7 @@
import com.whyc.dto.Response;
import com.whyc.factory.ThreadPoolExecutorFactory;
import com.whyc.pojo.db_user.UserInf;
import com.whyc.service.BattTestDataInfService;
import com.whyc.service.BattLithiumTestDataInfService;
import com.whyc.service.DevLithiumInfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -32,7 +32,7 @@
    private static DevLithiumInfService devLithiumInfService;
    private static BattTestDataInfService battTestDataInfService;
    private static BattLithiumTestDataInfService battLithiumTestDataInfService;
    private HttpSession httpSession;
@@ -43,8 +43,8 @@
    }
    @Autowired
    public void setBattTestDataInfService(BattTestDataInfService battTestDataInfService) {
        DevLithiumStatisticSocket.battTestDataInfService = battTestDataInfService;
    public void setBattTestDataInfService(BattLithiumTestDataInfService battLithiumTestDataInfService) {
        DevLithiumStatisticSocket.battLithiumTestDataInfService = battLithiumTestDataInfService;
    }
@@ -79,7 +79,7 @@
            CountDownLatch latch = new CountDownLatch(3);
            //充放电一体机测试统计/锂电均衡仪测试统计
            poolExecutor.execute(() -> {
                Map<String,Object> lithiumTestInfMap = battTestDataInfService.getDevTinfByYearMonth(userId);
                Map<String,Object> lithiumTestInfMap = battLithiumTestDataInfService.getDevTinfByYearMonth(userId);
                map.put("lithiumTestInf",lithiumTestInfMap);
                latch.countDown();
            });
@@ -91,7 +91,7 @@
            });
            //近一周电池测试趋势统计(从当前时间开始)
            poolExecutor.execute(() -> {
                Map<String,Object> devTestByWeekMap=battTestDataInfService.getDevTinfByWeek(userId);
                Map<String,Object> devTestByWeekMap= battLithiumTestDataInfService.getDevTinfByWeek(userId);
                map.put("devLithiumTestByWeek",devTestByWeekMap);
                latch.countDown();
            });