|
|
@@ -15,6 +15,7 @@ import com.ydtech.modules.order.components.ZijinRequestApiComponents;
|
|
|
import com.ydtech.modules.order.constants.InsuranceTypeCorrespondence;
|
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
|
+import com.ydtech.modules.order.entity.api.zj.constants.enums.BusType;
|
|
|
import com.ydtech.modules.order.entity.api.zj.constants.enums.OrderStatusEnum;
|
|
|
import com.ydtech.modules.order.entity.api.zj.constants.enums.ResultEnum;
|
|
|
import com.ydtech.modules.order.entity.api.zj.constants.enums.RiskCodeEnum;
|
|
|
@@ -224,36 +225,37 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
|
|
|
throw new SystemException("此订单还未承包");
|
|
|
}
|
|
|
InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
|
+
|
|
|
// 车主信息
|
|
|
JSONObject ownerInfo = insOrders.getOwnerinfo();
|
|
|
CustomerInfoVo customerInfoVo = ownerInfo.toJavaObject(CustomerInfoVo.class);
|
|
|
String busNo;
|
|
|
- String busType;
|
|
|
+ BusType busType;
|
|
|
String identifyNo = customerInfoVo.getIdentifyNumber();
|
|
|
|
|
|
switch (policyPrintVo.getRiskCode()) {
|
|
|
case InsuranceRisk.TRAFFIC_CODE:
|
|
|
busNo = insAreaCompany.getJqpolicyno();
|
|
|
- if ("1".equals(policyPrintVo.getType())) {
|
|
|
- busType = "2";
|
|
|
+ if (PolicyPrintVo.PolicyPrintType.PPT_1.getCode().equals(policyPrintVo.getType())) {
|
|
|
+ busType = BusType.BT_2;
|
|
|
} else {
|
|
|
- busType = "1";
|
|
|
+ busType = BusType.BT_1;
|
|
|
}
|
|
|
break;
|
|
|
case InsuranceRisk.BUSINESS_CODE:
|
|
|
busNo = insAreaCompany.getSypolicyno();
|
|
|
- busType = "3";
|
|
|
+ busType = BusType.BT_3;
|
|
|
break;
|
|
|
case InsuranceRisk.ACCIDENT_CODE:
|
|
|
busNo = policyPrintVo.getPolicyNumber();
|
|
|
- busType = "4";
|
|
|
+ busType = BusType.BT_4;
|
|
|
break;
|
|
|
default:
|
|
|
throw new SystemException("保险编号异常");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- String url = zijinRequestApiComponents.getDownLoadDocumentUrl(busNo, busType, identifyNo);
|
|
|
+ String code = busType.getCode();
|
|
|
+ String url = zijinRequestApiComponents.getDownLoadDocumentUrl(busNo, code, identifyNo);
|
|
|
return HttpResult.ok("生成成功", url);
|
|
|
}
|
|
|
|