mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
生成运营商日报表 定时任务
This commit is contained in:
@@ -192,7 +192,7 @@ public class JsowellTask {
|
||||
}
|
||||
|
||||
/**
|
||||
* 定时任务, 生成运营商日报方法
|
||||
* 定时任务, 订单分账
|
||||
* jsowellTask.processOrderSplitting()
|
||||
*/
|
||||
public void processOrderSplitting() {
|
||||
@@ -206,17 +206,40 @@ public class JsowellTask {
|
||||
LocalDate yesterday = LocalDate.now().plusDays(-1);
|
||||
|
||||
// 设置挡板,8月1号之后的订单按照实际进行分账
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
LocalDateTime dateTime = LocalDateTime.of(2023, 8, 2, 0, 0, 0);
|
||||
if (now.isBefore(dateTime)) {
|
||||
log.info("当前时间:{}早于:{}, 不进行分账处理", DateUtils.formatDateTime(now), DateUtils.formatDateTime(dateTime));
|
||||
return;
|
||||
}
|
||||
// LocalDateTime now = LocalDateTime.now();
|
||||
// LocalDateTime dateTime = LocalDateTime.of(2023, 8, 2, 0, 0, 0);
|
||||
// if (now.isBefore(dateTime)) {
|
||||
// log.info("当前时间:{}早于:{}, 不进行分账处理", DateUtils.formatDateTime(now), DateUtils.formatDateTime(dateTime));
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 调生成运营商日报方法
|
||||
pileMerchantInfos.parallelStream().forEach(merchant -> {
|
||||
try {
|
||||
orderBasicInfoService.orderSplittingOperations(merchant.getId() + "", yesterday.toString());
|
||||
} catch (Exception e) {
|
||||
log.error("生成运营商日报异常, merchantId:{}", merchant.getId(), e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成运营商日报表
|
||||
* jsowellTask.generateMerchantBill()
|
||||
*/
|
||||
public void generateMerchantBill() {
|
||||
// 查询运营商列表
|
||||
List<PileMerchantInfo> pileMerchantInfos = pileMerchantInfoService.selectPileMerchantInfoList(null);
|
||||
if (CollectionUtils.isEmpty(pileMerchantInfos)) {
|
||||
log.info("定时任务,处理订单分账, 未查询到运营商列表,直接返回");
|
||||
return;
|
||||
}
|
||||
// 获取日期
|
||||
LocalDate yesterday = LocalDate.now().plusDays(-1);
|
||||
|
||||
// 调生成运营商日报方法
|
||||
pileMerchantInfos.parallelStream().forEach(merchant -> {
|
||||
try {
|
||||
// orderBasicInfoService.orderSplittingOperations(merchant.getId() + "", yesterday.toString());
|
||||
orderBasicInfoService.generateMerchantBill(merchant.getId() + "", yesterday.toString());
|
||||
} catch (Exception e) {
|
||||
log.error("生成运营商日报异常, merchantId:{}", merchant.getId(), e);
|
||||
|
||||
Reference in New Issue
Block a user