|
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
|
+import com.ydtech.config.properties.GuorenApiConfigurationProperties;
|
|
|
import com.ydtech.config.properties.YongchengApiConfigurationProperties;
|
|
import com.ydtech.config.properties.YongchengApiConfigurationProperties;
|
|
|
import com.ydtech.constants.InsuranceEnum;
|
|
import com.ydtech.constants.InsuranceEnum;
|
|
|
import com.ydtech.constants.enums.InsuranceRisk;
|
|
import com.ydtech.constants.enums.InsuranceRisk;
|
|
@@ -54,6 +55,7 @@ import com.ydtech.modules.order.components.ConfigureParametersComponents;
|
|
|
import com.ydtech.modules.order.components.InsImagesUploadCacheComponents;
|
|
import com.ydtech.modules.order.components.InsImagesUploadCacheComponents;
|
|
|
import com.ydtech.modules.order.components.InsOrdersComponents;
|
|
import com.ydtech.modules.order.components.InsOrdersComponents;
|
|
|
import com.ydtech.modules.order.components.VerificationCodeIdentification;
|
|
import com.ydtech.modules.order.components.VerificationCodeIdentification;
|
|
|
|
|
+import com.ydtech.modules.order.components.gouren.GuorenDuplicateInsuranceComponent;
|
|
|
import com.ydtech.modules.order.components.yongcheng.YongchengRequestApiComponents;
|
|
import com.ydtech.modules.order.components.yongcheng.YongchengRequestApiComponents;
|
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
import com.ydtech.modules.order.entity.InsAreaCompanyAccidentalDriving;
|
|
import com.ydtech.modules.order.entity.InsAreaCompanyAccidentalDriving;
|
|
@@ -108,6 +110,15 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
|
|
|
|
|
private Integer REDIS_YONGCHENG_QUERY_CODE_EXPIRE = 7;
|
|
private Integer REDIS_YONGCHENG_QUERY_CODE_EXPIRE = 7;
|
|
|
|
|
|
|
|
|
|
+ public static final String JQ_REGEX = "交强险.+?保险止期是[::\\s]?([0-9\\-:]+)";
|
|
|
|
|
+
|
|
|
|
|
+ public static final String SY_REGEX = "商业险.+?保险止期是[::\\s]?([0-9\\-:]+)";
|
|
|
|
|
+
|
|
|
|
|
+ public static final String DAN_JQ_REGEX = "终保日期[::\\s]?([0-9\\-]+)";
|
|
|
|
|
+
|
|
|
|
|
+ public static final String END_TIME = "23:59:59";
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@Value("${upload.file.path}")
|
|
@Value("${upload.file.path}")
|
|
|
private String uploadFilePath;
|
|
private String uploadFilePath;
|
|
|
|
|
|
|
@@ -147,7 +158,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
|
|
|
|
|
private final InsImagesUploadCacheComponents insImagesUploadCacheComponents;
|
|
private final InsImagesUploadCacheComponents insImagesUploadCacheComponents;
|
|
|
|
|
|
|
|
- public void gainVehicleModel(YcConfigureParameters ycConfigureParameters, CarInfoVo carInfo, CoreModelsVo coreModelsVo) {
|
|
|
|
|
|
|
+ public void gainVehicleModel(YcConfigureParameters ycConfigureParameters, CarInfoVo carInfo,
|
|
|
|
|
+ CoreModelsVo coreModelsVo) {
|
|
|
CarModel_Req carModelReq = new CarModel_Req();
|
|
CarModel_Req carModelReq = new CarModel_Req();
|
|
|
carModelReq.setFrameNo(carInfo.getFrameNo());
|
|
carModelReq.setFrameNo(carInfo.getFrameNo());
|
|
|
carModelReq.setEngineNo(carInfo.getEngineNo());
|
|
carModelReq.setEngineNo(carInfo.getEngineNo());
|
|
@@ -177,7 +189,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
|
|
|
|
|
//车辆年款不能超过注册日期
|
|
//车辆年款不能超过注册日期
|
|
|
List<ModelsQueryResponse.VehicleInfo> vehicleInfoList =
|
|
List<ModelsQueryResponse.VehicleInfo> vehicleInfoList =
|
|
|
- rd.getVehicleInfoList().stream().filter(a -> DateTimeUtil.dateIsAfter(carInfo.getRegisterDate(), a.getVehicleYear())).sorted(Comparator.comparing(ModelsQueryResponse.VehicleInfo::getVehiclePrice)).collect(Collectors.toList());
|
|
|
|
|
|
|
+ rd.getVehicleInfoList().stream().filter(a -> DateTimeUtil.dateIsAfter(carInfo.getRegisterDate(),
|
|
|
|
|
+ a.getVehicleYear())).sorted(Comparator.comparing(ModelsQueryResponse.VehicleInfo::getVehiclePrice)).collect(Collectors.toList());
|
|
|
|
|
|
|
|
//匹配的车辆信息数据 为空
|
|
//匹配的车辆信息数据 为空
|
|
|
if (CollUtil.isEmpty(vehicleInfoList)) {
|
|
if (CollUtil.isEmpty(vehicleInfoList)) {
|
|
@@ -225,7 +238,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
* @param quoteVo
|
|
* @param quoteVo
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- private Ruote builderParams(BaseQuoteVo<AccidentalDrivingVo> quoteVo, BaseQuoteInfoVo yaQuoteInfoVo, CoreModelsVo coreModelsVo) {
|
|
|
|
|
|
|
+ private Ruote builderParams(BaseQuoteVo<AccidentalDrivingVo> quoteVo, BaseQuoteInfoVo yaQuoteInfoVo,
|
|
|
|
|
+ CoreModelsVo coreModelsVo) {
|
|
|
// 获取协议配置信息
|
|
// 获取协议配置信息
|
|
|
YcConfigureParameters ycConfigureParameters = gainYcConfigParams(quoteVo.getAgreementId());
|
|
YcConfigureParameters ycConfigureParameters = gainYcConfigParams(quoteVo.getAgreementId());
|
|
|
CarInfoVo carInfo = yaQuoteInfoVo.getCarInfo();
|
|
CarInfoVo carInfo = yaQuoteInfoVo.getCarInfo();
|
|
@@ -235,11 +249,13 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
AccidentalDrivingVo adVo = quoteVo.getAccidentalDrivingVo();
|
|
AccidentalDrivingVo adVo = quoteVo.getAccidentalDrivingVo();
|
|
|
|
|
|
|
|
//获取查询码
|
|
//获取查询码
|
|
|
- String cQryCdeJQ = redisTemplate.opsForValue().get(REDIS_YONGCHENG_QUERY_CODE_JQ + yaQuoteInfoVo.getUserId() + carInfo.getVinNo() + carInfo.getLicenseNo());
|
|
|
|
|
- String cQryCdeSY = redisTemplate.opsForValue().get(REDIS_YONGCHENG_QUERY_CODE_SY + yaQuoteInfoVo.getUserId() + carInfo.getVinNo() + carInfo.getLicenseNo());
|
|
|
|
|
|
|
+ String cQryCdeJQ =
|
|
|
|
|
+ redisTemplate.opsForValue().get(REDIS_YONGCHENG_QUERY_CODE_JQ + yaQuoteInfoVo.getUserId() + carInfo.getVinNo() + carInfo.getLicenseNo());
|
|
|
|
|
+ String cQryCdeSY =
|
|
|
|
|
+ redisTemplate.opsForValue().get(REDIS_YONGCHENG_QUERY_CODE_SY + yaQuoteInfoVo.getUserId() + carInfo.getVinNo() + carInfo.getLicenseNo());
|
|
|
|
|
|
|
|
//组装参数
|
|
//组装参数
|
|
|
- Ruote m = Ruote.buildQuoteParam(yaQuoteInfoVo, ycConfigureParameters, adVo,cQryCdeJQ,cQryCdeSY);
|
|
|
|
|
|
|
+ Ruote m = Ruote.buildQuoteParam(yaQuoteInfoVo, ycConfigureParameters, adVo, cQryCdeJQ, cQryCdeSY);
|
|
|
//构造地区
|
|
//构造地区
|
|
|
buildRegion(m, yaQuoteInfoVo);
|
|
buildRegion(m, yaQuoteInfoVo);
|
|
|
return m;
|
|
return m;
|
|
@@ -253,16 +269,17 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
* @return
|
|
* @return
|
|
|
* @throws JsonProcessingException
|
|
* @throws JsonProcessingException
|
|
|
*/
|
|
*/
|
|
|
- private RuoteResponse getResponse(Ruote m, String vinNo, List<String> requestInfoList,BaseQuoteInfoVo yaQuoteInfoVo) throws JsonProcessingException {
|
|
|
|
|
|
|
+ private RuoteResponse getResponse(Ruote m, String vinNo, List<String> requestInfoList,
|
|
|
|
|
+ BaseQuoteInfoVo yaQuoteInfoVo) throws JsonProcessingException {
|
|
|
boolean boo;
|
|
boolean boo;
|
|
|
RuoteResponse rr = yongchengRequestApiComponents.newPremiumXnyCalculation(m);
|
|
RuoteResponse rr = yongchengRequestApiComponents.newPremiumXnyCalculation(m);
|
|
|
//存储 报价返回的查询码 交强和商业
|
|
//存储 报价返回的查询码 交强和商业
|
|
|
- if(rr.getVhl() != null) {
|
|
|
|
|
- if(rr.getVhl().getCQryCdeJQ() != null) {
|
|
|
|
|
|
|
+ if (rr.getVhl() != null) {
|
|
|
|
|
+ if (rr.getVhl().getCQryCdeJQ() != null) {
|
|
|
redisTemplate.opsForValue().set(REDIS_YONGCHENG_QUERY_CODE_JQ + yaQuoteInfoVo.getUserId() + yaQuoteInfoVo.getCarInfo().getVinNo() + yaQuoteInfoVo.getCarInfo().getLicenseNo(),
|
|
redisTemplate.opsForValue().set(REDIS_YONGCHENG_QUERY_CODE_JQ + yaQuoteInfoVo.getUserId() + yaQuoteInfoVo.getCarInfo().getVinNo() + yaQuoteInfoVo.getCarInfo().getLicenseNo(),
|
|
|
rr.getVhl().getCQryCdeJQ(), REDIS_YONGCHENG_QUERY_CODE_EXPIRE, TimeUnit.DAYS);
|
|
rr.getVhl().getCQryCdeJQ(), REDIS_YONGCHENG_QUERY_CODE_EXPIRE, TimeUnit.DAYS);
|
|
|
}
|
|
}
|
|
|
- if(rr.getVhl().getCQryCdeSY() != null) {
|
|
|
|
|
|
|
+ if (rr.getVhl().getCQryCdeSY() != null) {
|
|
|
redisTemplate.opsForValue().set(REDIS_YONGCHENG_QUERY_CODE_SY + yaQuoteInfoVo.getUserId() + yaQuoteInfoVo.getCarInfo().getVinNo() + yaQuoteInfoVo.getCarInfo().getLicenseNo(),
|
|
redisTemplate.opsForValue().set(REDIS_YONGCHENG_QUERY_CODE_SY + yaQuoteInfoVo.getUserId() + yaQuoteInfoVo.getCarInfo().getVinNo() + yaQuoteInfoVo.getCarInfo().getLicenseNo(),
|
|
|
rr.getVhl().getCQryCdeSY(), REDIS_YONGCHENG_QUERY_CODE_EXPIRE, TimeUnit.DAYS);
|
|
rr.getVhl().getCQryCdeSY(), REDIS_YONGCHENG_QUERY_CODE_EXPIRE, TimeUnit.DAYS);
|
|
|
}
|
|
}
|
|
@@ -270,8 +287,10 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
|
|
|
|
|
//重新设置 请求的查询码
|
|
//重新设置 请求的查询码
|
|
|
//读取缓存的查询码
|
|
//读取缓存的查询码
|
|
|
- String cQryCdeJQ = redisTemplate.opsForValue().get(REDIS_YONGCHENG_QUERY_CODE_JQ + yaQuoteInfoVo.getUserId() + yaQuoteInfoVo.getCarInfo().getVinNo() + yaQuoteInfoVo.getCarInfo().getLicenseNo());
|
|
|
|
|
- String cQryCdeSY = redisTemplate.opsForValue().get(REDIS_YONGCHENG_QUERY_CODE_SY + yaQuoteInfoVo.getUserId() + yaQuoteInfoVo.getCarInfo().getVinNo() + yaQuoteInfoVo.getCarInfo().getLicenseNo());
|
|
|
|
|
|
|
+ String cQryCdeJQ =
|
|
|
|
|
+ redisTemplate.opsForValue().get(REDIS_YONGCHENG_QUERY_CODE_JQ + yaQuoteInfoVo.getUserId() + yaQuoteInfoVo.getCarInfo().getVinNo() + yaQuoteInfoVo.getCarInfo().getLicenseNo());
|
|
|
|
|
+ String cQryCdeSY =
|
|
|
|
|
+ redisTemplate.opsForValue().get(REDIS_YONGCHENG_QUERY_CODE_SY + yaQuoteInfoVo.getUserId() + yaQuoteInfoVo.getCarInfo().getVinNo() + yaQuoteInfoVo.getCarInfo().getLicenseNo());
|
|
|
//交强
|
|
//交强
|
|
|
m.getRequestLabel().getCondition().getVhl().setCCheckCodeJQ("");
|
|
m.getRequestLabel().getCondition().getVhl().setCCheckCodeJQ("");
|
|
|
m.getRequestLabel().getCondition().getVhl().setCQryCdeJQ(cQryCdeJQ);
|
|
m.getRequestLabel().getCondition().getVhl().setCQryCdeJQ(cQryCdeJQ);
|
|
@@ -293,35 +312,25 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
|
|
|
|
|
// 交强险
|
|
// 交强险
|
|
|
boolean cAppJqFlag = "Y".equals(m.getRequestLabel().getCondition().getBase().getCAppJqFlag());
|
|
boolean cAppJqFlag = "Y".equals(m.getRequestLabel().getCondition().getBase().getCAppJqFlag());
|
|
|
- if(rr.getVhl() != null) {
|
|
|
|
|
|
|
+ if (rr.getVhl() != null) {
|
|
|
m.getRequestLabel().getCondition().getVhl().setCQryCdeJQ(rr.getVhl().getCQryCdeJQ());
|
|
m.getRequestLabel().getCondition().getVhl().setCQryCdeJQ(rr.getVhl().getCQryCdeJQ());
|
|
|
m.getRequestLabel().getCondition().getVhl().setCQryCdeSY(rr.getVhl().getCQryCdeSY());
|
|
m.getRequestLabel().getCondition().getVhl().setCQryCdeSY(rr.getVhl().getCQryCdeSY());
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
m.getRequestLabel().getCondition().getVhl().setCQryCdeJQ("");
|
|
m.getRequestLabel().getCondition().getVhl().setCQryCdeJQ("");
|
|
|
m.getRequestLabel().getCondition().getVhl().setCQryCdeSY("");
|
|
m.getRequestLabel().getCondition().getVhl().setCQryCdeSY("");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (errorMsg.contains("机动车综合商业保险")) {
|
|
|
|
|
- cAppJqFlag = false;
|
|
|
|
|
- } else if (errorMsg.contains("机动车交通事故强制险")) {
|
|
|
|
|
- appSYFlag = false;
|
|
|
|
|
- } else {
|
|
|
|
|
- appSYFlag = false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
//处理返回信息
|
|
//处理返回信息
|
|
|
//1、交强险重复投保处理
|
|
//1、交强险重复投保处理
|
|
|
- boo = ciRepetitionInsure(rr, m, requestInfoList, cAppJqFlag);
|
|
|
|
|
- if (!boo) {
|
|
|
|
|
- InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 交强险重复投保处理", vinNo);
|
|
|
|
|
- return this.getResponse(m, vinNo, requestInfoList,yaQuoteInfoVo);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ String jq = ciRepetitionInsure(rr, m, requestInfoList, cAppJqFlag, appSYFlag);
|
|
|
//1、商业险重复投保处理
|
|
//1、商业险重复投保处理
|
|
|
- boo = commerceRepetitionInsure(rr, m, requestInfoList, appSYFlag);
|
|
|
|
|
- if (!boo) {
|
|
|
|
|
- InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 商业险重复投保处理", vinNo);
|
|
|
|
|
- return this.getResponse(m, vinNo, requestInfoList,yaQuoteInfoVo);
|
|
|
|
|
|
|
+ String sy = commerceRepetitionInsure(rr, m, requestInfoList, appSYFlag, cAppJqFlag);
|
|
|
|
|
+
|
|
|
|
|
+ if (jq.isEmpty() && sy.isEmpty()) {
|
|
|
|
|
+ throw new SystemException(errorMsg);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 重复投保处理", vinNo);
|
|
|
|
|
+ return this.getResponse(m, vinNo, requestInfoList, yaQuoteInfoVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -330,21 +339,21 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
boo = reinsurance(rr, m);
|
|
boo = reinsurance(rr, m);
|
|
|
if (!boo) {
|
|
if (!boo) {
|
|
|
InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 转保处理", vinNo);
|
|
InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 转保处理", vinNo);
|
|
|
- return this.getResponse(m, vinNo, requestInfoList,yaQuoteInfoVo);
|
|
|
|
|
|
|
+ return this.getResponse(m, vinNo, requestInfoList, yaQuoteInfoVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//3、商业险日期处理
|
|
//3、商业险日期处理
|
|
|
boo = biRepetitionInsure(rr, m, requestInfoList);
|
|
boo = biRepetitionInsure(rr, m, requestInfoList);
|
|
|
if (!boo) {
|
|
if (!boo) {
|
|
|
InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 商业险日期处理", vinNo);
|
|
InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 商业险日期处理", vinNo);
|
|
|
- return this.getResponse(m, vinNo, requestInfoList,yaQuoteInfoVo);
|
|
|
|
|
|
|
+ return this.getResponse(m, vinNo, requestInfoList, yaQuoteInfoVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 转保验证码
|
|
// 转保验证码
|
|
|
boo = reinsuranceCodeError(rr, m);
|
|
boo = reinsuranceCodeError(rr, m);
|
|
|
if (!boo) {
|
|
if (!boo) {
|
|
|
InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 转保处理", vinNo);
|
|
InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 转保处理", vinNo);
|
|
|
- return this.getResponse(m, vinNo, requestInfoList,yaQuoteInfoVo);
|
|
|
|
|
|
|
+ return this.getResponse(m, vinNo, requestInfoList, yaQuoteInfoVo);
|
|
|
}
|
|
}
|
|
|
return rr;
|
|
return rr;
|
|
|
}
|
|
}
|
|
@@ -426,12 +435,12 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
// feeRuleSchemeService.dealFeeOrderInfo(yaQuoteInfoVo, quoteRespVo, quoteVo.getAgreementId(), iac.getId());
|
|
// feeRuleSchemeService.dealFeeOrderInfo(yaQuoteInfoVo, quoteRespVo, quoteVo.getAgreementId(), iac.getId());
|
|
|
|
|
|
|
|
//存储 报价返回的查询码 交强和商业
|
|
//存储 报价返回的查询码 交强和商业
|
|
|
- if(rr.getVhl() != null) {
|
|
|
|
|
- if(rr.getVhl().getCQryCdeJQ() != null) {
|
|
|
|
|
|
|
+ if (rr.getVhl() != null) {
|
|
|
|
|
+ if (rr.getVhl().getCQryCdeJQ() != null) {
|
|
|
redisTemplate.opsForValue().set(REDIS_YONGCHENG_QUERY_CODE_JQ + order.getUserid() + yaQuoteInfoVo.getCarInfo().getVinNo() + yaQuoteInfoVo.getCarInfo().getLicenseNo(),
|
|
redisTemplate.opsForValue().set(REDIS_YONGCHENG_QUERY_CODE_JQ + order.getUserid() + yaQuoteInfoVo.getCarInfo().getVinNo() + yaQuoteInfoVo.getCarInfo().getLicenseNo(),
|
|
|
rr.getVhl().getCQryCdeJQ(), REDIS_YONGCHENG_QUERY_CODE_EXPIRE, TimeUnit.DAYS);
|
|
rr.getVhl().getCQryCdeJQ(), REDIS_YONGCHENG_QUERY_CODE_EXPIRE, TimeUnit.DAYS);
|
|
|
}
|
|
}
|
|
|
- if(rr.getVhl().getCQryCdeSY() != null) {
|
|
|
|
|
|
|
+ if (rr.getVhl().getCQryCdeSY() != null) {
|
|
|
redisTemplate.opsForValue().set(REDIS_YONGCHENG_QUERY_CODE_SY + order.getUserid() + yaQuoteInfoVo.getCarInfo().getVinNo() + yaQuoteInfoVo.getCarInfo().getLicenseNo(),
|
|
redisTemplate.opsForValue().set(REDIS_YONGCHENG_QUERY_CODE_SY + order.getUserid() + yaQuoteInfoVo.getCarInfo().getVinNo() + yaQuoteInfoVo.getCarInfo().getLicenseNo(),
|
|
|
rr.getVhl().getCQryCdeSY(), REDIS_YONGCHENG_QUERY_CODE_EXPIRE, TimeUnit.DAYS);
|
|
rr.getVhl().getCQryCdeSY(), REDIS_YONGCHENG_QUERY_CODE_EXPIRE, TimeUnit.DAYS);
|
|
|
}
|
|
}
|
|
@@ -444,84 +453,73 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
/**
|
|
/**
|
|
|
* 报价 交强险 重复 投保业务处理
|
|
* 报价 交强险 重复 投保业务处理
|
|
|
*/
|
|
*/
|
|
|
- public boolean ciRepetitionInsure(RuoteResponse rr, Ruote m, List<String> requestInfoList, boolean cAppJqFlag) {
|
|
|
|
|
|
|
+ public String ciRepetitionInsure(RuoteResponse rr, Ruote m, List<String> requestInfoList, boolean cAppJqFlag,
|
|
|
|
|
+ boolean flag) {
|
|
|
String errorMsg = rr.getHead().getErrorMessage();
|
|
String errorMsg = rr.getHead().getErrorMessage();
|
|
|
|
|
|
|
|
if (cAppJqFlag) {
|
|
if (cAppJqFlag) {
|
|
|
requestInfoList.add(errorMsg);
|
|
requestInfoList.add(errorMsg);
|
|
|
-
|
|
|
|
|
log.info("永诚API方式 - xml请求 ------------报价 -> 交强重复投保----------------");
|
|
log.info("永诚API方式 - xml请求 ------------报价 -> 交强重复投保----------------");
|
|
|
|
|
+ String coverageEndDate;
|
|
|
|
|
|
|
|
- //截取0 到 机动车交通事故强制险
|
|
|
|
|
- if (!errorMsg.contains("终保日期")) {
|
|
|
|
|
- throw new SystemException(errorMsg);
|
|
|
|
|
|
|
+ if (flag) {
|
|
|
|
|
+ coverageEndDate = GuorenDuplicateInsuranceComponent.getEndDate(errorMsg, JQ_REGEX);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ coverageEndDate = GuorenDuplicateInsuranceComponent.getEndDate(errorMsg, DAN_JQ_REGEX);
|
|
|
}
|
|
}
|
|
|
- String coverageEndDate = errorMsg.substring(errorMsg.indexOf("终保日期") + 5, errorMsg.indexOf("终保日期") + 5 + 16);
|
|
|
|
|
- LocalDateTime start;
|
|
|
|
|
- try {
|
|
|
|
|
- start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN_EXT1);
|
|
|
|
|
- }catch(Exception e){
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (coverageEndDate.isEmpty()) {
|
|
|
throw new SystemException(errorMsg);
|
|
throw new SystemException(errorMsg);
|
|
|
}
|
|
}
|
|
|
- LocalDateTime end = start.plusYears(1L).minusDays(1L);
|
|
|
|
|
|
|
|
|
|
-// if (start.getHour() > 0) {
|
|
|
|
|
-// end = start.plusYears(1L);
|
|
|
|
|
-// newStartDate = DateTimeUtil.format(start, DateTimeUtil.DATETIME_PATTERN);
|
|
|
|
|
-// }
|
|
|
|
|
- String newStartDate = "";
|
|
|
|
|
- String newEndDate = "";
|
|
|
|
|
//判断是否是及时起保
|
|
//判断是否是及时起保
|
|
|
- if (start.getHour() > 0 || start.getMinute() > 0 || start.getSecond() > 0) {
|
|
|
|
|
- newStartDate = DateTimeUtil.getStartTimeOfDayStr(start, DateTimeUtil.DATETIME_PATTERN);
|
|
|
|
|
- end = end.plusDays(1L);
|
|
|
|
|
- newEndDate = DateTimeUtil.getStartTimeOfDayStr(end, DateTimeUtil.DATETIME_PATTERN);
|
|
|
|
|
|
|
+ LocalDateTime start;
|
|
|
|
|
+ if (coverageEndDate.contains("23:59:59")) {
|
|
|
|
|
+ start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN).plusSeconds(1);
|
|
|
} else {
|
|
} else {
|
|
|
- newStartDate = DateTimeUtil.getStartTimeOfDayStr(start, DateTimeUtil.DATETIME_PATTERN);
|
|
|
|
|
- newEndDate = DateTimeUtil.getEndTimeOfDayStr(end, DateTimeUtil.DATETIME_PATTERN);
|
|
|
|
|
|
|
+ start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-// String newEndDate = DateTimeUtil.getEndTimeOfDayStr(end, DateTimeUtil.DATETIME_PATTERN);
|
|
|
|
|
|
|
+ LocalDateTime end = start.plusYears(1L).minusDays(1L);
|
|
|
|
|
+ String newStartDate = DateTimeUtil.getStartTimeOfDayStr(start, DateTimeUtil.DATETIME_PATTERN);
|
|
|
|
|
+ String newEndDate = DateTimeUtil.getEndTimeOfDayStr(end, DateTimeUtil.DATETIME_PATTERN);
|
|
|
log.error("新起:{}", newStartDate);
|
|
log.error("新起:{}", newStartDate);
|
|
|
log.error("新止:{}", newEndDate);
|
|
log.error("新止:{}", newEndDate);
|
|
|
-
|
|
|
|
|
CarInsDateDto cidd = Base.buildInsDate(newStartDate, newEndDate);
|
|
CarInsDateDto cidd = Base.buildInsDate(newStartDate, newEndDate);
|
|
|
-
|
|
|
|
|
m.getRequestLabel().getCondition().getBase().setTInsrncBgnTmJQ(cidd.getStartDate());
|
|
m.getRequestLabel().getCondition().getBase().setTInsrncBgnTmJQ(cidd.getStartDate());
|
|
|
m.getRequestLabel().getCondition().getBase().setTInsrncEndTmJQ(cidd.getEndDate());
|
|
m.getRequestLabel().getCondition().getBase().setTInsrncEndTmJQ(cidd.getEndDate());
|
|
|
m.getRequestLabel().getCondition().getBase().setCImmeffMrk(cidd.isForthwith() ? "1" : "0");
|
|
m.getRequestLabel().getCondition().getBase().setCImmeffMrk(cidd.isForthwith() ? "1" : "0");
|
|
|
-
|
|
|
|
|
- return false;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ return coverageEndDate;
|
|
|
}
|
|
}
|
|
|
- return true;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ return "";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 报价 商业 重复 投保业务处理
|
|
* 报价 商业 重复 投保业务处理
|
|
|
*/
|
|
*/
|
|
|
- public boolean commerceRepetitionInsure(RuoteResponse rr, Ruote m, List<String> requestInfoList, boolean appSYFlag) {
|
|
|
|
|
|
|
+ public String commerceRepetitionInsure(RuoteResponse rr, Ruote m, List<String> requestInfoList, boolean appSYFlag
|
|
|
|
|
+ , boolean flag) {
|
|
|
String errorMsg = rr.getHead().getErrorMessage();
|
|
String errorMsg = rr.getHead().getErrorMessage();
|
|
|
|
|
|
|
|
if (appSYFlag) {
|
|
if (appSYFlag) {
|
|
|
requestInfoList.add(errorMsg);
|
|
requestInfoList.add(errorMsg);
|
|
|
log.info("永诚API方式 - xml请求 ------------报价 -> 商业险重复投保----------------");
|
|
log.info("永诚API方式 - xml请求 ------------报价 -> 商业险重复投保----------------");
|
|
|
|
|
+ String coverageEndDate;
|
|
|
|
|
+ if (flag) {
|
|
|
|
|
+ coverageEndDate = GuorenDuplicateInsuranceComponent.getEndDate(errorMsg, SY_REGEX);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ coverageEndDate = GuorenDuplicateInsuranceComponent.getEndDate(errorMsg, DAN_JQ_REGEX);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- //保险止期
|
|
|
|
|
- if (!errorMsg.contains("保险止期")) {
|
|
|
|
|
|
|
+ if (coverageEndDate.isEmpty()) {
|
|
|
throw new SystemException(errorMsg);
|
|
throw new SystemException(errorMsg);
|
|
|
}
|
|
}
|
|
|
- String coverageEndDate = errorMsg.substring(errorMsg.indexOf("保险止期") + 6, errorMsg.indexOf("保险止期") + 6 + 19);
|
|
|
|
|
LocalDateTime start;
|
|
LocalDateTime start;
|
|
|
-
|
|
|
|
|
if (coverageEndDate.contains("23:59:59")) {
|
|
if (coverageEndDate.contains("23:59:59")) {
|
|
|
start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN).plusSeconds(1);
|
|
start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN).plusSeconds(1);
|
|
|
} else {
|
|
} else {
|
|
|
start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN);
|
|
start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
LocalDateTime end = start.plusYears(1L).minusDays(1L);
|
|
LocalDateTime end = start.plusYears(1L).minusDays(1L);
|
|
|
String newStartDate = DateTimeUtil.getStartTimeOfDayStr(start, DateTimeUtil.DATETIME_PATTERN);
|
|
String newStartDate = DateTimeUtil.getStartTimeOfDayStr(start, DateTimeUtil.DATETIME_PATTERN);
|
|
|
String newEndDate = DateTimeUtil.getEndTimeOfDayStr(end, DateTimeUtil.DATETIME_PATTERN);
|
|
String newEndDate = DateTimeUtil.getEndTimeOfDayStr(end, DateTimeUtil.DATETIME_PATTERN);
|
|
@@ -533,12 +531,9 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
m.getRequestLabel().getCondition().getBase().setTInsrncEndTmSY(newEndDate);
|
|
m.getRequestLabel().getCondition().getBase().setTInsrncEndTmSY(newEndDate);
|
|
|
//转保信息清空 重新报价
|
|
//转保信息清空 重新报价
|
|
|
m.getRequestLabel().getCondition().getVhl().setCBusType("0");
|
|
m.getRequestLabel().getCondition().getVhl().setCBusType("0");
|
|
|
-
|
|
|
|
|
- return false;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ return coverageEndDate;
|
|
|
}
|
|
}
|
|
|
- return true;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ return "";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -564,7 +559,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
//终保日期
|
|
//终保日期
|
|
|
String coverageEndDate = ciMsg.substring(ciMsg.indexOf("终保日期") + 5, ciMsg.indexOf("终保日期") + 5 + 12);
|
|
String coverageEndDate = ciMsg.substring(ciMsg.indexOf("终保日期") + 5, ciMsg.indexOf("终保日期") + 5 + 12);
|
|
|
|
|
|
|
|
- LocalDateTime start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.UNSIGNED_DATETIME_PATTERN_EXT1);
|
|
|
|
|
|
|
+ LocalDateTime start = DateTimeUtil.parseLocalDateTime(coverageEndDate,
|
|
|
|
|
+ DateTimeUtil.UNSIGNED_DATETIME_PATTERN_EXT1);
|
|
|
LocalDateTime end = start.plusYears(1L).minusDays(1L);
|
|
LocalDateTime end = start.plusYears(1L).minusDays(1L);
|
|
|
|
|
|
|
|
String newStartDate = "";
|
|
String newStartDate = "";
|
|
@@ -684,7 +680,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
Audit m = Audit.buildAuditParam(ownerInfo, insureInfo, applyInfo, ycConfigureParameters, iac);
|
|
Audit m = Audit.buildAuditParam(ownerInfo, insureInfo, applyInfo, ycConfigureParameters, iac);
|
|
|
|
|
|
|
|
//投保人地区信息
|
|
//投保人地区信息
|
|
|
- PersonAreaVo personAreaVo = sysAreaService.queryByAddressYc(insureInfo.getAddr(), insureInfo.getIdentifyNumber());
|
|
|
|
|
|
|
+ PersonAreaVo personAreaVo = sysAreaService.queryByAddressYc(insureInfo.getAddr(),
|
|
|
|
|
+ insureInfo.getIdentifyNumber());
|
|
|
|
|
|
|
|
//构造被保人地区
|
|
//构造被保人地区
|
|
|
m.getRequestLabel().getCondition().getCustomer().setCProvince(personAreaVo.getProvinceCode());
|
|
m.getRequestLabel().getCondition().getCustomer().setCProvince(personAreaVo.getProvinceCode());
|
|
@@ -790,7 +787,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
// 获取协议配置信息
|
|
// 获取协议配置信息
|
|
|
YcConfigureParameters ycConfigureParameters = gainYcConfigParams(iac.getAgreementId());
|
|
YcConfigureParameters ycConfigureParameters = gainYcConfigParams(iac.getAgreementId());
|
|
|
//组装参数
|
|
//组装参数
|
|
|
- Pay pay = Pay.buildPayParam(iac, ycConfigureParameters.gainAuthorityDataXml(), apiComponents.getPayCallBack());
|
|
|
|
|
|
|
+ Pay pay = Pay.buildPayParam(iac, ycConfigureParameters.gainAuthorityDataXml(),
|
|
|
|
|
+ apiComponents.getPayCallBack());
|
|
|
//接口请求
|
|
//接口请求
|
|
|
PayResponse payResp = yongchengRequestApiComponents.newGetPayNo(pay);
|
|
PayResponse payResp = yongchengRequestApiComponents.newGetPayNo(pay);
|
|
|
|
|
|
|
@@ -829,7 +827,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
//0 支付回调 1核保回调 5直接返回字符串信息
|
|
//0 支付回调 1核保回调 5直接返回字符串信息
|
|
|
String type = "5";
|
|
String type = "5";
|
|
|
//组装参数
|
|
//组装参数
|
|
|
- CallbackAnOrder o = CallbackAnOrder.buildCallbackAnOrderParam(iac, ycConfigureParameters.gainAuthorityDataXml(), type);
|
|
|
|
|
|
|
+ CallbackAnOrder o = CallbackAnOrder.buildCallbackAnOrderParam(iac,
|
|
|
|
|
+ ycConfigureParameters.gainAuthorityDataXml(), type);
|
|
|
//接口请求
|
|
//接口请求
|
|
|
try {
|
|
try {
|
|
|
submitPolicy(iac.getJypremium(), ycConfigureParameters, iac.getInsOrderNo());
|
|
submitPolicy(iac.getJypremium(), ycConfigureParameters, iac.getInsOrderNo());
|
|
@@ -855,12 +854,14 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
DrivingInsuranceDto drivingInsuranceDto = new DrivingInsuranceDto();
|
|
DrivingInsuranceDto drivingInsuranceDto = new DrivingInsuranceDto();
|
|
|
drivingInsuranceDto.setPolicyNumber(param.getYwPolicyNo());
|
|
drivingInsuranceDto.setPolicyNumber(param.getYwPolicyNo());
|
|
|
drivingInsuranceDto.setApplicationNumber(param.getYwPolicyAppNo());
|
|
drivingInsuranceDto.setApplicationNumber(param.getYwPolicyAppNo());
|
|
|
- JSONArray objects = JSON.parseArray(JSON.toJSONString(Collections.singletonList(drivingInsuranceDto)));
|
|
|
|
|
|
|
+ JSONArray objects =
|
|
|
|
|
+ JSON.parseArray(JSON.toJSONString(Collections.singletonList(drivingInsuranceDto)));
|
|
|
iac.setCrossInsurance(objects);
|
|
iac.setCrossInsurance(objects);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(param.getPay_date()) && !"null".equals(param.getPay_date())) {
|
|
if (StringUtils.isNotEmpty(param.getPay_date()) && !"null".equals(param.getPay_date())) {
|
|
|
- iac.setPayDate(LocalDateTime.parse(param.getPay_date(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
|
|
|
|
|
|
+ iac.setPayDate(LocalDateTime.parse(param.getPay_date(), DateTimeFormatter.ofPattern("yyyy-MM" +
|
|
|
|
|
+ "-dd HH:mm:ss")));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
@@ -880,7 +881,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
//失败原因
|
|
//失败原因
|
|
|
- log.info(String.format("永诚API方式 - 补传回调 - 失败,交强保单号:{} ,商业保单号:{},类型:{}", param.getCiPolicyNo(), param.getBizPolicyNo(),
|
|
|
|
|
|
|
+ log.info(String.format("永诚API方式 - 补传回调 - 失败,交强保单号:{} ,商业保单号:{},类型:{}", param.getCiPolicyNo(),
|
|
|
|
|
+ param.getBizPolicyNo(),
|
|
|
param.getType()));
|
|
param.getType()));
|
|
|
return HttpResult.error(param.getMessage());
|
|
return HttpResult.error(param.getMessage());
|
|
|
}
|
|
}
|
|
@@ -906,10 +908,12 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- AccidentUnderwritingRequest accidentUnderwritingRequest = new AccidentUnderwritingRequest(ycConfigureParameters.getPassword(),
|
|
|
|
|
- ycConfigureParameters.getUserName(), insOrderNo);
|
|
|
|
|
|
|
+ AccidentUnderwritingRequest accidentUnderwritingRequest =
|
|
|
|
|
+ new AccidentUnderwritingRequest(ycConfigureParameters.getPassword(),
|
|
|
|
|
+ ycConfigureParameters.getUserName(), insOrderNo);
|
|
|
|
|
|
|
|
- AccidentUnderwritingResponse accidentUnderwritingResponse = yongchengRequestApiComponents.submitPolicy(accidentUnderwritingRequest);
|
|
|
|
|
|
|
+ AccidentUnderwritingResponse accidentUnderwritingResponse =
|
|
|
|
|
+ yongchengRequestApiComponents.submitPolicy(accidentUnderwritingRequest);
|
|
|
AccidentUnderwritingResponse.HeadDTO.ResponseCompleteMessageStatus responseCompleteMessageStatus =
|
|
AccidentUnderwritingResponse.HeadDTO.ResponseCompleteMessageStatus responseCompleteMessageStatus =
|
|
|
accidentUnderwritingResponse.getHead().getResponseCompleteMessageStatus();
|
|
accidentUnderwritingResponse.getHead().getResponseCompleteMessageStatus();
|
|
|
|
|
|
|
@@ -994,7 +998,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
cipDto.setJyUrl(jyUrl);
|
|
cipDto.setJyUrl(jyUrl);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return HttpResult.ok(pResp.getHead().getResponseCompleteMessageStatus().getMessageStatusDescription(), cipDto);
|
|
|
|
|
|
|
+ return HttpResult.ok(pResp.getHead().getResponseCompleteMessageStatus().getMessageStatusDescription()
|
|
|
|
|
+ , cipDto);
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
throw new SystemException(pResp.getHead().getResponseCompleteMessageStatus().getMessageStatusDescription());
|
|
throw new SystemException(pResp.getHead().getResponseCompleteMessageStatus().getMessageStatusDescription());
|
|
@@ -1047,7 +1052,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
|
|
|
|
|
//将insAttachInsureList存入redis
|
|
//将insAttachInsureList存入redis
|
|
|
if (!insAttachInsureList.isEmpty()) {
|
|
if (!insAttachInsureList.isEmpty()) {
|
|
|
- redisTemplate.opsForValue().set(redisKey.toString(), JSON.toJSONString(insAttachInsureList), YC_ACCIDENTAL_DRIVING_TIME,
|
|
|
|
|
|
|
+ redisTemplate.opsForValue().set(redisKey.toString(), JSON.toJSONString(insAttachInsureList),
|
|
|
|
|
+ YC_ACCIDENTAL_DRIVING_TIME,
|
|
|
TimeUnit.DAYS);
|
|
TimeUnit.DAYS);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1070,7 +1076,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
if (!Objects.isNull(redisTemplate.opsForValue().get(redisKey.toString()))) {
|
|
if (!Objects.isNull(redisTemplate.opsForValue().get(redisKey.toString()))) {
|
|
|
String redisValue = String.valueOf(redisTemplate.opsForValue().get(redisKey.toString()));
|
|
String redisValue = String.valueOf(redisTemplate.opsForValue().get(redisKey.toString()));
|
|
|
if (StringUtils.isNotEmpty(redisValue)) {
|
|
if (StringUtils.isNotEmpty(redisValue)) {
|
|
|
- List<EsmInsAttachInsureDetails> esmInsAttachInsureDetails = JSON.parseArray(redisValue, EsmInsAttachInsureDetails.class);
|
|
|
|
|
|
|
+ List<EsmInsAttachInsureDetails> esmInsAttachInsureDetails = JSON.parseArray(redisValue,
|
|
|
|
|
+ EsmInsAttachInsureDetails.class);
|
|
|
return HttpResult.ok(esmInsAttachInsureDetails);
|
|
return HttpResult.ok(esmInsAttachInsureDetails);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1093,7 +1100,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
|
|
|
|
|
//将esmInsAttachInsureDetails存入redis
|
|
//将esmInsAttachInsureDetails存入redis
|
|
|
if (!esmInsAttachInsureDetails.isEmpty()) {
|
|
if (!esmInsAttachInsureDetails.isEmpty()) {
|
|
|
- redisTemplate.opsForValue().set(redisKey.toString(), JSON.toJSONString(esmInsAttachInsureDetails), YC_ACCIDENTAL_DRIVING_TIME
|
|
|
|
|
|
|
+ redisTemplate.opsForValue().set(redisKey.toString(), JSON.toJSONString(esmInsAttachInsureDetails),
|
|
|
|
|
+ YC_ACCIDENTAL_DRIVING_TIME
|
|
|
, TimeUnit.DAYS);
|
|
, TimeUnit.DAYS);
|
|
|
}
|
|
}
|
|
|
return HttpResult.ok(esmInsAttachInsureDetails);
|
|
return HttpResult.ok(esmInsAttachInsureDetails);
|
|
@@ -1196,7 +1204,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
* @author: lig
|
|
* @author: lig
|
|
|
* @date: 2023年02月08日 0008
|
|
* @date: 2023年02月08日 0008
|
|
|
*/
|
|
*/
|
|
|
- private ModelsQueryXml buildModelsQueryParam(CarModel_Req carModelReq, YcConfigureParameters ycConfigureParameters) {
|
|
|
|
|
|
|
+ private ModelsQueryXml buildModelsQueryParam(CarModel_Req carModelReq,
|
|
|
|
|
+ YcConfigureParameters ycConfigureParameters) {
|
|
|
ModelsQueryXml m = new ModelsQueryXml();
|
|
ModelsQueryXml m = new ModelsQueryXml();
|
|
|
ModelsQueryXml.RequestLabel requestLabel = new ModelsQueryXml.RequestLabel();
|
|
ModelsQueryXml.RequestLabel requestLabel = new ModelsQueryXml.RequestLabel();
|
|
|
requestLabel.setSearchKeyword(carModelReq.getFrameNo().substring(0, 8));
|
|
requestLabel.setSearchKeyword(carModelReq.getFrameNo().substring(0, 8));
|
|
@@ -1286,8 +1295,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = new InsAreaCompanyAccidentalDriving();
|
|
InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = new InsAreaCompanyAccidentalDriving();
|
|
|
- if(quoteVo.getAccidentalDrivingVo() != null)
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ if (quoteVo.getAccidentalDrivingVo() != null) {
|
|
|
insAreaCompanyAccidentalDriving.setQuantity(quoteVo.getAccidentalDrivingVo().getQuantity());
|
|
insAreaCompanyAccidentalDriving.setQuantity(quoteVo.getAccidentalDrivingVo().getQuantity());
|
|
|
insAreaCompanyAccidentalDriving.setRideRiskCode(quoteVo.getAccidentalDrivingVo().getRideRiskCode());
|
|
insAreaCompanyAccidentalDriving.setRideRiskCode(quoteVo.getAccidentalDrivingVo().getRideRiskCode());
|
|
|
insAreaCompanyAccidentalDriving.setRideRiskName(quoteVo.getAccidentalDrivingVo().getRideRiskName());
|
|
insAreaCompanyAccidentalDriving.setRideRiskName(quoteVo.getAccidentalDrivingVo().getRideRiskName());
|
|
@@ -1324,7 +1332,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
if (insured.getIdentifyNumber().equals(applicant.getIdentifyNumber())) {
|
|
if (insured.getIdentifyNumber().equals(applicant.getIdentifyNumber())) {
|
|
|
applicantPersonAreaVo = insuredPersonAreaVo;
|
|
applicantPersonAreaVo = insuredPersonAreaVo;
|
|
|
} else {
|
|
} else {
|
|
|
- applicantPersonAreaVo = sysAreaService.queryByAddressYc(applicant.getAddr(), applicant.getIdentifyNumber());
|
|
|
|
|
|
|
+ applicantPersonAreaVo = sysAreaService.queryByAddressYc(applicant.getAddr(),
|
|
|
|
|
+ applicant.getIdentifyNumber());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (!Objects.isNull(ownerPersonAreaVo)) {
|
|
if (!Objects.isNull(ownerPersonAreaVo)) {
|
|
@@ -1412,7 +1421,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
return FileUtil.netUrlToFile(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl);
|
|
return FileUtil.netUrlToFile(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void buildCarInfo(CarInfoVo carInfo, ModelsQueryResponse.VehicleInfo vehicleInfo, CoreModelsVo coreModelsVo) {
|
|
|
|
|
|
|
+ private void buildCarInfo(CarInfoVo carInfo, ModelsQueryResponse.VehicleInfo vehicleInfo,
|
|
|
|
|
+ CoreModelsVo coreModelsVo) {
|
|
|
carInfo.setModelCode(vehicleInfo.getVehicleId());
|
|
carInfo.setModelCode(vehicleInfo.getVehicleId());
|
|
|
carInfo.setCiCarName(vehicleInfo.getVehicleName());
|
|
carInfo.setCiCarName(vehicleInfo.getVehicleName());
|
|
|
carInfo.setModelcname(vehicleInfo.getVehicleName());
|
|
carInfo.setModelcname(vehicleInfo.getVehicleName());
|
|
@@ -1441,7 +1451,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
|
|
|
//0 支付回调 1核保回调 5直接返回字符串信息
|
|
//0 支付回调 1核保回调 5直接返回字符串信息
|
|
|
String type = "5";
|
|
String type = "5";
|
|
|
//组装参数
|
|
//组装参数
|
|
|
- CallbackAnOrder o = CallbackAnOrder.buildCallbackAnOrderParam(iac, ycConfigureParameters.gainAuthorityDataXml(), type);
|
|
|
|
|
|
|
+ CallbackAnOrder o = CallbackAnOrder.buildCallbackAnOrderParam(iac,
|
|
|
|
|
+ ycConfigureParameters.gainAuthorityDataXml(), type);
|
|
|
//接口请求
|
|
//接口请求
|
|
|
try {
|
|
try {
|
|
|
submitPolicy(iac.getJypremium(), ycConfigureParameters, iac.getInsOrderNo());
|
|
submitPolicy(iac.getJypremium(), ycConfigureParameters, iac.getInsOrderNo());
|