| | |
| | | import com.ruoyi.chargingPile.api.vo.UpdateChargingPileStatusVo; |
| | | import com.ruoyi.common.redis.service.RedisService; |
| | | import com.ruoyi.integration.api.model.*; |
| | | import com.ruoyi.integration.drainage.TCECPushUtil; |
| | | import com.ruoyi.integration.iotda.constant.SendTagConstant; |
| | | import com.ruoyi.integration.iotda.enums.ServiceIdMenu; |
| | | import com.ruoyi.integration.iotda.utils.tools.CP56Time2aConverter; |
| | |
| | | private QrCodeDeliveryReplyService qrCodeDeliveryReplyService; |
| | | @Autowired |
| | | private SecurityDetectionService securityDetectionService; |
| | | |
| | | @Autowired |
| | | private TCECPushUtil tcecPushUtil; |
| | | |
| | | @Resource |
| | | private ChargingPileClient chargingPileClient; |
| | | |
| | | @Resource |
| | | private ChargingGunClient chargingGunClient; |
| | | |
| | | @Resource |
| | | private RedisTemplate redisTemplate; |
| | | |
| | |
| | | vo1.setPile_code(pingMessage.getCharging_pile_code()); |
| | | vo1.setStatus(pingMessage.getCharging_gun_status()); |
| | | chargingPileClient.updateChargingPileStatus(vo1); |
| | | try { |
| | | tcecPushUtil.pushSuperviseNotificationStationStatus(chargingGunClient.getChargingGunByFullNumber(pingMessage.getCharging_pile_code()+pingMessage.getCharging_gun_code()).getData()); |
| | | }catch (Exception e){ |
| | | System.out.println("设备状态推送监管平台失败:"+e.getMessage()); |
| | | } |
| | | break; |
| | | case SendTagConstant.END_CHARGE: |
| | | EndChargeMessage endChargeMessage = message.getEndChargeMessage(); |
| | |
| | | endChargeService.create(endCharge); |
| | | // 业务处理 |
| | | chargingOrderClient.endCharge(endCharge.getTransaction_serial_number()); |
| | | // 监管平台 |
| | | // 查询订单信息 |
| | | try { |
| | | TChargingOrder chargingOrder = chargingOrderClient.getOrderByCode(endCharge.getTransaction_serial_number()).getData(); |
| | | tcecPushUtil.pushSuperviseNotificationChargeOrderInfo(chargingOrder); |
| | | tcecPushUtil.pushSuperviseNotificationEquipChargeStatus(chargingOrder); |
| | | }catch (Exception e){ |
| | | System.out.println("充电结束推送监管平台失败:"+e.getMessage()); |
| | | } |
| | | break; |
| | | case SendTagConstant.ERROR_MESSAGE: |
| | | ErrorMessageMessage errorMessageMessage1 = message.getErrorMessageMessage(); |
| | |
| | | UploadRealTimeMonitoringDataQuery query = new UploadRealTimeMonitoringDataQuery(); |
| | | BeanUtils.copyProperties(uploadRealTimeMonitoringData, query); |
| | | chargingOrderClient.chargeMonitoring(query); |
| | | chargingOrder.setEndSoc(uploadRealTimeMonitoringDataMessage.getSoc()+""); |
| | | tcecPushUtil.pushSuperviseNotificationEquipChargeStatus(chargingOrder); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |