xp-robotaxi-api/src/main/java/com/xiaopeng/api/dto/operation/PointAddDto.java
@@ -18,6 +18,9 @@ public class PointAddDto implements Serializable { @ApiModelProperty(value = "电子围栏区域id") private Long electronicAreaId; @ApiModelProperty(value = "电子围栏id") private String fenceId; @ApiModelProperty(value = "点位名称") @NotEmpty(message = "点位名称不能为空") private String pointName; xp-robotaxi-api/src/main/java/com/xiaopeng/api/dto/operation/PointUpdateDto.java
@@ -17,6 +17,10 @@ private Long id; @ApiModelProperty(value = "电子围栏区域id") private Long electronicAreaId; @ApiModelProperty(value = "围栏id") private String fenceId; @ApiModelProperty(value = "点位名称") @NotBlank(message = "点位名称不能为空") xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpPointManagementController.java
@@ -16,6 +16,7 @@ import com.xiaopeng.common.core.web.page.PageInfo; import com.xiaopeng.api.dto.map.XpPointExportExcelQuery; import com.xiaopeng.map.exportExcel.XpPointExportExcel; import com.xiaopeng.map.mangodb.service.XpGeoFencingPolygonService; import com.xiaopeng.map.service.XpElectronicFenceAreaService; import com.xiaopeng.map.service.XpElectronicFenceService; import com.xiaopeng.map.service.XpPointService; @@ -64,6 +65,8 @@ private XpElectronicFenceAreaService xpElectronicFenceAreaService; @Resource private XpElectronicFenceService xpElectronicFenceService; @Resource private XpGeoFencingPolygonService xpGeoFencingPolygonService; @ApiOperation(value = "获取所有运营中的区域", response = XpElectronicFenceArea.class) @@ -152,6 +155,9 @@ @ResponseBody @ApiOperation(value = "新增点位") public R<XpPoint> add(@Validated @RequestBody PointAddDto pointAddDto) { if (!xpGeoFencingPolygonService.isInFence(pointAddDto.getPointLon(), pointAddDto.getPointLat(), pointAddDto.getFenceId(), "prohibited_area")) { return R.fail("in_prohibited_area"); } return R.ok(xpPointService.addPointWithGeneratedNumber(pointAddDto)); } @@ -177,8 +183,17 @@ XpPoint xpPoint = xpPointService.getById(pointAddDto.getId()); if (!xpPoint.getElectronicAreaId().equals(pointAddDto.getElectronicAreaId())) { BeanUtils.copyProperties(pointAddDto, xpPoint); if (!xpGeoFencingPolygonService.isInFence(pointAddDto.getPointLon(), pointAddDto.getPointLat(), pointAddDto.getFenceId(), "prohibited_area")) { return R.fail("in_prohibited_area"); } xpPointService.updateById(xpPoint); } else { if (!xpGeoFencingPolygonService.isInFence(pointAddDto.getPointLon(), pointAddDto.getPointLat(), pointAddDto.getFenceId(), "prohibited_area")) { return R.fail("in_prohibited_area"); } //先删除原有的数据,因为会存在点位的从属区域变化的情况,所以先删除原有的数据后添加新的数据重新分片到新的库中 BeanUtils.copyProperties(pointAddDto, xpPoint); xpPointService.removeById(pointAddDto.getId()); xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpPricingController.java
@@ -60,7 +60,7 @@ @PostMapping("/base/v1/mini-program/navigation/route-and-fare") @ApiOperation(value = "导航-获取路线和费用", tags = {"小程序-获取路线和费用"}, response = RouteAndFareVo.class) @ApiOperation(value = "导航-获取路线和费用(弃用)", tags = {"小程序-获取路线和费用(弃用)"}, response = RouteAndFareVo.class) @XpClientCheck(checkToken = false, checkOtpToken = true) public R<RouteAndFareVo> getRouteAndFare(@RequestBody @Valid RouteAndFareDto routeAndFareDto, HttpServletRequest request) { // uid已通过拦截器otp校验,可以直接使用 @@ -83,7 +83,7 @@ @GetMapping("/base/v1/mini-program/pricing/rules/{openCityId}") @ApiOperation(value = "获取费用规则", tags = {"小程序-根据开通城市获取费用规则"}, response = String.class) @ApiOperation(value = "获取费用规则(弃用)", tags = {"小程序-根据开通城市获取费用规则(弃用)"}, response = String.class) public R<?> getPricingRules(@PathVariable Long openCityId) { XpPricing xpPricing = xpPricingService.getOne(new LambdaQueryWrapper<XpPricing>().eq(XpPricing::getCityId, openCityId).eq(XpPricing::getPricingType, 1).last("limit 1")); if (xpPricing != null) { @@ -99,7 +99,7 @@ * @return */ @PostMapping("/base/v1/mini-program/pricing/getWaitTime") @ApiOperation(value = "获取等待时间", tags = {"小程序-获取等待时间"}, response = Integer.class) @ApiOperation(value = "获取等待时间(弃用)", tags = {"小程序-获取等待时间(弃用)"}, response = Integer.class) public R<Integer> getWaitTime(@RequestBody LonLatDto dto) { return R.ok(xpPricingService.getWaitTime(dto.getLongitude(), dto.getLatitude())); } @@ -151,7 +151,7 @@ * 播单 */ @PostMapping("/base/v1/mini-program/order/save") @ApiOperation(value = "保存订单", tags = {"小程序-保存订单"}) @ApiOperation(value = "保存订单(弃用)", tags = {"小程序-保存订单(弃用)"}) @XpClientCheck(checkToken = false, checkOtpToken = true) public R<SaveOrderVo> saveOrder(@RequestBody @Validated XpOrderDto dto, HttpServletRequest request) { String uid = request.getHeader("XP-Uid"); xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java
@@ -642,7 +642,7 @@ orderCancel.setCancelReason("运营人员取消订单"); xpOrderCancelService.save(orderCancel); //查询车辆信息 R<XpVehicle> xpVehicleR = xpVehicleClient.queryById(order.getId()); R<XpVehicle> xpVehicleR = xpVehicleClient.queryById(order.getVehicleId()); if (xpVehicleR.getCode() == HttpStatus.SUCCESS && Objects.nonNull(xpVehicleR.getData())) { XpVehicle xpVehicle = xpVehicleR.getData(); // 组装调用车机参数