适配交流桩
This commit is contained in:
parent
ccbfc19582
commit
5ba247dee7
@ -129,10 +129,6 @@ public class XhpcChargeOrderController extends BaseController {
|
|||||||
public void getOrderMessage(@RequestParam Long userId)
|
public void getOrderMessage(@RequestParam Long userId)
|
||||||
{
|
{
|
||||||
logger.info("<<<<<<<<<<再次<<<<<<<<<<<<<<实时数据接口>>>>>>>>>>>>>>>>>");
|
logger.info("<<<<<<<<<<再次<<<<<<<<<<<<<<实时数据接口>>>>>>>>>>>>>>>>>");
|
||||||
logger.info("<<<<<<<<<<再次<<<<<<<<<<<<<实时数据接口>>>>>>>>>>>>>>>>>>"+userId);
|
|
||||||
logger.info("<<<<<<<<<<再次<<<<<<<<<<<<<<实时数据接口>>>>>>>>>>>>>>>>>"+userId);
|
|
||||||
logger.info("<<<<<<<<<<再次<<<<<<<<<<<<<<实时数据接口>>>>>>>>>>>>>>>>>");
|
|
||||||
logger.info("<<<<<<<<<<接收时间<<<<<<<<<<<<<<"+ DateUtil.format(Calendar.getInstance().getTime(), "yyyy-MM-dd HH:mm:ss")+">>>>>>>>>>>>>>>>>");
|
|
||||||
|
|
||||||
Map<String, Object> orderMessage = iXhpcChargeOrderService.getOrderMessage(userId);
|
Map<String, Object> orderMessage = iXhpcChargeOrderService.getOrderMessage(userId);
|
||||||
Map<String,Object> map =new HashMap<>();
|
Map<String,Object> map =new HashMap<>();
|
||||||
@ -154,6 +150,7 @@ public class XhpcChargeOrderController extends BaseController {
|
|||||||
data.put("remainingTime","0");
|
data.put("remainingTime","0");
|
||||||
data.put("chargingTimeNumber",0);
|
data.put("chargingTimeNumber",0);
|
||||||
data.put("serialNumber","0");
|
data.put("serialNumber","0");
|
||||||
|
data.put("type","1");
|
||||||
data.put("parkingInstructions","在非充电情况下占用车位按照0.30元/分钟收费");
|
data.put("parkingInstructions","在非充电情况下占用车位按照0.30元/分钟收费");
|
||||||
map.put("data", data);
|
map.put("data", data);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -141,4 +141,11 @@ public interface XhpcChargeOrderMapper {
|
|||||||
* 获取费率
|
* 获取费率
|
||||||
*/
|
*/
|
||||||
List<XhpcRate> getRateModelId(@Param("rateModelId")Long rateModelId);
|
List<XhpcRate> getRateModelId(@Param("rateModelId")Long rateModelId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电桩信息
|
||||||
|
* @param chargingPileId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String,Object> getXhpcChargingPile(@Param("terminalId")Long terminalId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,4 +135,12 @@ public interface IXhpcChargeOrderService {
|
|||||||
* 获取费率
|
* 获取费率
|
||||||
*/
|
*/
|
||||||
List<XhpcRate> getRateModelId(Long rateModelId);
|
List<XhpcRate> getRateModelId(Long rateModelId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电桩信息
|
||||||
|
* @param chargingPileId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String,Object> getXhpcChargingPile(Long terminalId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -324,5 +324,10 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService {
|
|||||||
return xhpcChargeOrderMapper.getRateModelId(rateModelId);
|
return xhpcChargeOrderMapper.getRateModelId(rateModelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getXhpcChargingPile(Long terminalId) {
|
||||||
|
return xhpcChargeOrderMapper.getXhpcChargingPile(terminalId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -610,6 +610,13 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
|||||||
data.put("remainingTime",xhpcRealTimeOrder.getRemainingTime());
|
data.put("remainingTime",xhpcRealTimeOrder.getRemainingTime());
|
||||||
data.put("serialNumber",orderNo.substring(0,16));
|
data.put("serialNumber",orderNo.substring(0,16));
|
||||||
data.put("parkingInstructions","在非充电情况下占用车位按照0.30元/分钟收费");
|
data.put("parkingInstructions","在非充电情况下占用车位按照0.30元/分钟收费");
|
||||||
|
//获取桩直流还是交流
|
||||||
|
Map<String, Object> xhpcChargingPile = xhpcChargeOrderService.getXhpcChargingPile(xhpcChargeOrder.getTerminalId());
|
||||||
|
if(xhpcChargingPile !=null){
|
||||||
|
data.put("type", xhpcChargingPile.get("type").toString());
|
||||||
|
}else{
|
||||||
|
data.put("type", 1);
|
||||||
|
}
|
||||||
map.put("data", data);
|
map.put("data", data);
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
|||||||
@ -93,9 +93,11 @@
|
|||||||
rto.charging_time as chargingTime,
|
rto.charging_time as chargingTime,
|
||||||
rto.remaining_time as remainingTime,
|
rto.remaining_time as remainingTime,
|
||||||
rto.amount_charged as amountCharged,
|
rto.amount_charged as amountCharged,
|
||||||
|
IFNULL(cp.type,'1') as type,
|
||||||
au.balance as balance
|
au.balance as balance
|
||||||
from xhpc_real_time_order as rto
|
from xhpc_real_time_order as rto
|
||||||
LEFT JOIN xhpc_app_user as au on au.app_user_id = rto.user_id
|
LEFT JOIN xhpc_app_user as au on au.app_user_id = rto.user_id
|
||||||
|
left join xhpc_charging_pile as cp on cp.serial_number = rto.pile_number and cp.status =0 and cp.del_flag=0
|
||||||
where rto.charging_order_id =(select charge_order_id from xhpc_charge_order where status =0 and source = 0 and user_id=#{userId} ORDER BY create_time desc LIMIT 1)
|
where rto.charging_order_id =(select charge_order_id from xhpc_charge_order where status =0 and source = 0 and user_id=#{userId} ORDER BY create_time desc LIMIT 1)
|
||||||
and rto.user_id=#{userId}
|
and rto.user_id=#{userId}
|
||||||
ORDER BY rto.create_time DESC limit 1
|
ORDER BY rto.create_time DESC limit 1
|
||||||
@ -469,4 +471,11 @@
|
|||||||
<select id="getRateModelId" resultMap="XhpcRateMap">
|
<select id="getRateModelId" resultMap="XhpcRateMap">
|
||||||
select * from xhpc_rate where rate_model_id=#{rateModelId} and status=0 and del_flag=0
|
select * from xhpc_rate where rate_model_id=#{rateModelId} and status=0 and del_flag=0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getXhpcChargingPile" resultType="map">
|
||||||
|
select
|
||||||
|
charging_pile_id as chargingPileId,
|
||||||
|
IFNULL(type,'1') as type
|
||||||
|
from xhpc_charging_pile where charging_pile_id =(select charging_pile_id from xhpc_terminal where terminal_id=#{terminalId})
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -114,6 +114,7 @@ public class OrderNotificationWebSocket {
|
|||||||
data.put("remainingTime","0");
|
data.put("remainingTime","0");
|
||||||
data.put("serialNumber","0");
|
data.put("serialNumber","0");
|
||||||
data.put("parkingInstructions","在非充电情况下占用车位按照0.30元/分钟收费");
|
data.put("parkingInstructions","在非充电情况下占用车位按照0.30元/分钟收费");
|
||||||
|
data.put("type", "1");
|
||||||
map.put("data", data);
|
map.put("data", data);
|
||||||
JSONObject json = new JSONObject(map);
|
JSONObject json = new JSONObject(map);
|
||||||
sendMessage(this.userId,json.toString());
|
sendMessage(this.userId,json.toString());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user