mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
重载计算站点订单报表方法
This commit is contained in:
@@ -6,6 +6,7 @@ import com.jsowell.pile.dto.GetClearingBillDTO;
|
|||||||
import com.jsowell.pile.dto.MerchantOrderReportDTO;
|
import com.jsowell.pile.dto.MerchantOrderReportDTO;
|
||||||
import com.jsowell.pile.dto.SettleOrderReportDTO;
|
import com.jsowell.pile.dto.SettleOrderReportDTO;
|
||||||
import com.jsowell.pile.vo.web.MerchantOrderReportVO;
|
import com.jsowell.pile.vo.web.MerchantOrderReportVO;
|
||||||
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -111,6 +112,15 @@ public interface SettleOrderReportService {
|
|||||||
* @param tradeDate 交易日期
|
* @param tradeDate 交易日期
|
||||||
*/
|
*/
|
||||||
void generateDailyOrderReports(String stationId, String tradeDate);
|
void generateDailyOrderReports(String stationId, String tradeDate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算站点订单报表
|
||||||
|
*
|
||||||
|
* @param stationInfo 站点信息
|
||||||
|
* @param tradeDate 交易日期
|
||||||
|
*/
|
||||||
|
void generateDailyOrderReports(PileStationVO stationInfo, String tradeDate);
|
||||||
|
|
||||||
Map<String, Object> queryUndividedOrder(SettleOrderReportDTO dto);
|
Map<String, Object> queryUndividedOrder(SettleOrderReportDTO dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -120,5 +130,4 @@ public interface SettleOrderReportService {
|
|||||||
*/
|
*/
|
||||||
public PageResponse getMerchantClearingBillList(GetClearingBillDTO dto);
|
public PageResponse getMerchantClearingBillList(GetClearingBillDTO dto);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,10 +40,7 @@ import java.time.LocalDate;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -571,6 +568,28 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
|
|||||||
tradeDate = LocalDate.now().plusDays(-1).toString();
|
tradeDate = LocalDate.now().plusDays(-1).toString();
|
||||||
}
|
}
|
||||||
PileStationVO stationInfo = pileStationInfoService.getStationInfo(stationId);
|
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();
|
QueryOrderDTO dto = new QueryOrderDTO();
|
||||||
dto.setStationId(stationId);
|
dto.setStationId(stationId);
|
||||||
@@ -583,10 +602,6 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
|
|||||||
dto.setMerchantId(stationInfo.getMerchantId());
|
dto.setMerchantId(stationInfo.getMerchantId());
|
||||||
// 查询结算完成的订单
|
// 查询结算完成的订单
|
||||||
List<OrderListVO> orderListVOS = orderBasicInfoMapper.selectOrderBasicInfoList(dto);
|
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());
|
List<String> collect = orderListVOS.stream().map(OrderListVO::getOrderCode).collect(Collectors.toList());
|
||||||
log.info("站点:{}, 在{}-{}查询到订单数据{}条,订单编号:{}", stationInfo.getStationName(), startTime, endTime, orderListVOS.size(), collect);
|
log.info("站点:{}, 在{}-{}查询到订单数据{}条,订单编号:{}", stationInfo.getStationName(), startTime, endTime, orderListVOS.size(), collect);
|
||||||
// 统计出日报信息
|
// 统计出日报信息
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ public class JsowellTask {
|
|||||||
// 查询出所有站点
|
// 查询出所有站点
|
||||||
PileStationInfo pileStationInfo = new PileStationInfo();
|
PileStationInfo pileStationInfo = new PileStationInfo();
|
||||||
pileStationInfo.setDelFlag(Constants.ZERO);
|
pileStationInfo.setDelFlag(Constants.ZERO);
|
||||||
|
// 查询未删除的站点列表
|
||||||
List<PileStationInfo> list = pileStationInfoService.selectPileStationInfoList(pileStationInfo);
|
List<PileStationInfo> list = pileStationInfoService.selectPileStationInfoList(pileStationInfo);
|
||||||
if (CollectionUtils.isEmpty(list)) {
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user