xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/service/KafkaConsumerService.java
@@ -91,7 +91,6 @@ private UserVehicleClient userVehicleClient; /** * 消费消息 - XPU上报Robotaxi云端的消息topic(高优先级) * @@ -115,7 +114,7 @@ * @param msgContent * @param message */ public void handleXPUMessage(MsgContent msgContent, String message){ public void handleXPUMessage(MsgContent msgContent, String message) { RtMsgHeader header = msgContent.getHeader(); MessageType type = header.getType(); //处理请求消息 @@ -186,15 +185,15 @@ } //消息应答 if(MessageType.MESSAGE_TYPE_RESPONSE == type){ if (MessageType.MESSAGE_TYPE_RESPONSE == type) { com.xiaopeng.api.vo.automaticPilot.proto.up.ResponseMessage resposne = msgContent.getContent_detail().getObject("resposne", com.xiaopeng.api.vo.automaticPilot.proto.up.ResponseMessage.class); com.xiaopeng.api.vo.automaticPilot.proto.up.StatusCode code = resposne.getCode(); Long requestSeq = resposne.getRequest_seq(); if(code == com.xiaopeng.api.vo.automaticPilot.proto.up.StatusCode.OK){ if (code == com.xiaopeng.api.vo.automaticPilot.proto.up.StatusCode.OK) { Object sequence = redisTemplate.opsForValue().get(requestSeq); if(sequence!=null){ if (sequence != null) { String[] split = sequence.toString().split("_"); if(split[0].equals("pushOrder")){ if (split[0].equals("pushOrder")) { PopOrderDto dto = new PopOrderDto(); dto.setOrderId(Long.valueOf(split[1])); dto.setXpVehicleVin(split[2]); @@ -204,9 +203,6 @@ } } } /** @@ -314,22 +310,31 @@ userVehicleClient.cancelTaxiPassenger(cancelTaxiPassengerVo); } // 取消订单 R<?> r = xpOrderClient.cancelOrder(String.valueOf(xpOrder.getId())); if (r.getCode() == R.SUCCESS){ log.info("取消订单成功"); // TODO 重新派单 ReassignOrderDTO reassignOrderDTO = new ReassignOrderDTO(); reassignOrderDTO.setUid(xpOrder.getAppUserId().toString()); reassignOrderDTO.setOrderNo(xpOrder.getOrderNumber()); reassignOrderDTO.setCount(10); RealtimePose pose = systemRuntimeStatus.getPose(); Wgs naviPose = pose.getNavi_pose(); Double latitude = naviPose.getLatitude(); Double longitude = naviPose.getLongitude(); reassignOrderDTO.setLongitude(longitude); reassignOrderDTO.setLatitude(latitude); reassignOrderClient.reassignOrder(reassignOrderDTO); } // R<?> r = xpOrderClient.cancelOrder(String.valueOf(xpOrder.getId())); // if (r.getCode() == R.SUCCESS){ log.info("取消订单成功"); // TODO 重新派单 ReassignOrderDTO reassignOrderDTO = new ReassignOrderDTO(); reassignOrderDTO.setUid(xpOrder.getAppUserId().toString()); reassignOrderDTO.setOrderNo(xpOrder.getOrderNumber()); reassignOrderDTO.setCount(10); RealtimePose pose = systemRuntimeStatus.getPose(); Wgs naviPose = pose.getNavi_pose(); Double latitude = naviPose.getLatitude(); Double longitude = naviPose.getLongitude(); reassignOrderDTO.setLongitude(longitude); reassignOrderDTO.setLatitude(latitude); reassignOrderClient.reassignOrder(reassignOrderDTO); // } } } @@ -556,9 +561,9 @@ snowFlake.withStartTimestamp(1420041600000L); long sequence = snowFlake.nextId(); // 处理数据 redisTemplate.opsForValue().set(sequence,"pushOrder_"+orderId+"_"+vin,30, TimeUnit.MINUTES); redisTemplate.opsForValue().set(sequence, "pushOrder_" + orderId + "_" + vin, 30, TimeUnit.MINUTES); //开发发送请求到XPU xpuUtil.cloudOrderOperation(orderOperation, vin,sequence); xpuUtil.cloudOrderOperation(orderOperation, vin, sequence); } @@ -662,12 +667,12 @@ * @param orderId * @param status */ public void buildPushOrderStatus(String orderId, OrderStatusEnum status, Long sequence){ if(orderId.contains("XU")){ public void buildPushOrderStatus(String orderId, OrderStatusEnum status, Long sequence) { if (orderId.contains("XU")) { //巡游单 //响应消息 responseMessage(sequence, ""); }else{ } else { //普通单 R<XpOrder> xpOrderR = xpOrderClient.queryOrderById(Long.parseLong(orderId)); XpOrder xpOrder = xpOrderR.getData(); xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/config/MyLocaleResolver.java
@@ -24,6 +24,9 @@ if (StringUtils.isEmpty(language)) { locale = Locale.getDefault(); } if(language==null){ language="1"; } //如果请求不为空 //If the request is not empty. if (language.equals("1")) { xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java
@@ -426,7 +426,7 @@ XpPoint xpPoint = xpPointService.getById(dto.getStartPointId()); // 终点 XpPoint endXpPoint = xpPointService.getById(dto.getStartPointId()); XpPoint endXpPoint = xpPointService.getById(dto.getEndPointId()); // 判断点位是否在运营区域内 LocalTime now = LocalTime.now(); xp-robotaxi-itinerary-boot/src/main/resources/i18n/messages.properties
@@ -1,2 +1,4 @@ # 中文 path.not.found=????? to.work= ??????????,?????? welcome.message=欢迎来到我们的应用程序! xp-robotaxi-itinerary-boot/src/main/resources/i18n/messages_en_US.properties
@@ -1,2 +1,4 @@ # English (US) path.not.found=Path does not exist to.work=\ The current pick-up and drop-off points are too close to each other. It is recommended to walk there welcome.message=Welcome to our application! xp-robotaxi-itinerary-boot/src/main/resources/i18n/messages_zh_CN.properties
@@ -1,2 +1,4 @@ # 中文 path.not.found=????? to.work=\ ??????????,?????? welcome.message=欢迎来到我们的应用程序! xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleOperationsController.java
@@ -37,9 +37,9 @@ private XpVehicleClient xpVehicleClient; /** * 车辆详情-车辆调度-发车 * 车辆详情-车辆调度-发车 收车 */ @ApiOperation(value = "车辆运维-车辆调度-发车", tags = {"运维APP-车辆管理"}) @ApiOperation(value = "车辆运维-车辆调度-发车/收车", tags = {"运维APP-车辆管理"}) @PostMapping("/api/v1/vehicle/vehicleDispatchDeparture") public R<String> vehicleDispatchDeparture(@RequestBody VehicleDispatchDepartureDTO dto) { // 查询车辆 xp-robotaxi-operation-boot/src/main/resources/i18n/messages.properties
@@ -18,3 +18,4 @@ pricing.json.invalid=价格配置JSON格式不正确 pricing.rule.empty=价格规则不能为空 no.current.point=????????? path.not.found=????? xp-robotaxi-operation-boot/src/main/resources/i18n/messages_en_US.properties
@@ -18,3 +18,4 @@ pricing.json.invalid=Invalid JSON format for pricing configuration pricing.rule.empty=Price rule cannot be empty no.current.point=The current location is not open for service path.not.found=Path does not exist xp-robotaxi-operation-boot/src/main/resources/i18n/messages_zh_CN.properties
@@ -18,3 +18,4 @@ pricing.json.invalid=价格配置JSON格式不正确 pricing.rule.empty=价格规则不能为空 no.current.point=????????? path.not.found=????? xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/model/vo/XpOrderDetailVO.java
@@ -1,6 +1,8 @@ package com.xiaopeng.order.model.vo; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import com.xiaopeng.api.dto.operation.LonLatDto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -69,10 +71,34 @@ private String endAddress; @ApiModelProperty(value = "出发站点名称") private String startStationName; private String startPointName; @ApiModelProperty(value = "终点站点名称") private String endStationName; private String endPointName; @ApiModelProperty(value = "出发地经度值") private Double startLon; @ApiModelProperty(value = "出发地纬度值") private Double startLat; @ApiModelProperty(value = "目的地经度") private Double endLon; @ApiModelProperty(value = "目的地纬度") private Double endLat; @ApiModelProperty(value = "区域id") private Long xpElectronicFenceAreaId; @ApiModelProperty(value = "下单站点id") @TableField("start_point_id") private Long startPointId; @ApiModelProperty(value = "下单终点站点Id") @TableField("end_point_id") private Long endPointId; @ApiModelProperty(value = "上车点") xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java
@@ -736,8 +736,9 @@ cancelTaxiPassengerVo.setAppId(""); BaseVehicleUserDto baseVehicleUserDto = userVehicleClient.cancelTaxiPassenger(cancelTaxiPassengerVo); if (baseVehicleUserDto.getCode() != 200) { throw new RuntimeException("取消订单失败"); if (baseVehicleUserDto==null) { // TODO 本地无法调通 // throw new RuntimeException("取消订单失败"); } baseMapper.updateById(order); @@ -1639,7 +1640,7 @@ XpOrderDetailVO xpOrderDetailVO = new XpOrderDetailVO(); XpOrder xpOrder = this.baseMapper.selectOne(new LambdaQueryWrapper<XpOrder>().eq(XpOrder::getAppUserId, uid).in(XpOrder::getStatus, Arrays.asList(1,2,3, 4, 5, 6, 7, 8)).orderByDesc(BaseModel::getCreateTime).last("LIMIT 1")); if (xpOrder == null) { return xpOrderDetailVO; return null; } BeanUtils.copyProperties(xpOrder, xpOrderDetailVO); // 算时间