修改首页充电数据平均电量显示
This commit is contained in:
parent
38fb21c022
commit
8fd8d12b27
@ -296,7 +296,7 @@ public interface IXhpcStatisticsService {
|
|||||||
List<Map<String, Object>> getTodayTerminal(Long operatorId,Long chargingStationId,Long chargingPileId);
|
List<Map<String, Object>> getTodayTerminal(Long operatorId,Long chargingStationId,Long chargingPileId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 今日电枪实时状态
|
* 充电数据
|
||||||
*
|
*
|
||||||
* @param state 1 充电数据 2.创建订单量
|
* @param state 1 充电数据 2.创建订单量
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1310,6 +1310,34 @@
|
|||||||
ifnull(sum(total_price),0) totalPrice,
|
ifnull(sum(total_price),0) totalPrice,
|
||||||
ifnull(sum(power_price_total),0) powerPriceTotal,
|
ifnull(sum(power_price_total),0) powerPriceTotal,
|
||||||
ifnull(sum(service_price_total),0)servicePriceTotal,
|
ifnull(sum(service_price_total),0)servicePriceTotal,
|
||||||
|
format(ifnull(sum(total_power)/
|
||||||
|
(select count(history_order_id) from xhpc_history_order
|
||||||
|
where end_time >=#{beginOfDay} and end_time <= #{endOfDay} and total_price !=0
|
||||||
|
<if test="operatorId !=null and ''!=operatorId">
|
||||||
|
and charging_station_id in (select charging_station_id from xhpc_charging_station where operator_id=#{operatorId})
|
||||||
|
</if>
|
||||||
|
<if test="tenantId !=null and tenantId !=''">
|
||||||
|
and tenant_id = #{tenantId}
|
||||||
|
</if>
|
||||||
|
<if test="chargingStationId !=null">
|
||||||
|
and charging_station_id=#{chargingStationId}
|
||||||
|
</if>
|
||||||
|
<if test="chargingPileId !=null">
|
||||||
|
and terminal_id in (select terminal_id from xhpc_terminal where charging_pile_id=#{chargingPileId})
|
||||||
|
</if>
|
||||||
|
<if test="status==1">
|
||||||
|
and charging_station_id in (select charging_station_id from xhpc_charging_station where operator_id=#{logOperatorId})
|
||||||
|
</if>
|
||||||
|
<if test="status==2">
|
||||||
|
and charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{logOperatorId})
|
||||||
|
</if>
|
||||||
|
<if test="type!=null and type ==4">
|
||||||
|
GROUP BY date_format(end_time, '%Y-%m')
|
||||||
|
</if>
|
||||||
|
<if test="type !=4">
|
||||||
|
GROUP BY DATE_FORMAT(end_time, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
),0), 3) averagePower,
|
||||||
<if test="type!=null and type ==4">
|
<if test="type!=null and type ==4">
|
||||||
date_format(end_time, '%Y-%m') time
|
date_format(end_time, '%Y-%m') time
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user