| | |
| | | String key = "AQJC_" + chargingOrder.getChargingGunId(); |
| | | List<PlatformStartChargingReply> data = platformStartChargingReplyService.getPlatformStartChargingReply(code); |
| | | log.info(code + ":-------------------开始检查调起充电结果-------------------" + data.toString()); |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(chargingOrder.getSiteId())).getData().get(0); |
| | | if (data.size() != 0) { |
| | | PlatformStartChargingReply platformStartChargingReply = data.get(1); |
| | | Integer startup_result = platformStartChargingReply.getStartup_result(); |
| | |
| | | |
| | | redisService.setCacheObject(key, preChargeCheck1, 24L, TimeUnit.HOURS); |
| | | //推送三方平台订单状态 |
| | | if (2 == chargingOrder.getOrderSource()) { |
| | | if (2 == chargingOrder.getOrderSource() && 1 == site.getIsOpenSynchronization()) { |
| | | tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | } |
| | | return true; |
| | |
| | | this.updateById(order); |
| | | redisService.setCacheObject(key, preChargeCheck1, 24L, TimeUnit.HOURS); |
| | | //推送三方平台订单状态 |
| | | if (2 == chargingOrder.getOrderSource()) { |
| | | if (2 == chargingOrder.getOrderSource() && 1 == site.getIsOpenSynchronization()) { |
| | | tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | } |
| | | return true; |
| | |
| | | if (order.getStatus() != 2) { |
| | | return; |
| | | } |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(order.getSiteId())).getData().get(0); |
| | | String code = order.getCode(); |
| | | PreChargeCheck preChargeCheck1 = redisService.getCacheObject("AQJC_" + order.getChargingGunId()); |
| | | if (null != preChargeCheck1) { |
| | |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(order.getChargingGunId()).getData(); |
| | | chargingGun.setStatus(4); |
| | | chargingGunClient.updateChargingGunById(chargingGun); |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(chargingGun.getFullNumber(), 4); |
| | | if(1 == site.getIsOpenSynchronization()){ |
| | | //推送状态给三方平台 |
| | | tcecClient.pushChargingGunStatus(chargingGun.getFullNumber(), 4); |
| | | } |
| | | } |
| | | redisService.setCacheObject("AQJC_" + order.getChargingGunId(), preChargeCheck1, 24L, TimeUnit.HOURS); |
| | | this.updateById(order); |
| | |
| | | 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); |
| | | if(1 == site.getIsOpenSynchronization()){ |
| | | tcecClient.notificationStartChargeResult(result); |
| | | tcecClient.notificationEquipChargeStatus(order.getStartChargeSeq(), order.getOperatorId()); |
| | | } |
| | | |
| | | tcecClient.notificationEquipChargeStatus(order.getStartChargeSeq(), order.getOperatorId()); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | log.info(code1 + ":-------------------远程停止充电请求-------------------"); |
| | | log.info(platformStopCharging.toString()); |
| | | }); |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(order.getSiteId())).getData().get(0); |
| | | //推送三方平台 |
| | | if (2 == order.getOrderSource()) { |
| | | if (2 == order.getOrderSource() && 1 == site.getIsOpenSynchronization()) { |
| | | tcecClient.notificationEquipChargeStatus(order.getStartChargeSeq(), order.getOperatorId()); |
| | | } |
| | | |
| | |
| | | redisService.setCacheObject("chargingOrderStatus:" + vo.getTransaction_serial_number(), 5, 100L, TimeUnit.SECONDS); |
| | | |
| | | chargingOrder = this.getById(chargingOrder.getId()); |
| | | |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(chargingOrder.getSiteId())).getData().get(0); |
| | | //推送三方平台 |
| | | if (2 == chargingOrder.getOrderSource()) { |
| | | if (2 == chargingOrder.getOrderSource() && 1 == site.getIsOpenSynchronization()) { |
| | | TChargingOrder finalChargingOrder = chargingOrder; |
| | | new Thread(new Runnable() { |
| | | @Override |
| | |
| | | chargingGunClient.updateChargingGunById(chargingGun); |
| | | chargingGun = chargingGunClient.getChargingGunById(chargingOrder.getChargingGunId()).getData(); |
| | | //推送状态给三方平台 |
| | | if (2 == chargingOrder.getOrderSource()) { |
| | | if (2 == chargingOrder.getOrderSource() && 1 == site.getIsOpenSynchronization()) { |
| | | tcecClient.pushChargingGunStatus(chargingGun.getFullNumber(), 2); |
| | | } |
| | | |
| | |
| | | // scheduler.shutdown(); |
| | | // } |
| | | // }, 5, 1, TimeUnit.SECONDS); |
| | | |
| | | //推送三方平台订单状态 |
| | | tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(chargingOrder.getSiteId())).getData().get(0); |
| | | if(1 == site.getIsOpenSynchronization()){ |
| | | //推送三方平台订单状态 |
| | | tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | chargingOrder.setStatus(4); |
| | | chargingOrder.setEndMode(1); |
| | | this.updateById(chargingOrder); |
| | | tcecClient.notificationEquipChargeStatus(order.getStartChargeSeq(), order.getOperatorId()); |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(chargingOrder.getSiteId())).getData().get(0); |
| | | if(1 == site.getIsOpenSynchronization()){ |
| | | tcecClient.notificationEquipChargeStatus(order.getStartChargeSeq(), order.getOperatorId()); |
| | | } |
| | | |
| | | String code1 = order.getCode(); |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(order.getChargingGunId()).getData(); |