修改实时数据接口
This commit is contained in:
parent
ec40bfde74
commit
692aa17418
@ -85,8 +85,6 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService {
|
|||||||
HashSet<String> noSet = new HashSet<>();
|
HashSet<String> noSet = new HashSet<>();
|
||||||
noSet.add(serialNumber);
|
noSet.add(serialNumber);
|
||||||
R r = powerPileService.addPileWhitelist(chargingStationId, noSet);
|
R r = powerPileService.addPileWhitelist(chargingStationId, noSet);
|
||||||
System.out.println(">>>>>>"+r.getCode());
|
|
||||||
System.out.println(">>>>>>"+r.getMsg());
|
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +109,7 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService {
|
|||||||
Long rateModelId = xhpcChargingPile.getRateModelId();
|
Long rateModelId = xhpcChargingPile.getRateModelId();
|
||||||
Long chargingStationId = xhpcChargingPile.getChargingStationId();
|
Long chargingStationId = xhpcChargingPile.getChargingStationId();
|
||||||
if (xhpcChargingPile.getGunNumber() > 0) {
|
if (xhpcChargingPile.getGunNumber() > 0) {
|
||||||
for (int i = 0; i < xhpcChargingPile.getGunNumber(); i++) {
|
for (int i = 1; i <= xhpcChargingPile.getGunNumber(); i++) {
|
||||||
XhpcTerminal xhpcTerminal = new XhpcTerminal();
|
XhpcTerminal xhpcTerminal = new XhpcTerminal();
|
||||||
xhpcTerminal.setChargingStationId(chargingStationId);
|
xhpcTerminal.setChargingStationId(chargingStationId);
|
||||||
xhpcTerminal.setChargingPileId(chargingPileId);
|
xhpcTerminal.setChargingPileId(chargingPileId);
|
||||||
|
|||||||
@ -6,13 +6,11 @@ import com.xhpc.common.core.domain.R;
|
|||||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||||
import com.xhpc.common.data.down.StartChargingData;
|
import com.xhpc.common.data.down.StartChargingData;
|
||||||
import com.xhpc.common.data.redis.SeqUtil;
|
import com.xhpc.common.data.redis.SeqUtil;
|
||||||
import com.xhpc.common.domain.XhpcChargingPile;
|
|
||||||
import com.xhpc.common.domain.XhpcTerminal;
|
import com.xhpc.common.domain.XhpcTerminal;
|
||||||
import com.xhpc.common.redis.service.RedisService;
|
import com.xhpc.common.redis.service.RedisService;
|
||||||
import com.xhpc.order.domain.HxpcChargeOrder;
|
import com.xhpc.order.domain.HxpcChargeOrder;
|
||||||
import com.xhpc.order.mapper.HxpcChargeOrderMapper;
|
import com.xhpc.order.mapper.HxpcChargeOrderMapper;
|
||||||
import com.xhpc.order.service.IHxpcChargeOrderService;
|
import com.xhpc.order.service.IHxpcChargeOrderService;
|
||||||
import com.xhpc.order.service.IXhpcHistoryOrderService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@ -37,8 +35,6 @@ public class HxpcChargeOrderServiceImpl implements IHxpcChargeOrderService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private HxpcChargeOrderMapper hxpcChargeOrderMapper;
|
private HxpcChargeOrderMapper hxpcChargeOrderMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IXhpcHistoryOrderService xhpcHistoryOrderService;
|
|
||||||
@Autowired
|
|
||||||
private PowerPileService powerPileService;
|
private PowerPileService powerPileService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package com.xhpc.order.service.impl;
|
package com.xhpc.order.service.impl;
|
||||||
|
|
||||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||||
import com.xhpc.common.redis.service.RedisService;
|
|
||||||
import com.xhpc.order.domain.XhpcChargeOrderCurrent;
|
import com.xhpc.order.domain.XhpcChargeOrderCurrent;
|
||||||
import com.xhpc.order.domain.XhpcChargeOrderSoc;
|
import com.xhpc.order.domain.XhpcChargeOrderSoc;
|
||||||
import com.xhpc.order.domain.XhpcChargeOrderVoltage;
|
import com.xhpc.order.domain.XhpcChargeOrderVoltage;
|
||||||
@ -11,7 +10,6 @@ import com.xhpc.order.service.IXhpcRealTimeOrderService;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -23,8 +21,6 @@ import java.util.Map;
|
|||||||
@Service
|
@Service
|
||||||
public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private RedisService redisService;
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private XhpcRealTimeOrderMapper xhpcRealTimeOrderMapper;
|
private XhpcRealTimeOrderMapper xhpcRealTimeOrderMapper;
|
||||||
|
|
||||||
|
|||||||
@ -82,7 +82,7 @@
|
|||||||
LEFT JOIN (select sum(xho.act_price-xho.internet_commission-xho.internet_svc_commission)
|
LEFT JOIN (select sum(xho.act_price-xho.internet_commission-xho.internet_svc_commission)
|
||||||
waitConfirmed,xho.user_id
|
waitConfirmed,xho.user_id
|
||||||
from xhpc_history_order xho
|
from xhpc_history_order xho
|
||||||
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charge_order_id
|
||||||
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||||
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||||
<if test="chargingStation != null and chargingStation != ''">
|
<if test="chargingStation != null and chargingStation != ''">
|
||||||
@ -99,7 +99,7 @@
|
|||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
(select sum(xho.total_price-xho.promotion_discount-xho.internet_commission-xho.internet_svc_commission) confirmed ,xho.user_id
|
(select sum(xho.total_price-xho.promotion_discount-xho.internet_commission-xho.internet_svc_commission) confirmed ,xho.user_id
|
||||||
from xhpc_history_order xho
|
from xhpc_history_order xho
|
||||||
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charge_order_id
|
||||||
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||||
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||||
<if test="chargingStation != null and chargingStation !=''">
|
<if test="chargingStation != null and chargingStation !=''">
|
||||||
@ -124,7 +124,7 @@
|
|||||||
xo.`name` operatorName,xcs.`name` chargingStationName,xho.`reconciliation_status`
|
xo.`name` operatorName,xcs.`name` chargingStationName,xho.`reconciliation_status`
|
||||||
reconciliationStatus,sdd.dict_label reconciliationStatusName
|
reconciliationStatus,sdd.dict_label reconciliationStatusName
|
||||||
from xhpc_history_order xho
|
from xhpc_history_order xho
|
||||||
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charge_order_id
|
||||||
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||||
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||||
LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'reconciliation_status' and sdd.dict_value =
|
LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'reconciliation_status' and sdd.dict_value =
|
||||||
@ -168,7 +168,7 @@
|
|||||||
reconciliationStatus,sdd.dict_label reconciliationStatusName,
|
reconciliationStatus,sdd.dict_label reconciliationStatusName,
|
||||||
xho.end_soc endSoc
|
xho.end_soc endSoc
|
||||||
from xhpc_history_order xho
|
from xhpc_history_order xho
|
||||||
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charge_order_id
|
||||||
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||||
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||||
LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'reconciliation_status' and sdd.dict_value =
|
LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'reconciliation_status' and sdd.dict_value =
|
||||||
|
|||||||
@ -151,7 +151,7 @@
|
|||||||
xco.source,
|
xco.source,
|
||||||
CASE WHEN xco.source = 0 THEN '平台' else xiu.`name` end sourceName
|
CASE WHEN xco.source = 0 THEN '平台' else xiu.`name` end sourceName
|
||||||
from xhpc_history_order xho
|
from xhpc_history_order xho
|
||||||
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charge_order_id
|
||||||
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||||
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||||
LEFT JOIN sys_user su on xo.operator_id = su.operator_id
|
LEFT JOIN sys_user su on xo.operator_id = su.operator_id
|
||||||
@ -197,7 +197,7 @@
|
|||||||
CASE WHEN xco.source = 0 THEN '平台' else xiu.`name` end sourceName,
|
CASE WHEN xco.source = 0 THEN '平台' else xiu.`name` end sourceName,
|
||||||
xho.end_soc endSoc
|
xho.end_soc endSoc
|
||||||
from xhpc_history_order xho
|
from xhpc_history_order xho
|
||||||
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charge_order_id
|
||||||
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||||
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||||
LEFT JOIN sys_user su on xo.operator_id = su.operator_id
|
LEFT JOIN sys_user su on xo.operator_id = su.operator_id
|
||||||
|
|||||||
@ -435,7 +435,6 @@
|
|||||||
#{phone}, '%'))
|
#{phone}, '%'))
|
||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
group by charging_order_id
|
|
||||||
order by co.create_time desc
|
order by co.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -515,14 +514,14 @@
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteChargeVoltage">
|
<delete id="deleteChargeVoltage">
|
||||||
delete from xhpc_charge_order_current where charging_order_id=#{chargingOrderId}
|
delete from xhpc_charge_order_current where charge_order_id=#{chargingOrderId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteChargeOrderSoc">
|
<delete id="deleteChargeOrderSoc">
|
||||||
delete from xhpc_charge_order_soc where charging_order_id=#{chargingOrderId}
|
delete from xhpc_charge_order_soc where charge_order_id=#{chargingOrderId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteChargeOrderCurrent">
|
<delete id="deleteChargeOrderCurrent">
|
||||||
delete from xhpc_charge_order_voltage where charging_order_id=#{chargingOrderId}
|
delete from xhpc_charge_order_voltage where charge_order_id=#{chargingOrderId}
|
||||||
</delete>
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
x
Reference in New Issue
Block a user