| | |
| | | import com.ruoyi.integration.api.feignClient.*; |
| | | import com.ruoyi.integration.api.model.*; |
| | | import com.ruoyi.integration.api.vo.GetPlatformStopChargingReply; |
| | | import com.ruoyi.integration.api.vo.StartChargeResult; |
| | | import com.ruoyi.order.api.dto.SettlementConfirmAdd; |
| | | import com.ruoyi.order.api.feignClient.AccountingStrategyDetailOrderClient; |
| | | import com.ruoyi.order.api.feignClient.AccountingStrategyOrderClient; |
| | |
| | | private UploadRealTimeMonitoringDataClient uploadRealTimeMonitoringDataClient; |
| | | |
| | | @Resource |
| | | private ChargingHandshakeClient chargingHandshakeClient; |
| | | private TCECClient tcecClient; |
| | | |
| | | @Resource |
| | | private SendMessageClient sendMessageClient; |
| | |
| | | } |
| | | this.updateById(order); |
| | | redisService.setCacheObject(key, preChargeCheck1, 24L, TimeUnit.HOURS); |
| | | //推送三方平台订单状态 |
| | | if(2 == chargingOrder.getOrderSource()){ |
| | | tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | } |
| | | return true; |
| | | }else{ |
| | | Integer counter = boot_failed_map.get(code); |
| | |
| | | order.setEndMode(0); |
| | | this.updateById(order); |
| | | redisService.setCacheObject(key, preChargeCheck1, 24L, TimeUnit.HOURS); |
| | | //推送三方平台订单状态 |
| | | if(2 == chargingOrder.getOrderSource()){ |
| | | tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(order.getChargingGunId()).getData(); |
| | | chargingGun.setStatus(4); |
| | | chargingGunClient.updateChargingGunById(chargingGun); |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(chargingGun.getId(), chargingGun.getStatus()); |
| | | } |
| | | redisService.setCacheObject("AQJC_" + order.getChargingGunId(), preChargeCheck1, 24L, TimeUnit.HOURS); |
| | | this.updateById(order); |
| | | //推送三方平台启动充电结果 |
| | | if(2 == order.getOrderSource()){ |
| | | StartChargeResult result = new StartChargeResult(); |
| | | result.setStartChargeSeq(order.getStartChargeSeq()); |
| | | result.setStartChargeSeqStat(3 == order.getStatus() ? 2 : 4); |
| | | result.setConnectorID(order.getChargingGunId().toString()); |
| | | result.setStartTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | Operator operator = operatorClient.getOperatorById(order.getOperatorId()).getData(); |
| | | result.setOperatorID(operator.getOperatorId()); |
| | | tcecClient.notificationStartChargeResult(result); |
| | | |
| | | tcecClient.notificationEquipChargeStatus(order.getStartChargeSeq(), order.getOperatorId()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | chargingOrder.setStatus(4); |
| | | chargingOrder.setEndMode(1); |
| | | this.updateById(chargingOrder); |
| | | |
| | | String code1 = order.getCode(); |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(order.getChargingGunId()).getData(); |
| | | //异步线程处理停机 |
| | |
| | | log.info(code1 + ":-------------------远程停止充电请求-------------------"); |
| | | log.info(platformStopCharging.toString()); |
| | | }); |
| | | //推送三方平台 |
| | | if(2 == order.getOrderSource()){ |
| | | tcecClient.notificationEquipChargeStatus(order.getStartChargeSeq(), order.getOperatorId()); |
| | | } |
| | | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | |
| | | this.updateById(order); |
| | | chargingOrder = this.getById(order.getId()); |
| | | |
| | | //推送三方平台 |
| | | if(2 == chargingOrder.getOrderSource()){ |
| | | tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | tcecClient.notificationStopChargeResult(chargingOrder.getStartChargeSeq(), chargingOrder.getChargingGunId().toString(), |
| | | chargingOrder.getOperatorId()); |
| | | tcecClient.notificationChargeOrderInfo(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | } |
| | | |
| | | //开始将优惠券优惠的金额添加到明细中 |
| | | BigDecimal couponDiscountAmount = order.getCouponDiscountAmount(); |
| | | if(null != couponDiscountAmount && couponDiscountAmount.compareTo(BigDecimal.ZERO) > 0){ |
| | |
| | | chargingGun.setStatus(2); |
| | | chargingGun.setChargingPower(BigDecimal.ZERO); |
| | | chargingGunClient.updateChargingGunById(chargingGun); |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(chargingGun.getId(), chargingGun.getStatus()); |
| | | |
| | | //添加积分 |
| | | TIntegralRule integralRule = integralRuleClient.getSet().getData(); |
| | |
| | | scheduler.shutdown(); |
| | | } |
| | | }, 5, 1, TimeUnit.SECONDS); |
| | | |
| | | //推送三方平台订单状态 |
| | | tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | chargingOrder.setEndMode(1); |
| | | this.updateById(chargingOrder); |
| | | |
| | | tcecClient.notificationEquipChargeStatus(order.getStartChargeSeq(), order.getOperatorId()); |
| | | |
| | | String code1 = order.getCode(); |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(order.getChargingGunId()).getData(); |
| | | //异步线程处理停机 |