mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-08 16:08:23 +08:00
Merge branch 'dev' of http://192.168.2.46:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -125,23 +125,34 @@
|
|||||||
|
|
||||||
# 站点订单趋势统计图
|
# 站点订单趋势统计图
|
||||||
|
|
||||||
接口地址:
|
```text
|
||||||
|
接口地址:http://localhost:8080/business/pile/station/getStationOrderQuantityInfo
|
||||||
|
|
||||||
请求方式:
|
请求方式:POST
|
||||||
|
```
|
||||||
|
|
||||||
入参
|
### 入参
|
||||||
|
|
||||||
| 字段名 | 类型 | 是否必传 | 备注 |
|
| 字段名 | 类型 | 是否必传 | 备注 |
|
||||||
| ------ | ---- | -------- | ---- |
|
| ---------- | ------------ | -------- | --------------------------------------- |
|
||||||
| | | | |
|
| stationIds | List<String> | Y | 站点id数组 |
|
||||||
|
| type | String | Y | 日期类型(1-近7天;2-近30天;3-近一年) |
|
||||||
|
|
||||||
反参
|
### 反参
|
||||||
|
|
||||||
| 字段名 | 类型 | 是否必传 | 备注 |
|
| 字段名 | 类型 | 是否必传 | 备注 |
|
||||||
| ------ | ---- | -------- | --------------------------- |
|
| ---------------------------- | ------------------------------ | -------- | --------------------------- |
|
||||||
| | | Y | 日期 |
|
| stationOrderQuantityInfoList | List<StationOrderQuantityInfo> | Y | 站点订单数量趋势信息 |
|
||||||
| | | Y | 每天订单数量(单) |
|
| orderNumRateGrowthRate | String | Y | 每天订单数量同比增长率(%) |
|
||||||
| | | Y | 每天订单数量同比增长率(%) |
|
|
||||||
|
### StationOrderQuantityInfo
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 是否必传 | 备注 |
|
||||||
|
| ----------- | ------ | -------- | -------- |
|
||||||
|
| tradeDate | String | Y | 交易日期 |
|
||||||
|
| orderNumber | int | Y | 订单数量 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 站点利用率趋势统计图
|
# 站点利用率趋势统计图
|
||||||
|
|
||||||
|
|||||||
@@ -1044,6 +1044,7 @@ public class PileStationInfoServiceImpl implements PileStationInfoService {
|
|||||||
public StationBusinessAnalyzeInfoVO getStationOrderQuantityInfo(StationBusinessAnalyzeInfoDTO dto) {
|
public StationBusinessAnalyzeInfoVO getStationOrderQuantityInfo(StationBusinessAnalyzeInfoDTO dto) {
|
||||||
StationBusinessAnalyzeInfoVO vo = new StationBusinessAnalyzeInfoVO();
|
StationBusinessAnalyzeInfoVO vo = new StationBusinessAnalyzeInfoVO();
|
||||||
List<String> stationIds = dto.getStationIds();
|
List<String> stationIds = dto.getStationIds();
|
||||||
|
String dateTime = dto.getDateTime();
|
||||||
String type = dto.getType();
|
String type = dto.getType();
|
||||||
String startTime = "";
|
String startTime = "";
|
||||||
String endTime = "";
|
String endTime = "";
|
||||||
@@ -1098,7 +1099,30 @@ public class PileStationInfoServiceImpl implements PileStationInfoService {
|
|||||||
|
|
||||||
list.add(orderQuantityInfoVO);
|
list.add(orderQuantityInfoVO);
|
||||||
}
|
}
|
||||||
|
// 用户选中某日期
|
||||||
|
if (dateTime != null) {
|
||||||
|
String orderNumRateGrowthRate = "";
|
||||||
|
String format = "";
|
||||||
|
if (StringUtils.equals(Constants.ONE, type)) {
|
||||||
|
// 7天
|
||||||
|
format = DateUtils.YYYY_MM_DD;
|
||||||
|
}else {
|
||||||
|
format = DateUtils.YYYY_MM;
|
||||||
|
}
|
||||||
|
String yesterday = DateUtils.parseDateToStr(format, DateUtils.addDays(DateUtils.parseDate(dateTime), -1));
|
||||||
|
SettleOrderReport todayReportInfo = map.get(dateTime);
|
||||||
|
SettleOrderReport yesterdayReportInfo = map.get(yesterday);
|
||||||
|
|
||||||
|
BigDecimal todayOrderNum = new BigDecimal(todayReportInfo.getChargeNum());
|
||||||
|
BigDecimal yesterdayOrderNum = new BigDecimal(yesterdayReportInfo.getChargeNum());
|
||||||
|
|
||||||
|
// 计算增长率
|
||||||
|
if (yesterdayOrderNum.compareTo(BigDecimal.ZERO) != 0) {
|
||||||
|
BigDecimal orderNumRate = todayOrderNum.subtract(yesterdayOrderNum).divide(yesterdayOrderNum, 2, BigDecimal.ROUND_HALF_UP);
|
||||||
|
orderNumRateGrowthRate = orderNumRate.multiply(new BigDecimal("100")) + "%";
|
||||||
|
}
|
||||||
|
vo.setOrderAmountGrowthRate(orderNumRateGrowthRate);
|
||||||
|
}
|
||||||
vo.setStationOrderQuantityInfoList(list);
|
vo.setStationOrderQuantityInfoList(list);
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ public class StationBusinessAnalyzeInfoVO {
|
|||||||
*/
|
*/
|
||||||
private String serviceAmountGrowthRate;
|
private String serviceAmountGrowthRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单数量增长率
|
||||||
|
*/
|
||||||
|
private String orderNumRateGrowthRate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 运营端小程序订单详情VO
|
* 运营端小程序订单详情VO
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1017,6 +1017,7 @@
|
|||||||
<if test="dto.stationId != null and dto.stationId != ''"> and t1.station_id = #{dto.stationId}</if>
|
<if test="dto.stationId != null and dto.stationId != ''"> and t1.station_id = #{dto.stationId}</if>
|
||||||
<if test="dto.plateNumber != null and dto.plateNumber != ''"> and t1.plate_number = #{dto.plateNumber}</if>
|
<if test="dto.plateNumber != null and dto.plateNumber != ''"> and t1.plate_number = #{dto.plateNumber}</if>
|
||||||
<if test="dto.status != null and dto.status != ''"> and t1.status = #{dto.status}</if>
|
<if test="dto.status != null and dto.status != ''"> and t1.status = #{dto.status}</if>
|
||||||
|
<if test="dto.payStatus != null and dto.payStatus != ''"> and t1.pay_status = #{dto.payStatus}</if>
|
||||||
<if test="dto.startTime != null "> and t1.start_time = #{dto.startTime}</if>
|
<if test="dto.startTime != null "> and t1.start_time = #{dto.startTime}</if>
|
||||||
<if test="dto.orderAmount != null "> and t1.order_amount = #{dto.orderAmount}</if>
|
<if test="dto.orderAmount != null "> and t1.order_amount = #{dto.orderAmount}</if>
|
||||||
<if test="dto.pileSn != null and dto.pileSn != ''"> and t1.pile_sn = #{dto.pileSn}</if>
|
<if test="dto.pileSn != null and dto.pileSn != ''"> and t1.pile_sn = #{dto.pileSn}</if>
|
||||||
|
|||||||
@@ -7,6 +7,13 @@
|
|||||||
<el-form-item label="会员id" prop="memberId">
|
<el-form-item label="会员id" prop="memberId">
|
||||||
<el-input v-model="queryParams.memberId" placeholder="请输入会员id" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.memberId" placeholder="请输入会员id" clearable @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="支付状态" prop="payStatus">
|
||||||
|
<el-select v-model="queryParams.payStatus" placeholder="请选择支付状态" clearable filterable
|
||||||
|
style="width: 140px">
|
||||||
|
<el-option v-for="item in dict.type.occupy_pay_status" :key="item.value" :label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<!-- <el-form-item label="充电站id" prop="stationId">-->
|
<!-- <el-form-item label="充电站id" prop="stationId">-->
|
||||||
<!-- <el-input v-model="queryParams.stationId" placeholder="请输入充电站id" clearable @keyup.enter.native="handleQuery" />-->
|
<!-- <el-input v-model="queryParams.stationId" placeholder="请输入充电站id" clearable @keyup.enter.native="handleQuery" />-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
|
|||||||
Reference in New Issue
Block a user