|
|
@@ -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) {
|