| | |
| | | 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; |
| | |
| | | |
| | | private static DevLithiumInfService devLithiumInfService; |
| | | |
| | | private static BattTestDataInfService battTestDataInfService; |
| | | private static BattLithiumTestDataInfService battLithiumTestDataInfService; |
| | | |
| | | |
| | | private HttpSession httpSession; |
| | |
| | | } |
| | | |
| | | @Autowired |
| | | public void setBattTestDataInfService(BattTestDataInfService battTestDataInfService) { |
| | | DevLithiumStatisticSocket.battTestDataInfService = battTestDataInfService; |
| | | public void setBattTestDataInfService(BattLithiumTestDataInfService battLithiumTestDataInfService) { |
| | | DevLithiumStatisticSocket.battLithiumTestDataInfService = battLithiumTestDataInfService; |
| | | } |
| | | |
| | | |
| | |
| | | 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(); |
| | | }); |
| | |
| | | }); |
| | | //近一周电池测试趋势统计(从当前时间开始) |
| | | poolExecutor.execute(() -> { |
| | | Map<String,Object> devTestByWeekMap=battTestDataInfService.getDevTinfByWeek(userId); |
| | | Map<String,Object> devTestByWeekMap= battLithiumTestDataInfService.getDevTinfByWeek(userId); |
| | | map.put("devLithiumTestByWeek",devTestByWeekMap); |
| | | latch.countDown(); |
| | | }); |