mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-25 13:35:15 +08:00
重载计算站点订单报表方法
This commit is contained in:
@@ -40,10 +40,7 @@ import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -571,6 +568,28 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
|
||||
tradeDate = LocalDate.now().plusDays(-1).toString();
|
||||
}
|
||||
PileStationVO stationInfo = pileStationInfoService.getStationInfo(stationId);
|
||||
|
||||
// 方法重载
|
||||
generateDailyOrderReports(stationInfo, tradeDate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算站点订单报表
|
||||
*
|
||||
* @param stationInfo 站点信息
|
||||
* @param tradeDate 交易日期
|
||||
*/
|
||||
@Override
|
||||
public void generateDailyOrderReports(PileStationVO stationInfo, String tradeDate) {
|
||||
// logger.info("线程名===={}", Thread.currentThread().getName());
|
||||
if (Objects.isNull(stationInfo)) {
|
||||
return;
|
||||
}
|
||||
if (StringUtils.isBlank(tradeDate)) {
|
||||
// 日期为空默认昨天
|
||||
tradeDate = LocalDate.now().plusDays(-1).toString();
|
||||
}
|
||||
String stationId = stationInfo.getId();
|
||||
// 查询站点前一天结算完成的订单
|
||||
QueryOrderDTO dto = new QueryOrderDTO();
|
||||
dto.setStationId(stationId);
|
||||
@@ -583,10 +602,6 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
|
||||
dto.setMerchantId(stationInfo.getMerchantId());
|
||||
// 查询结算完成的订单
|
||||
List<OrderListVO> orderListVOS = orderBasicInfoMapper.selectOrderBasicInfoList(dto);
|
||||
// if (CollectionUtils.isEmpty(orderListVOS)) {
|
||||
// logger.info("站点:{}, 在{}-{}没有查询到订单数据", stationInfo.getStationName(), startTime, endTime);
|
||||
// return;
|
||||
// }
|
||||
List<String> collect = orderListVOS.stream().map(OrderListVO::getOrderCode).collect(Collectors.toList());
|
||||
log.info("站点:{}, 在{}-{}查询到订单数据{}条,订单编号:{}", stationInfo.getStationName(), startTime, endTime, orderListVOS.size(), collect);
|
||||
// 统计出日报信息
|
||||
|
||||
Reference in New Issue
Block a user