mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 抽取方法
This commit is contained in:
@@ -106,9 +106,6 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
||||
// 保存时间
|
||||
saveLastTimeAndCheckChannel(pileSn, channel);
|
||||
|
||||
// 校验channel
|
||||
// PileChannelEntity.checkChannel(pileSn, channel);
|
||||
|
||||
// 枪号
|
||||
startIndex += length;
|
||||
length = 1;
|
||||
@@ -309,8 +306,24 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
||||
}
|
||||
}
|
||||
|
||||
// 推送第三方平台
|
||||
pushToThirdPartyPlatforms(pileSn, connectorCode, connectorStatus, realTimeMonitorData, transactionCode);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送第三方平台
|
||||
* @param pileSn 桩编号
|
||||
* @param connectorCode 枪口号
|
||||
* @param connectorStatus 枪口状态
|
||||
* @param realTimeMonitorData 实时数据
|
||||
* @param transactionCode 交易流水号
|
||||
*/
|
||||
private void pushToThirdPartyPlatforms(String pileSn, String connectorCode, String connectorStatus,
|
||||
RealTimeMonitorData realTimeMonitorData, String transactionCode) {
|
||||
try {
|
||||
// 推送第三方平台,先通过桩编号查出站点信息
|
||||
// 推送第三方平台,先通过桩编号查出站点信息 pushToThirdPartyPlatforms
|
||||
PileBasicInfo pileBasicInfo = pileBasicInfoService.selectPileBasicInfoBySN(pileSn);
|
||||
|
||||
// Map<String, String> pileStatusMap = pileConnectorInfoService.getPileStatus(Lists.newArrayList(pileSn));
|
||||
@@ -322,19 +335,19 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
||||
// 查询该站点是否推送第三方平台
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
if (StringUtils.isBlank(String.valueOf(pileBasicInfo.getStationId()))) {
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
relation.setStationId(pileBasicInfo.getStationId());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
if (Objects.isNull(relationInfo)) {
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
String pileConnectorCode = pileSn + connectorCode;
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), relationInfo.getThirdPartyType())) {
|
||||
// 联联
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode);
|
||||
if (orderInfo == null) {
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
log.info("推送联联平台实时数据 params: orderBasicInfo:{}", JSON.toJSONString(orderInfo));
|
||||
// 设备状态变化推送 notification_stationStatus
|
||||
@@ -365,7 +378,7 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
||||
// 推送充电状态
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode);
|
||||
if (orderInfo == null) {
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
if (StringUtils.equals(orderInfo.getStartMode(), StartModeEnum.THIRD_PARTY_PLATFORM.getValue())) {
|
||||
log.info("推送甬城泊车充电订单状态 param:{}", orderInfo);
|
||||
@@ -376,8 +389,6 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
||||
} catch (Exception e) {
|
||||
log.error("推送第三方平台 实时数据 异常", e);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Reference in New Issue
Block a user