mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-02 04:57:57 +08:00
update 统计订单数据
This commit is contained in:
@@ -371,11 +371,25 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public OrderTotalDataVO getOrderTotalDataV2(QueryOrderDTO dto) {
|
public OrderTotalDataVO getOrderTotalDataV2(QueryOrderDTO dto) {
|
||||||
|
// 确定查询的站点
|
||||||
|
List<String> stationIdList = Lists.newArrayList();
|
||||||
|
if (StringUtils.isNotBlank(dto.getStationId())) {
|
||||||
|
stationIdList.add(dto.getStationId());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(dto.getMerchantId())) {
|
||||||
|
List<PileStationInfo> pileStationInfos = pileStationInfoService.selectStationListByMerchantId(Long.parseLong(dto.getMerchantId()));
|
||||||
|
if (CollectionUtils.isNotEmpty(pileStationInfos)) {
|
||||||
|
List<String> collect = pileStationInfos.stream()
|
||||||
|
.map(x -> String.valueOf(x.getId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
stationIdList.addAll(collect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
OrderTotalDataVO vo = new OrderTotalDataVO();
|
OrderTotalDataVO vo = new OrderTotalDataVO();
|
||||||
String startTime = dto.getStartTime();
|
String startTime = dto.getStartTime();
|
||||||
String endTime = dto.getEndTime();
|
String endTime = dto.getEndTime();
|
||||||
vo.setDateDescription(startTime + " - " + endTime);
|
vo.setDateDescription(startTime + " - " + endTime);
|
||||||
List<String> stationIdList = Lists.newArrayList(dto.getStationId());
|
|
||||||
List<SettleOrderReport> settleOrderReports = settleOrderReportService.queryOrderReport(stationIdList, startTime, endTime);
|
List<SettleOrderReport> settleOrderReports = settleOrderReportService.queryOrderReport(stationIdList, startTime, endTime);
|
||||||
// 总消费金额
|
// 总消费金额
|
||||||
BigDecimal sumOrderAmount = BigDecimal.ZERO;
|
BigDecimal sumOrderAmount = BigDecimal.ZERO;
|
||||||
|
|||||||
@@ -140,11 +140,9 @@
|
|||||||
v-hasPermi="['order:order:export']"
|
v-hasPermi="['order:order:export']"
|
||||||
>导出
|
>导出
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <div>
|
<div>
|
||||||
{{ dateDescription }}期间,总用电量{{ sumUsedElectricity }}度,总消费金额{{
|
{{ dateDescription }}期间,总用电量{{ sumUsedElectricity }}度,总消费金额{{ sumOrderAmount }}元,总结算金额{{ sumSettleAmount }}元
|
||||||
sumOrderAmount
|
</div>
|
||||||
}}元,总结算金额{{ sumSettleAmount }}元
|
|
||||||
</div>-->
|
|
||||||
<el-popover placement="top-start" width="400" trigger="click">
|
<el-popover placement="top-start" width="400" trigger="click">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
:indeterminate="isIndeterminate"
|
:indeterminate="isIndeterminate"
|
||||||
@@ -468,12 +466,10 @@ export default {
|
|||||||
console.log("加载订单列表页数据...");
|
console.log("加载订单列表页数据...");
|
||||||
// 设置默认日期
|
// 设置默认日期
|
||||||
await this.defaultDate();
|
await this.defaultDate();
|
||||||
// 查询订单列表
|
|
||||||
this.getList();
|
|
||||||
// 查询站点列表
|
// 查询站点列表
|
||||||
this.getStationList();
|
this.getStationList();
|
||||||
// 获取订单总金额
|
// 查询数据
|
||||||
// this.getOrderTotalData();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
/** 查询订单列表 */
|
/** 查询订单列表 */
|
||||||
getList() {
|
getList() {
|
||||||
@@ -487,13 +483,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取订单总金额数据
|
// 获取订单总金额数据
|
||||||
getOrderTotalData() {
|
getOrderTotalData() {
|
||||||
// totalData(this.queryParams).then((response) => {
|
totalData(this.queryParams).then((response) => {
|
||||||
// console.log("getOrderTotalData", response);
|
console.log("getOrderTotalData", response);
|
||||||
// this.dateDescription = response.data.dateDescription;
|
this.dateDescription = response.data.dateDescription;
|
||||||
// this.sumOrderAmount = response.data.sumOrderAmount;
|
this.sumOrderAmount = response.data.sumOrderAmount;
|
||||||
// this.sumUsedElectricity = response.data.sumUsedElectricity;
|
this.sumUsedElectricity = response.data.sumUsedElectricity;
|
||||||
// this.sumSettleAmount = response.data.sumSettleAmount;
|
this.sumSettleAmount = response.data.sumSettleAmount;
|
||||||
// });
|
});
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
@@ -534,7 +530,7 @@ export default {
|
|||||||
// 获取订单列表
|
// 获取订单列表
|
||||||
this.getList();
|
this.getList();
|
||||||
// 获取订单总金额
|
// 获取订单总金额
|
||||||
// this.getOrderTotalData();
|
this.getOrderTotalData();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
|
|||||||
Reference in New Issue
Block a user