|
@@ -17,11 +17,14 @@ import com.sqx.modules.order.service.AppOrderService;
|
|
|
import com.sqx.modules.pay.controller.query.CashOutQueryDTO;
|
|
import com.sqx.modules.pay.controller.query.CashOutQueryDTO;
|
|
|
import com.sqx.modules.pay.controller.query.WalletDetailQuery;
|
|
import com.sqx.modules.pay.controller.query.WalletDetailQuery;
|
|
|
import com.sqx.modules.pay.service.CashOutService;
|
|
import com.sqx.modules.pay.service.CashOutService;
|
|
|
|
|
+import com.sqx.modules.reconciliation.model.PlatformBillDto;
|
|
|
|
|
+import com.sqx.modules.reconciliation.service.PlatformBillService;
|
|
|
import com.sqx.modules.utils.excel.ExcelData;
|
|
import com.sqx.modules.utils.excel.ExcelData;
|
|
|
import com.sqx.modules.utils.excel.ExportExcelUtils;
|
|
import com.sqx.modules.utils.excel.ExportExcelUtils;
|
|
|
import com.sqx.scheduler.config.SchedulerLock;
|
|
import com.sqx.scheduler.config.SchedulerLock;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
+import org.jetbrains.annotations.NotNull;
|
|
|
import org.redisson.api.RLock;
|
|
import org.redisson.api.RLock;
|
|
|
import org.redisson.api.RedissonClient;
|
|
import org.redisson.api.RedissonClient;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
@@ -62,6 +65,7 @@ public class ExportScheduler {
|
|
|
private final CashOutService cashOutService;
|
|
private final CashOutService cashOutService;
|
|
|
private final UserMoneyDetailsService userMoneyDetailsService;
|
|
private final UserMoneyDetailsService userMoneyDetailsService;
|
|
|
private final DataCentreService dataCentreService;
|
|
private final DataCentreService dataCentreService;
|
|
|
|
|
+ private final PlatformBillService platformBillService;
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -120,6 +124,12 @@ public class ExportScheduler {
|
|
|
excelData=getAccountEntryExcelData(exportJob);
|
|
excelData=getAccountEntryExcelData(exportJob);
|
|
|
}else if("rankList".equals(fileType)){
|
|
}else if("rankList".equals(fileType)){
|
|
|
excelData=getRankListExcelData(exportJob);
|
|
excelData=getRankListExcelData(exportJob);
|
|
|
|
|
+ }else if("riderBill".equals(fileType)){
|
|
|
|
|
+ excelData=getRiderBillExcelData(exportJob);
|
|
|
|
|
+ }else if("shopBill".equals(fileType)){
|
|
|
|
|
+ excelData=getShopBillExcelData(exportJob);
|
|
|
|
|
+ }else if("platformBill".equals(fileType)){
|
|
|
|
|
+ excelData=getPlatformBillExcelData(exportJob);
|
|
|
}else{
|
|
}else{
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
@@ -164,6 +174,8 @@ public class ExportScheduler {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//订单导出
|
|
//订单导出
|
|
|
private ExcelData getOrderExcelData(ExportJob exportJob){
|
|
private ExcelData getOrderExcelData(ExportJob exportJob){
|
|
|
String[] conditions=exportJob.getConditions().split(",",-1);
|
|
String[] conditions=exportJob.getConditions().split(",",-1);
|
|
@@ -192,6 +204,8 @@ public class ExportScheduler {
|
|
|
queryDto.setShopTypeId(conditions[14]);
|
|
queryDto.setShopTypeId(conditions[14]);
|
|
|
queryDto.setCouponType(conditions[15]);
|
|
queryDto.setCouponType(conditions[15]);
|
|
|
queryDto.setIndentStatus(conditions[16]);
|
|
queryDto.setIndentStatus(conditions[16]);
|
|
|
|
|
+ queryDto.setUpdateStartTime(conditions[17]);
|
|
|
|
|
+ queryDto.setUpdateEndTime(conditions[18]);
|
|
|
|
|
|
|
|
return appOrderService.excelAllOrderAdmin(queryDto);
|
|
return appOrderService.excelAllOrderAdmin(queryDto);
|
|
|
}
|
|
}
|
|
@@ -306,4 +320,30 @@ public class ExportScheduler {
|
|
|
query.setRiderStationId(conditions[4]);
|
|
query.setRiderStationId(conditions[4]);
|
|
|
return dataCentreService.excelRankingList(query);
|
|
return dataCentreService.excelRankingList(query);
|
|
|
}
|
|
}
|
|
|
|
|
+ private ExcelData getRiderBillExcelData(ExportJob exportJob) {
|
|
|
|
|
+ PlatformBillDto query = getPlatformBillDto(exportJob);
|
|
|
|
|
+ return platformBillService.excelRiderBillList(query);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private static @NotNull PlatformBillDto getPlatformBillDto(ExportJob exportJob) {
|
|
|
|
|
+ String[] conditions= exportJob.getConditions().split(",",-1);
|
|
|
|
|
+ PlatformBillDto query =new PlatformBillDto();
|
|
|
|
|
+ query.setStartDate(conditions[1]);
|
|
|
|
|
+ query.setEndDate(conditions[2]);
|
|
|
|
|
+ query.setRiderName(conditions[3]);
|
|
|
|
|
+ query.setRiderPhone(conditions[4]);
|
|
|
|
|
+ query.setShopName(conditions[5]);
|
|
|
|
|
+ query.setShopPhone(conditions[6]);
|
|
|
|
|
+ query.setRiderStation(conditions[7]);
|
|
|
|
|
+ return query;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private ExcelData getShopBillExcelData(ExportJob exportJob) {
|
|
|
|
|
+ PlatformBillDto query = getPlatformBillDto(exportJob);
|
|
|
|
|
+ return platformBillService.excelShopBillList(query);
|
|
|
|
|
+ }
|
|
|
|
|
+ private ExcelData getPlatformBillExcelData(ExportJob exportJob) {
|
|
|
|
|
+ PlatformBillDto query = getPlatformBillDto(exportJob);
|
|
|
|
|
+ return platformBillService.excelPlatformBillList(query);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|