mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 电单车协议
This commit is contained in:
@@ -342,8 +342,14 @@ public class OrderService {
|
||||
if (StringUtils.equals(orderInfo.getOrderStatus(), OrderStatusEnum.ORDER_COMPLETE.getValue())) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_ORDER_COMPLETE_ERROR);
|
||||
}
|
||||
// 校验订单中的会员与操作会员是否一致
|
||||
if (!StringUtils.equals(orderInfo.getMemberId(), dto.getMemberId())) {
|
||||
|
||||
/*
|
||||
校验是否有权限操作该订单, 否则抛出异常
|
||||
只有会员本人, 该桩的管理员可以操作
|
||||
*/
|
||||
boolean permissionFlag = StringUtils.equals(orderInfo.getMemberId(), dto.getMemberId())
|
||||
|| UserUtils.checkStationAuth(orderInfo.getStationId()); // false无权限, true有权限
|
||||
if (!permissionFlag) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_ORDER_MEMBER_NOT_MATCH_ERROR);
|
||||
}
|
||||
// 判断该桩是否推送了第三方站点(需要我方平台发送启动指令的,如:华为平台)
|
||||
@@ -361,32 +367,7 @@ public class OrderService {
|
||||
// 发送停止指令
|
||||
pileRemoteService.remoteStopCharging(orderInfo.getPileSn(), orderInfo.getConnectorCode(), orderInfo.getTransactionCode());
|
||||
}
|
||||
|
||||
// List<ThirdPartyStationRelationVO> relationInfoList = thirdPartyStationRelationService.getRelationInfoList(orderInfo.getStationId());
|
||||
//
|
||||
// if (CollectionUtils.isNotEmpty(relationInfoList)) {
|
||||
// for (ThirdPartyStationRelationVO vo : relationInfoList) {
|
||||
// String startMode = vo.getStartMode();
|
||||
// if (StringUtils.equals(Constants.ONE, startMode)) {
|
||||
// // 启动类型为 1 的即为对接了类似华为平台,需要调用第三方平台的统一停止充电接口
|
||||
// ThirdPartyCommonStopChargeDTO commonStopChargeDTO = new ThirdPartyCommonStopChargeDTO();
|
||||
// commonStopChargeDTO.setThirdPartyType(vo.getThirdPartyType());
|
||||
// commonStopChargeDTO.setOrderBasicInfo(orderInfo);
|
||||
// // 调用统一停止充电接口
|
||||
// String result = commonService.commonStopCharge(commonStopChargeDTO);
|
||||
// log.info("订单:{}调用第三方平台统一停止充电接口,调用结果 SuccStat:{}", orderInfo.getOrderCode(), result);
|
||||
// }else {
|
||||
// // 发送停止指令
|
||||
// pileRemoteService.remoteStopCharging(orderInfo.getPileSn(), orderInfo.getConnectorCode(), orderInfo.getTransactionCode());
|
||||
// }
|
||||
// }
|
||||
// }else {
|
||||
// // 发送停止指令
|
||||
// pileRemoteService.remoteStopCharging(orderInfo.getPileSn(), orderInfo.getConnectorCode(), orderInfo.getTransactionCode());
|
||||
// }
|
||||
// 发送停止指令
|
||||
// pileRemoteService.remoteStopCharging(orderInfo.getPileSn(), orderInfo.getConnectorCode(), orderInfo.getTransactionCode());
|
||||
log.info("用户停止充电, orderCode:{}, transactionCode:{}, 发送停机指令成功", dto.getOrderCode(), orderInfo.getTransactionCode());
|
||||
log.info("主动停止充电, orderCode:{}, transactionCode:{}, 发送停机指令成功", dto.getOrderCode(), orderInfo.getTransactionCode());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user