mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-10 10:19:54 +08:00
update 推送联联平台相关接口
This commit is contained in:
@@ -146,8 +146,8 @@ public interface LianLianService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备充电中状态变化推送
|
* 设备充电中状态变化推送
|
||||||
* @param pileConnectorCode
|
* @param orderCode
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String pushPileChargeStatusChange(String pileConnectorCode);
|
String pushPileChargeStatusChange(String orderCode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1139,20 +1139,21 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备充电中状态变化推送 notification_connector_charge_status
|
* 设备充电中状态变化推送 notification_connector_charge_status
|
||||||
* @param pileConnectorCode
|
* @param orderCode
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String pushPileChargeStatusChange(String pileConnectorCode) {
|
public String pushPileChargeStatusChange(String orderCode) {
|
||||||
|
// 通过订单号查询信息
|
||||||
|
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||||
// 根据枪口号查询充电实时状态
|
// 根据枪口号查询充电实时状态
|
||||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.queryChargingByPileConnectorCode(pileConnectorCode);
|
OrderBasicInfo orderBasicInfo = orderBasicInfoService.queryChargingByPileConnectorCode(orderInfo.getPileConnectorCode());
|
||||||
List<RealTimeMonitorData> list = orderBasicInfoService.getChargingRealTimeData(orderBasicInfo.getTransactionCode());
|
List<RealTimeMonitorData> list = orderBasicInfoService.getChargingRealTimeData(orderBasicInfo.getTransactionCode());
|
||||||
RealTimeMonitorData realTimeMonitorData = list.get(0);
|
RealTimeMonitorData realTimeMonitorData = list.get(0);
|
||||||
// 拼装联联参数
|
// 拼装联联参数
|
||||||
ConnectorChargeStatusInfo info = ConnectorChargeStatusInfo.builder()
|
ConnectorChargeStatusInfo info = ConnectorChargeStatusInfo.builder()
|
||||||
.startChargeSeq(orderBasicInfo.getOrderCode())
|
.startChargeSeq(orderBasicInfo.getOrderCode())
|
||||||
.connectorID(pileConnectorCode)
|
.connectorID(orderInfo.getPileConnectorCode())
|
||||||
.connectorStatus(Integer.valueOf(realTimeMonitorData.getConnectorStatus()))
|
.connectorStatus(Integer.valueOf(realTimeMonitorData.getConnectorStatus()))
|
||||||
.currentA(new BigDecimal(realTimeMonitorData.getOutputCurrent()))
|
.currentA(new BigDecimal(realTimeMonitorData.getOutputCurrent()))
|
||||||
.voltageA(new BigDecimal(realTimeMonitorData.getOutputVoltage()))
|
.voltageA(new BigDecimal(realTimeMonitorData.getOutputVoltage()))
|
||||||
@@ -1185,7 +1186,10 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
if (StringUtils.isBlank(token)){
|
if (StringUtils.isBlank(token)){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String jsonString = JSONObject.toJSONString(info);
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("ConnectorChargeStatusInfo", info);
|
||||||
|
|
||||||
|
String jsonString = JSONObject.toJSONString(json);
|
||||||
// 发送请求
|
// 发送请求
|
||||||
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user