Ver Fonte

fix 业务数据、订单数据接口拆分

zoujiajian há 3 anos atrás
pai
commit
019e81d058

+ 1 - 9
netflix-service/src/main/java/com/cyksj/service/mange/statistics/impl/StatisticsDataServiceImpl.java

@@ -304,7 +304,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
 		}
 		final String f_st = startDate;
 		final String f_et = endDate;
-		CountDownLatch countDownLatch = new CountDownLatch(3);
+		CountDownLatch countDownLatch = new CountDownLatch(2);
 		//业务订单数
 		TASK_POOL.execute(() -> {
 			try {
@@ -321,14 +321,6 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
 				countDownLatch.countDown();
 			}
 		});
-		//所有平台类型的订单数据
-		TASK_POOL.execute(() -> {
-			try {
-				exportAllTypeData(excelSheetDataList, f_st, f_et);
-			} finally {
-				countDownLatch.countDown();
-			}
-		});
 		try {
 			countDownLatch.await();
 		} catch (InterruptedException e) {

+ 5 - 4
netflix-web/src/main/java/com/cyksj/web/controller/manage/statistics/StatisticsDataController.java

@@ -97,23 +97,24 @@ public class StatisticsDataController {
 	}
 
 	/**
-	 * 导出统计数据
+	 * 导出订单统计数据
 	 */
 	@GetMapping("/export")
 	@SaCheckPermission("statics:export")
 	public void exportStatisticsData(Integer type, Long startTime, Long endTime, HttpServletResponse response) {
 		List<ExcelSheetAndData> excelSheetDataList = statisticsDataService.exportStatisticsDataByType(type, startTime, endTime);
-		EasyExcelUtils.createExcelStreamMutilByEasyExcel(response, excelSheetDataList, "统计数据", ExcelTypeEnum.XLSX, null);
+		excelSheetDataList = excelSheetDataList.stream().sorted(Comparator.comparing(ExcelSheetAndData::getSort)).collect(Collectors.toList());
+		EasyExcelUtils.createExcelStreamMutilByEasyExcel(response, excelSheetDataList, "订单统计数据", ExcelTypeEnum.XLSX, null);
 	}
 
 	/**
-	 * 每月数据导出
+	 * 每月业务数据导出
 	 */
 	@GetMapping("/export/monthly/data")
 	public void exportMonthlyData(Long startTime, Long endTime, HttpServletResponse response) {
 		List<ExcelSheetAndData> excelSheetDataList = statisticsDataService.exportMonthlyData(startTime, endTime);
 		excelSheetDataList = excelSheetDataList.stream().sorted(Comparator.comparing(ExcelSheetAndData::getSort)).collect(Collectors.toList());
-		EasyExcelUtils.createExcelStreamMutilByEasyExcel(response, excelSheetDataList, String.format("%s月订单数据", DateUtil.month(DateTime.of(startTime)) + 1), ExcelTypeEnum.XLSX, null);
+		EasyExcelUtils.createExcelStreamMutilByEasyExcel(response, excelSheetDataList, String.format("%s月业务数据", DateUtil.month(DateTime.of(startTime)) + 1), ExcelTypeEnum.XLSX, null);
 	}
 
 	/**