|
|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.jzg.commons.constants.quote.enums.quote.EnergyTypeCode;
|
|
|
import com.jzg.commons.constants.quote.enums.quote.LicenseKindCode;
|
|
|
import com.jzg.commons.entity.quote.vo.*;
|
|
|
+import com.jzg.commons.util.IDCardUtils;
|
|
|
import com.jzg.commons.util.StringUtils;
|
|
|
import com.jzg.quotation.zijin.api.constant.enums.MotorVehicleInsuranceEnum;
|
|
|
import com.jzg.quotation.zijin.api.constant.enums.RiskCodeEnum;
|
|
|
@@ -53,23 +54,19 @@ public class ZiJinCrawlerQuoteRequestBuild {
|
|
|
* @return 报价请求对象
|
|
|
*/
|
|
|
public ZiJinCrawlerQuotationRequest buildZiJinCrawlerQuotationRequest(QuoteVo quoteVo, ZiJinCrawlerConfigureParameters parameters, AttributionInformationVo attributionInformationVo, ZiJinCrawlerGetOrderNoResponse ziJinCrawlerGetOrderNoResponse, HttpHeaders headers, ZiJinCrawlerGetCarActualValueResponse ziJinCrawlerGetCarActualValueResponse, ZiJinCrawlerGetOrderNoRequest ziJinCrawlerGetOrderNoRequest, ZiJinCrawlerCarResponse ziJinCrawlerCarResponse) {
|
|
|
- // 报价接口
|
|
|
ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest = new ZiJinCrawlerQuotationRequest();
|
|
|
// 设置基础信息
|
|
|
ziJinCrawlerQuotationRequest.setBaseInfo(buildBaseInfo(quoteVo, parameters, attributionInformationVo.getUsername()));
|
|
|
-
|
|
|
// 设置车主信息
|
|
|
ZiJinCrawlerQuotationRequest.CarOwnerInfo carOwnerInfo = buildCarOwnerInfo(quoteVo);
|
|
|
ziJinCrawlerQuotationRequest.setCarOwnerInfo(carOwnerInfo);
|
|
|
|
|
|
- // 设置保险标志(固定"0")
|
|
|
- ziJinCrawlerQuotationRequest.setInsuranceSign("0");
|
|
|
-
|
|
|
// 设置被保险人列表
|
|
|
ziJinCrawlerQuotationRequest.setInsuredList(buildInsuredList(quoteVo, carOwnerInfo));
|
|
|
-
|
|
|
// 设置订单ID - 从getOrderNo接口返回的动态获取
|
|
|
ziJinCrawlerQuotationRequest.setOrderId(ziJinCrawlerGetOrderNoResponse.getOrderId());
|
|
|
+ // 设置保险标志(固定"0")
|
|
|
+ ziJinCrawlerQuotationRequest.setInsuranceSign("0");
|
|
|
// 设置订单来源(固定"KSCD_PROD")
|
|
|
ziJinCrawlerQuotationRequest.setOrderOrigin("KSCD_PROD");
|
|
|
// 设置需求单校验标志(固定"1")
|
|
|
@@ -241,27 +238,31 @@ public class ZiJinCrawlerQuoteRequestBuild {
|
|
|
baseInfo.setHandler1Code(parameters.getUserCode());
|
|
|
baseInfo.setHandler1Name(parameters.getUserName());
|
|
|
baseInfo.setOperatorCode(operatorCode);
|
|
|
- baseInfo.setStartDate(quoteVo.getCiRiskInfoVo().getStartDate().substring(0, 10));
|
|
|
+ // 交强险日期
|
|
|
baseInfo.setStartDateCI(quoteVo.getCiRiskInfoVo().getStartDate().substring(0, 10));
|
|
|
- baseInfo.setStartHour("00");
|
|
|
baseInfo.setStartHourCI("00");
|
|
|
- baseInfo.setStartMinute("00");
|
|
|
baseInfo.setStartMinuteCI("00");
|
|
|
- baseInfo.setEndDate(quoteVo.getCiRiskInfoVo().getEndDate().substring(0, 10));
|
|
|
baseInfo.setEndDateCI(quoteVo.getCiRiskInfoVo().getEndDate().substring(0, 10));
|
|
|
- baseInfo.setEndHour("24");
|
|
|
baseInfo.setEndHourCI("24");
|
|
|
- baseInfo.setEndMinute("00");
|
|
|
baseInfo.setEndMinuteCI("00");
|
|
|
+ // 商业险日期
|
|
|
+ if (quoteVo.getBiRiskInfoVo() != null) {
|
|
|
+ baseInfo.setStartDate(quoteVo.getBiRiskInfoVo().getStartDate().substring(0, 10));
|
|
|
+ baseInfo.setStartHour("00");
|
|
|
+ baseInfo.setStartMinute("00");
|
|
|
+ baseInfo.setEndDate(quoteVo.getBiRiskInfoVo().getEndDate().substring(0, 10));
|
|
|
+ baseInfo.setEndHour("24");
|
|
|
+ baseInfo.setEndMinute("00");
|
|
|
+ }
|
|
|
// 经测试:燃油单强设为0,交三不设置(待确认),会返回转保标志,紫金系统可以忽略进行下一步报价
|
|
|
baseInfo.setXbFlag(quoteVo.getBiRiskInfoVo() == null ? "0" : null);
|
|
|
baseInfo.setXbFlagCI(quoteVo.getBiRiskInfoVo() == null ? "0" : null);
|
|
|
baseInfo.setGoalInsuredFlag("0");
|
|
|
- baseInfo.setConfigName("");
|
|
|
- baseInfo.setId("1dec8ac2ced74973842a5b098669813a");
|
|
|
baseInfo.setBusinessName(parameters.getBusinessNatureName());
|
|
|
+ baseInfo.setId("1dec8ac2ced74973842a5b098669813a");
|
|
|
baseInfo.setIdMongo("1dec8ac2ced74973842a5b098669813a");
|
|
|
- baseInfo.setDesc("");
|
|
|
+ baseInfo.setConfigName(parameters.getUserName());
|
|
|
+ baseInfo.setDesc(parameters.getUserName());
|
|
|
baseInfo.setHanderCode(parameters.getUserCode());
|
|
|
baseInfo.setHanderName(parameters.getUserName());
|
|
|
baseInfo.setDemandNo("01ZKIC140026051910017933666448");
|
|
|
@@ -389,9 +390,8 @@ public class ZiJinCrawlerQuoteRequestBuild {
|
|
|
insuredItem.setIdentifyType("01");// 01-身份证
|
|
|
}
|
|
|
|
|
|
- // 性别映射
|
|
|
- String gender = customerInfo.getGender();
|
|
|
- insuredItem.setSex("男".equals(gender) ? "1" : "2");
|
|
|
+ // 性别
|
|
|
+ insuredItem.setSex(IDCardUtils.getSex(customerInfo.getIdentifyNumber()));
|
|
|
|
|
|
// 根据车主性质设置投保人/被保人类型
|
|
|
// 个人车主("1"): 投保人/被保人都是自然人
|
|
|
@@ -653,7 +653,7 @@ public class ZiJinCrawlerQuoteRequestBuild {
|
|
|
vehicleInfo.setPlatVehicleCode(iacVehicleCode);
|
|
|
|
|
|
// 车型唯一ID
|
|
|
- vehicleInfo.setVehicleStyleUniqueId("");
|
|
|
+ vehicleInfo.setVehicleStyleUniqueId(null);
|
|
|
|
|
|
// 价格和商业信息
|
|
|
vehicleInfo.setPurchasePrice(carInfoVo.getPurchasePrice());
|