| | |
| | | attributes.put("vin", vin); |
| | | attributes.put("order_id",""); |
| | | attributes.put("timestamp",vehicleEventDTO.getEventTime()); |
| | | |
| | | // 1.0埋点新增 |
| | | attributes.put("odometer_km", vehiclePosition.getTotalOdometer()); |
| | | |
| | | if(departureStatus == 1){ |
| | | attributes.put("main_status","ONLINE"); |
| | | // TODO 预留位置 目前无状态 |
| | |
| | | //发车之前,检查所有之前没终止的数据,将其终止 |
| | | xpCruiseOrderClient.stopAllCruiseOrder(vin); |
| | | R<XpCruiseOrder> newCruiseOrder = xpCruisePlanClient.getNewCruiseOrder(new NewCruiseOrderDto(xpVehicle.getId(), vin, xpVehicle.getFleetId(),vehiclePosition.getPoint())); |
| | | if(newCruiseOrder.getData()!=null){ |
| | | //标记订单为返程类型巡游单 |
| | | if (newCruiseOrder.getData() != null && 200 == newCruiseOrder.getCode()) { |
| | | //方向为正向 |
| | | XpCruiseOrder cruiseOrder = newCruiseOrder.getData(); |
| | | cruiseOrder.setOrderType(2); |
| | |
| | | if (StringUtils.isNotBlank(vehiclePictures)) { |
| | | JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); |
| | | // 1 |
| | | String downloadUrl = jsonObject.getString("url");; |
| | | String downloadUrl = jsonObject.getString("url"); |
| | | try { |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |