|
|
@@ -404,7 +404,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public GroupsDataStatisticsView getGroupsData(Long startTime, Long endTime, Integer type) throws Exception {
|
|
|
+ public GroupsDataStatisticsView getGroupsData(Long startTime, Long endTime, Integer type, Boolean isGeneral) throws Exception {
|
|
|
GroupsDataStatisticsView groupsDataStatisticsView = new GroupsDataStatisticsView();
|
|
|
String startDate = null;
|
|
|
String endDate = null;
|
|
|
@@ -434,10 +434,10 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
getUnbindChannelOrderData(groupsDataStatisticsView, startDate, endDate);
|
|
|
break;
|
|
|
case 6:
|
|
|
- getRealGoodsSourceData(groupsDataStatisticsView, startDate, endDate);
|
|
|
+ getRealGoodsSourceData(groupsDataStatisticsView, isGeneral, startDate, endDate);
|
|
|
break;
|
|
|
default:
|
|
|
- getSynthesisData(groupsDataStatisticsView, startDate, endDate);
|
|
|
+ getSynthesisData(groupsDataStatisticsView, isGeneral, startDate, endDate);
|
|
|
}
|
|
|
return groupsDataStatisticsView;
|
|
|
}
|
|
|
@@ -517,7 +517,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
groupsDataStatisticsView.setNewBuyOrderMoney(totalMoney.subtract(groupsDataStatisticsView.getRenewOrderMoney()));
|
|
|
}
|
|
|
|
|
|
- public void getSynthesisData(GroupsDataStatisticsView groupsDataStatisticsView, String startDate, String endDate) throws Exception {
|
|
|
+ public void getSynthesisData(GroupsDataStatisticsView groupsDataStatisticsView, Boolean isGeneral, String startDate, String endDate) throws Exception {
|
|
|
CountDownLatch latch = new CountDownLatch(2);
|
|
|
TASK_POOL.execute(() -> {
|
|
|
try {
|
|
|
@@ -532,7 +532,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
getGroupsOrderCategoryData(groupsDataStatisticsView, startDate, endDate);
|
|
|
getRenewOrderData(groupsDataStatisticsView, startDate, endDate);
|
|
|
getUnbindChannelOrderData(groupsDataStatisticsView, startDate, endDate);
|
|
|
- getRealGoodsSourceData(groupsDataStatisticsView, startDate, endDate);
|
|
|
+ getRealGoodsSourceData(groupsDataStatisticsView, isGeneral, startDate, endDate);
|
|
|
} finally {
|
|
|
latch.countDown();
|
|
|
}
|
|
|
@@ -540,8 +540,8 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
latch.await();
|
|
|
}
|
|
|
|
|
|
- private void getRealGoodsSourceData(GroupsDataStatisticsView groupsDataStatisticsView, String startDate, String endDate) {
|
|
|
- List<RealGoodsSourceData> realGoodsSourceDataList = orderDonMapper.getRealGoodsSourceData(startDate, endDate);
|
|
|
+ private void getRealGoodsSourceData(GroupsDataStatisticsView groupsDataStatisticsView, Boolean isGeneral, String startDate, String endDate) {
|
|
|
+ List<RealGoodsSourceData> realGoodsSourceDataList = orderDonMapper.getRealGoodsSourceData(isGeneral, startDate, endDate);
|
|
|
Map<String, List<RealGoodsSourceData>> collect = realGoodsSourceDataList.stream().collect(Collectors.groupingBy(RealGoodsSourceData::getLabelSource));
|
|
|
OrderDon.LabelSource[] values = OrderDon.LabelSource.values();
|
|
|
BigDecimal zero = BigDecimal.ZERO;
|