高德订单详情接口
This commit is contained in:
parent
5827c98851
commit
f731c0ff17
|
@ -8,4 +8,9 @@ public class AmapConstant {
|
|||
|
||||
//token地址
|
||||
public static final String TOKEN_URL = "/ws/car/open/enterprise/auth/get_token";
|
||||
|
||||
//订单详情地址
|
||||
public static final String ORDER_DETAIL_URL = "/ws/car/open/enterprise/order/detail";
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,132 @@
|
|||
package com.chint.interfaces.rest.amap.dto.detail;
|
||||
|
||||
import com.chint.interfaces.rest.amap.BaseResponse;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OrderDetailResponse extends BaseResponse {
|
||||
|
||||
private Data data;
|
||||
|
||||
@lombok.Data
|
||||
public static class Data {
|
||||
private String amapOrderId;//高德订单号
|
||||
private String userId;//企业用户ID
|
||||
private String mobile;//企业用户手机号
|
||||
private String departmentId;//企业用户部门ID
|
||||
private String departmentName;//企业用户部门名称
|
||||
private String requestTime;//约车时间(约单)(如:2018-12-12 20:00:00)
|
||||
private String departTime;//用车(出行)时间(如:2018-12-12 20:00:00)
|
||||
private String updateTime;//订单更新时间(如:2018-12-12 20:00:00)
|
||||
private String getOnTime;//实际的上车时间(司机开始行程时间)
|
||||
private String getOffTime;//实际的下车时间(司机结束行程时间)
|
||||
private String startName;//出发地
|
||||
private String startCity;//出发城市
|
||||
private String startAdcode;//出发城市编码(地级市)
|
||||
private String endName;//到达地
|
||||
private String endCity;//到达地城市
|
||||
private String endAdcode;//到达地城市编码(地级市)
|
||||
private String driverName;//司机姓名
|
||||
private String driverPhone;//司机电话
|
||||
private String licensePlate;//车牌号
|
||||
private String carType;//车辆型号
|
||||
private String carColor;//车辆颜色
|
||||
private Integer rideType;//运力类型1:经济;2:品质专车;3:六座商务;4:豪华;5:出租车;6:优享;11:优惠推荐;13:企业同行;14:企业拼车;15:代驾
|
||||
private String rideTypeName;//运力显示文案
|
||||
private Boolean isFixedPrice;//是否为特价车车型
|
||||
private String cpName;//CP名称(例如滴滴、首汽约车等)
|
||||
private String estimatePrice;//预估价(分)
|
||||
private String estimateMileage;//预估里程(米)
|
||||
private String estimateTime;//预估时间(秒)
|
||||
private String duration;//总时长(分)
|
||||
private String mileage;//总里程(米)
|
||||
private String totalFee;//总费用(分)
|
||||
private String originalFeeDetail;//费用明细(取消费、起步费、里程费、时长费、停车费、过桥费、附加费、加价红包、信息费、其他费用等等)
|
||||
private String feeDetail;//费用明细(时长费,里程费,附加费,附加费用明细,其他费用,其他费用明细)
|
||||
private int showStatus;//0-派单中,1-完成待支付,2-取消待支付,3-关闭,4-订单完成,5-待出发,6-待上车,7-行程中(订单当前状态)
|
||||
private String enterpriseCpStatus;//详见:订单子状态映射表
|
||||
private int orderServiceType;//业务类型: 1-实时单,2-预约单,3-接机 4-送机,6-市内拼车,8-代驾
|
||||
private int orderEnterance;//发单入口:0:实时 1:预约 2:接机 3:送机 4:接站 5:送站 8:代驾 10:代叫实时 11:代叫预约 12:代叫接机 13:代叫送机 14:代叫接站 15:代叫送站
|
||||
private String flightNo;//航班号
|
||||
private Date flightDate;//接送机-航班出发日期,接机必填
|
||||
private Date actualDepartTime;//接机场景,行程的真实出发时间,航班延误、提前到达情况下更新
|
||||
private String depAirCode;//出发机场三字码
|
||||
private String arrAirCode;//到达机场三字码
|
||||
private Integer pickUpDelayTime;//航班到达后,延迟N毫秒后用车
|
||||
private String remark;//1.企业获取token时传递的备注信息(remark数据)2.使用制度用车时,内容是员工填写的用车备注;3.如果为多备注制度,默认返回为JSON结构; 如果不需要JSON结构,可以在ES后台“企业功能配置”设置为精简模式
|
||||
private List<RiskTag> riskTags;//风险标记数据
|
||||
private List<RefundItem> refundItems;//所有退款数据
|
||||
private Integer totalEnterpriseRefundAmount;//企业退款总金额(分)
|
||||
private Integer totalPersonRefundAmount;//个人退款总金额(分)
|
||||
private Integer enterpriseAmount;//企业支付金额(分)
|
||||
private Integer personAmount;//个人支付金额(分)
|
||||
private Short subGdServiceId;//服务子类型,默认null,null或0为普通单,1代叫单
|
||||
private String privacyNumber;//叫车人隐私号(叫车人与司机绑定的隐私号)
|
||||
private String passengerPrivacyNumber;//代叫单乘车人隐私号(乘车人与司机绑定的隐私号)
|
||||
private String passengerPhone;//代叫单 乘车人手机号
|
||||
private String passengerName;//代叫单 乘车人姓名
|
||||
private String privateTag;//1 因私订单 0非因私订单
|
||||
private String applyRecord;//申请单详情
|
||||
private String extInfo;//员工扩展属性 JSON【长度:1000字符】,该信息为创建员工时提交的extInfo值
|
||||
private String tokenExtInfo;//该信息为提交token时,userInfo里的extInfo值
|
||||
private String showPayChannel;//支付方式:个人支付(3)、企业支付(1)、混合支付(2)
|
||||
private String sceneType;//用车场景(只有使用了ES制度的才有) (0-个人用车; 1-加班; 2-定点通勤; 3-外勤用车; 4-出差; 5-接送机)
|
||||
private String startBillLocationName;//实际上车地点
|
||||
private String startBillTime;//实际上车时间
|
||||
private String endBillLocationName;//实际下车地点
|
||||
private String endBillTime;//实际下车时间
|
||||
private String driverAcceptTime;//司机接单时间
|
||||
private String payTime;//订单支付时间
|
||||
private String initOrderServiceType;//传入的orderServiceType
|
||||
private String regulationContent;//下单时刻的制度内容 JSON字符串(Regulation类型)
|
||||
private String regulationId;//打车时使用的制度id
|
||||
private String regulationName;//打车时使用的制度名称
|
||||
private Integer isUpgradeSuccess;//是否升舱成功 0-否 1-是(下单选择升舱车型,且实际接单车型为升舱车型,该字段才为1)
|
||||
private String realStartLat;//实际上车点纬度
|
||||
private String realStartLng;//实际上车点经度
|
||||
private String realEndLat;//实际下车点纬度
|
||||
private String realEndLng;//实际下车点经度
|
||||
private String orderRelyType;//下单凭证类型:car_permission:使用申请单下单 car_permission_process:使用端内差旅审批单下单 car_meeting:使用会议用车下单
|
||||
private String orderRelyId;//下单凭证ID orderRelyType=car_permission时,为申请单ID, orderRelyType=car_permission_process时,为端内差旅审批单ID, orderRelyType=car_meeting时,为外部会议ID
|
||||
private Integer personalPayStatus;//审批驳回后的个付状态(1-待支付,2-支付成功,3-超期未支付)
|
||||
private String reasonForPersonPay;//需要个人支付的原因
|
||||
private String financeCostcenterCode;//成本中心编码
|
||||
}
|
||||
|
||||
@lombok.Data
|
||||
public static class RiskTag {
|
||||
private int riskCode;//风险场景码
|
||||
private String riskDesp;//风险场景描述
|
||||
}
|
||||
|
||||
@lombok.Data
|
||||
public static class RefundItem {
|
||||
private Integer enterpriseRefundAmount;//企业退款金额(分)
|
||||
private Integer personRefundAmount;//个人退款金额(分)
|
||||
private String refundTime;//"2020-02-02 23:33:33" 形式的时间戳 退款时间
|
||||
}
|
||||
|
||||
//申请单详情
|
||||
@lombok.Data
|
||||
public static class applyRecord {
|
||||
private String outApplyRecordId;//外部公司申请 ID
|
||||
private String enterpriseCustomFields;//企业自定义申请单扩展字段
|
||||
}
|
||||
|
||||
//下单时刻的制度内容
|
||||
@lombok.Data
|
||||
public static class Regulation {
|
||||
private String regulationName;//制度名称
|
||||
}
|
||||
|
||||
|
||||
@lombok.Data
|
||||
public static class feeDetail {
|
||||
private String title;//名称
|
||||
private String value;//费用
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.chint.interfaces.rest.amap.token;
|
||||
package com.chint.interfaces.rest.amap.dto.token;
|
||||
|
||||
import com.chint.interfaces.rest.amap.BaseRequestParam;
|
||||
import lombok.Data;
|
|
@ -1,4 +1,4 @@
|
|||
package com.chint.interfaces.rest.amap.token;
|
||||
package com.chint.interfaces.rest.amap.dto.token;
|
||||
|
||||
|
||||
import com.chint.interfaces.rest.amap.BaseResponse;
|
|
@ -0,0 +1,31 @@
|
|||
package com.chint.interfaces.rest.amap.request;
|
||||
|
||||
import com.chint.interfaces.rest.amap.dto.detail.OrderDetailResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.chint.infrastructure.constant.AmapConstant.ORDER_DETAIL_URL;
|
||||
|
||||
@Component
|
||||
public class OrderDetailRequest {
|
||||
|
||||
@Value("${amap.baseUrl}")
|
||||
private String baseUrl;
|
||||
|
||||
@Autowired
|
||||
private AmapRequest amapRequest;
|
||||
|
||||
/**
|
||||
* @param amapOrderId 高德订单号
|
||||
* @return
|
||||
*/
|
||||
public OrderDetailResponse queryOrderDetail(String amapOrderId) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("amapOrderId", amapOrderId);
|
||||
return amapRequest.get(baseUrl + ORDER_DETAIL_URL, map, OrderDetailResponse.class);
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
package com.chint.interfaces.rest.amap.request;
|
||||
|
||||
|
||||
import com.chint.interfaces.rest.amap.token.TokenDto;
|
||||
import com.chint.interfaces.rest.amap.token.TokenResponse;
|
||||
import com.chint.interfaces.rest.amap.dto.token.TokenDto;
|
||||
import com.chint.interfaces.rest.amap.dto.token.TokenResponse;
|
||||
import com.google.gson.Gson;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
|
@ -3,8 +3,10 @@ package com.chint;
|
|||
import com.chint.domain.aggregates.user.User;
|
||||
import com.chint.interfaces.rest.amap.AmapUserRequest;
|
||||
import com.chint.interfaces.rest.amap.BaseResponse;
|
||||
import com.chint.interfaces.rest.amap.token.TokenDto;
|
||||
import com.chint.interfaces.rest.amap.token.TokenResponse;
|
||||
import com.chint.interfaces.rest.amap.dto.detail.OrderDetailResponse;
|
||||
import com.chint.interfaces.rest.amap.dto.token.TokenDto;
|
||||
import com.chint.interfaces.rest.amap.dto.token.TokenResponse;
|
||||
import com.chint.interfaces.rest.amap.request.OrderDetailRequest;
|
||||
import com.chint.interfaces.rest.amap.request.TokenRequest;
|
||||
import com.google.gson.Gson;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -31,6 +33,8 @@ public class AmapTest {
|
|||
@Autowired
|
||||
private TokenRequest tokenRequest;
|
||||
|
||||
@Autowired
|
||||
private OrderDetailRequest orderDetailRequest;
|
||||
// @Test
|
||||
public void gaoDe() {
|
||||
TokenDto.UserInfo userInfo = new TokenDto.UserInfo();
|
||||
|
@ -41,4 +45,10 @@ public class AmapTest {
|
|||
String token = response.getData().getToken();
|
||||
System.out.println("token = " + token);
|
||||
}
|
||||
// @Test
|
||||
public void queryorderDetail() {
|
||||
OrderDetailResponse orderDetailResponse = orderDetailRequest.queryOrderDetail("123456");
|
||||
System.out.println("orderDetailResponse = " + orderDetailResponse);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue