|
|
@@ -12,6 +12,7 @@ import com.cyksj.enums.GatewayResponse;
|
|
|
import com.cyksj.mapper.*;
|
|
|
import com.cyksj.mapper.manage.statistics.*;
|
|
|
import com.cyksj.mapper.shop.YhShopMapper;
|
|
|
+import com.cyksj.mapper.sys.SysConfigMapper;
|
|
|
import com.cyksj.model.dto.MonthlyUserOrderDetailDto;
|
|
|
import com.cyksj.model.dto.NatureOrderDataDto;
|
|
|
import com.cyksj.model.entity.*;
|
|
|
@@ -86,6 +87,8 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
|
|
|
private final YhShopMapper yhShopMapper;
|
|
|
|
|
|
+ private final SysConfigMapper sysConfigMapper;
|
|
|
+
|
|
|
private static final GlobalThreadPoolTaskExecutor TASK_POOL = GlobalThreadPoolTaskExecutor.getInstance();
|
|
|
|
|
|
@Override
|
|
|
@@ -430,6 +433,9 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
case 5:
|
|
|
getUnbindChannelOrderData(groupsDataStatisticsView, startDate, endDate);
|
|
|
break;
|
|
|
+ case 6:
|
|
|
+ getRealGoodsSourceData(groupsDataStatisticsView, startDate, endDate);
|
|
|
+ break;
|
|
|
default:
|
|
|
getSynthesisData(groupsDataStatisticsView, startDate, endDate);
|
|
|
}
|
|
|
@@ -526,6 +532,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
getGroupsOrderCategoryData(groupsDataStatisticsView, startDate, endDate);
|
|
|
getRenewOrderData(groupsDataStatisticsView, startDate, endDate);
|
|
|
getUnbindChannelOrderData(groupsDataStatisticsView, startDate, endDate);
|
|
|
+ getRealGoodsSourceData(groupsDataStatisticsView, startDate, endDate);
|
|
|
} finally {
|
|
|
latch.countDown();
|
|
|
}
|
|
|
@@ -533,6 +540,21 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
latch.await();
|
|
|
}
|
|
|
|
|
|
+ private void getRealGoodsSourceData(GroupsDataStatisticsView groupsDataStatisticsView, String startDate, String endDate) {
|
|
|
+ List<RealGoodsSourceData> realGoodsSourceDataList = orderDonMapper.getRealGoodsSourceData(startDate, endDate);
|
|
|
+ Map<String, List<RealGoodsSourceData>> collect = realGoodsSourceDataList.stream().collect(Collectors.groupingBy(RealGoodsSourceData::getLabelSource));
|
|
|
+ OrderDon.LabelSource[] values = OrderDon.LabelSource.values();
|
|
|
+ BigDecimal zero = BigDecimal.ZERO;
|
|
|
+ RealGoodsSourceData realGoodsSourceData = null;
|
|
|
+ for (OrderDon.LabelSource sysSource : values) {
|
|
|
+ if (collect.get(sysSource.name()) == null) {
|
|
|
+ realGoodsSourceData = new RealGoodsSourceData(sysSource.name(), zero);
|
|
|
+ realGoodsSourceDataList.add(realGoodsSourceData);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ groupsDataStatisticsView.setRealGoodsSourceDataList(realGoodsSourceDataList);
|
|
|
+ }
|
|
|
+
|
|
|
private void exportBusinessMonthlyData(List<ExcelSheetAndData> excelSheetDataList, Long startTime, Long endTime) {
|
|
|
//月付、季付、年付
|
|
|
Long nf_goodsId = 1l;
|