|
@@ -12,6 +12,7 @@ import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
import com.cyksj.mapper.*;
|
|
import com.cyksj.mapper.*;
|
|
|
import com.cyksj.mapper.manage.statistics.*;
|
|
import com.cyksj.mapper.manage.statistics.*;
|
|
|
|
|
+import com.cyksj.mapper.shop.YhShopMapper;
|
|
|
import com.cyksj.model.entity.*;
|
|
import com.cyksj.model.entity.*;
|
|
|
import com.cyksj.model.excel.ExcelAccountData;
|
|
import com.cyksj.model.excel.ExcelAccountData;
|
|
|
import com.cyksj.model.excel.ExcelMonthOrderData;
|
|
import com.cyksj.model.excel.ExcelMonthOrderData;
|
|
@@ -23,7 +24,10 @@ import com.cyksj.model.excel.statistics.ExcelRegisterAccountData;
|
|
|
import com.cyksj.model.excel.statistics.ExcelStreamingAccountData;
|
|
import com.cyksj.model.excel.statistics.ExcelStreamingAccountData;
|
|
|
import com.cyksj.model.manage.views.GroupsRelationView;
|
|
import com.cyksj.model.manage.views.GroupsRelationView;
|
|
|
import com.cyksj.model.manage.views.OrderDonView;
|
|
import com.cyksj.model.manage.views.OrderDonView;
|
|
|
-import com.cyksj.model.views.*;
|
|
|
|
|
|
|
+import com.cyksj.model.views.BackgroundDataView;
|
|
|
|
|
+import com.cyksj.model.views.DistributeOrdersView;
|
|
|
|
|
+import com.cyksj.model.views.ExpiredAccountDataView;
|
|
|
|
|
+import com.cyksj.model.views.GoodsDonSkuView;
|
|
|
import com.cyksj.service.mange.CmsAccountService;
|
|
import com.cyksj.service.mange.CmsAccountService;
|
|
|
import com.cyksj.service.mange.statistics.StatisticsDataDayService;
|
|
import com.cyksj.service.mange.statistics.StatisticsDataDayService;
|
|
|
import com.cyksj.service.mange.statistics.StatisticsDataService;
|
|
import com.cyksj.service.mange.statistics.StatisticsDataService;
|
|
@@ -80,6 +84,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
|
|
|
|
|
private final StatisticsExportMapper statisticsExportMapper;
|
|
private final StatisticsExportMapper statisticsExportMapper;
|
|
|
|
|
|
|
|
|
|
+ private final YhShopMapper yhShopMapper;
|
|
|
private static final GlobalThreadPoolTaskExecutor TASK_POOL = GlobalThreadPoolTaskExecutor.getInstance();
|
|
private static final GlobalThreadPoolTaskExecutor TASK_POOL = GlobalThreadPoolTaskExecutor.getInstance();
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -328,6 +333,30 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
return excelSheetDataList;
|
|
return excelSheetDataList;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void yhShopDistribute(BackgroundDataView backgroundDataView, Date startDate, Date endDate) {
|
|
|
|
|
+ //店铺数量
|
|
|
|
|
+ //注册用户
|
|
|
|
|
+ Map<String, Integer> yhShopDetail = yhShopMapper.selectYhShopDetail(startDate, endDate);
|
|
|
|
|
+ backgroundDataView.setNumOfYhShop(yhShopDetail.get("numOfYhShop"));
|
|
|
|
|
+ backgroundDataView.setNumOfYhShopRegisterUser(yhShopDetail.get("numOfRegisterYhShopUser"));
|
|
|
|
|
+ //销售单数
|
|
|
|
|
+ //销售金额
|
|
|
|
|
+ Map<String, Integer> yhShopOrderDetail = orderDonMapper.selectYhShopDistributeOrderDetail(startDate, endDate);
|
|
|
|
|
+ backgroundDataView.setNumOfYhShopDsOrders(yhShopOrderDetail.get("numOfDsOrder"));
|
|
|
|
|
+ backgroundDataView.setYhShopAmount(BigDecimal.valueOf(yhShopOrderDetail.get("dsMoney")).divide(BigDecimal.valueOf(100)));
|
|
|
|
|
+ //提成金额
|
|
|
|
|
+ BigDecimal yhShopTakeMoney = yhShopMapper.selectYhShopTakeMoney(startDate, endDate);
|
|
|
|
|
+ backgroundDataView.setYhShopTakeMoney(yhShopTakeMoney.divide(BigDecimal.valueOf(100)));
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ Map<String,Integer> yhShopApplyDetail = yhShopMapper.selectYhShopApplyMoney(startDate, endDate);
|
|
|
|
|
+ //已提现
|
|
|
|
|
+ backgroundDataView.setDistributeGotMoney(BigDecimal.valueOf(yhShopApplyDetail.get("s")).divide(BigDecimal.valueOf(100)));
|
|
|
|
|
+ //待审核
|
|
|
|
|
+ backgroundDataView.setDistributeVerifyingMoney(BigDecimal.valueOf(yhShopApplyDetail.get("vf")).divide(BigDecimal.valueOf(100)));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public void exportAllTypeData(List<ExcelSheetAndData> excelSheetDataList, String startDate, String endDate) {
|
|
public void exportAllTypeData(List<ExcelSheetAndData> excelSheetDataList, String startDate, String endDate) {
|
|
|
CountDownLatch latch = new CountDownLatch(2);
|
|
CountDownLatch latch = new CountDownLatch(2);
|
|
|
TASK_POOL.execute(() -> {
|
|
TASK_POOL.execute(() -> {
|