zoujiajian 2 년 전
부모
커밋
9be3e672db
1개의 변경된 파일13개의 추가작업 그리고 7개의 파일을 삭제
  1. 13 7
      netflix-service/src/main/java/com/cyksj/service/mange/statistics/impl/StatisticsDataServiceImpl.java

+ 13 - 7
netflix-service/src/main/java/com/cyksj/service/mange/statistics/impl/StatisticsDataServiceImpl.java

@@ -485,16 +485,22 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
 	public void getSynthesisData(GroupsDataStatisticsView groupsDataStatisticsView, String startDate, String endDate) throws Exception {
 		CountDownLatch latch = new CountDownLatch(2);
 		TASK_POOL.execute(() -> {
-			getNatureOrderData(groupsDataStatisticsView, startDate, endDate);
-			getCategoryOrderData(groupsDataStatisticsView, startDate, endDate);
-			latch.countDown();
+			try {
+				getNatureOrderData(groupsDataStatisticsView, startDate, endDate);
+				getCategoryOrderData(groupsDataStatisticsView, startDate, endDate);
+			} finally {
+				latch.countDown();
+			}
 		});
 		TASK_POOL.execute(() -> {
-			getGroupsOrderCategoryData(groupsDataStatisticsView, startDate, endDate);
-			getRenewOrderData(groupsDataStatisticsView, startDate, endDate);
-			latch.countDown();
+			try {
+				getGroupsOrderCategoryData(groupsDataStatisticsView, startDate, endDate);
+				getRenewOrderData(groupsDataStatisticsView, startDate, endDate);
+			} finally {
+				latch.countDown();
+			}
 		});
-		latch.wait();
+		latch.await();
 	}
 
 	private void exportBusinessMonthlyData(List<ExcelSheetAndData> excelSheetDataList, Long startTime, Long endTime) {