|
|
@@ -376,6 +376,27 @@ public class YongChengApiRequestImpl implements YongChengApiRequest {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private OrderStatusResultVo buildCallBackStatus(OrderStatusVo orderStatusVo, String status) {
|
|
|
+ OrderStatusResultVo orderStatusResultVo = new OrderStatusResultVo();
|
|
|
+ if (status.equals("9")) {
|
|
|
+ orderStatusVo.getInsOrders().setOrderStatus(InsOrderStatusEnum.PAY_PENDING.getCode());
|
|
|
+ // 刷新支付连接
|
|
|
+ PaymentLinkVo paymentLinkVo = new PaymentLinkVo();
|
|
|
+ paymentLinkVo.setOrder(orderStatusVo.getOrder());
|
|
|
+ PaymentLinkResultsVo paymentLink = getPaymentLink(paymentLinkVo);
|
|
|
+ String paymentLinkResult = paymentLink.getPaymentLink();
|
|
|
+ orderStatusResultVo.setOrderStatus(InsOrderStatusEnum.PAY_PENDING);
|
|
|
+ orderStatusResultVo.setPaymentLink(paymentLinkResult);
|
|
|
+ }
|
|
|
+ if (status.equals("3")) {
|
|
|
+ orderStatusResultVo.setOrderStatus(InsOrderStatusEnum.AUDIT_FAIL);
|
|
|
+ }
|
|
|
+ if (status.equals("1")) {
|
|
|
+ orderStatusResultVo.setOrderStatus(InsOrderStatusEnum.UNDERWRITED);
|
|
|
+ }
|
|
|
+ return orderStatusResultVo;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public OrderStatusResultVo queryOrderState(OrderStatusVo orderStatusVo) {
|
|
|
OrderStatusResultVo orderStatusResultVo = new OrderStatusResultVo();
|
|
|
@@ -388,24 +409,21 @@ public class YongChengApiRequestImpl implements YongChengApiRequest {
|
|
|
String cleanStr = ycRequestApiComponents.payCallback(callbackRequest,url);
|
|
|
CallBackResponse response = CallBackResponse.buildCallBackParam(cleanStr);
|
|
|
if (response.getResult().equals("0")) {
|
|
|
- // 刷新支付连接
|
|
|
- PaymentLinkVo paymentLinkVo = new PaymentLinkVo();
|
|
|
- paymentLinkVo.setOrder(orderStatusVo.getOrder());
|
|
|
- PaymentLinkResultsVo paymentLink = getPaymentLink(paymentLinkVo);
|
|
|
- String paymentLinkResult = paymentLink.getPaymentLink();
|
|
|
- orderStatusResultVo.setOrderStatus(InsOrderStatusEnum.PAY_PENDING);
|
|
|
- orderStatusResultVo.setPaymentLink(paymentLinkResult);
|
|
|
- if (StringUtils.isNotEmpty(response.getBizPolicyNo())) {
|
|
|
- orderStatusResultVo.setSyPolicyno(response.getBizPolicyNo());
|
|
|
- }
|
|
|
-
|
|
|
- if (StringUtils.isNotEmpty(response.getCiPolicyNo())) {
|
|
|
- orderStatusResultVo.setJqPolicyno(response.getCiPolicyNo());
|
|
|
- }
|
|
|
-
|
|
|
- if (StringUtils.isNotEmpty(response.getYwPolicyAppNo())) {
|
|
|
- orderStatusResultVo.setJyPolicyno(response.getYwPolicyNo());
|
|
|
- orderStatusResultVo.setJyApplyNo(response.getYwPolicyAppNo());
|
|
|
+ if(orderStatusVo.getInsOrders().getOrderStatus().equals(InsOrderStatusEnum.PAY_PENDING.getCode().toString())){
|
|
|
+ orderStatusResultVo = buildCallBackStatus(orderStatusVo, response.getJqstatus());
|
|
|
+ // 获取商业保单号
|
|
|
+ if (StringUtils.isNotEmpty(response.getBizPolicyNo())) {
|
|
|
+ orderStatusResultVo.setSyPolicyno(response.getBizPolicyNo());
|
|
|
+ }
|
|
|
+ // 获取交强保单号
|
|
|
+ if (StringUtils.isNotEmpty(response.getCiPolicyNo())) {
|
|
|
+ orderStatusResultVo.setJqPolicyno(response.getCiPolicyNo());
|
|
|
+ }
|
|
|
+ // 获取驾意保单号
|
|
|
+ if (StringUtils.isNotEmpty(response.getYwPolicyAppNo())) {
|
|
|
+ orderStatusResultVo.setJyPolicyno(response.getYwPolicyNo());
|
|
|
+ orderStatusResultVo.setJyApplyNo(response.getYwPolicyAppNo());
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
//失败原因
|