|
|
@@ -233,7 +233,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
log.debug("--------报价开始,订单号:{},协议号:{}--------------", quoteVo.getOrderNo(), quoteVo.getAgreementId());
|
|
|
// 获取协议配置信息
|
|
|
ChannelInfoDto channelInfo = gainChannelConfigInfo(quoteVo.getAgreementId());
|
|
|
- BaseQuoteInfoVo yaQuoteInfoVo = insOrdersComponents.getQuoteInfo(quoteVo.getOrderNo(),quoteVo.getKinds());
|
|
|
+ BaseQuoteInfoVo yaQuoteInfoVo = insOrdersComponents.getQuoteInfo(quoteVo.getOrderNo(), quoteVo.getKinds());
|
|
|
InsOrders order = insOrdersService.getById(yaQuoteInfoVo.getOrderNo());
|
|
|
CarInfoVo carInfo = yaQuoteInfoVo.getCarInfo();
|
|
|
|
|
|
@@ -310,12 +310,12 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
|
|
|
|
|
|
InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = new InsAreaCompanyAccidentalDriving();
|
|
|
- if(accidentalDrivingVo != null) {
|
|
|
+ if (accidentalDrivingVo != null) {
|
|
|
insAreaCompanyAccidentalDriving.setRideRiskCode(quoteVo.getAccidentalDrivingVo().getProdCode());
|
|
|
insAreaCompanyAccidentalDriving.setRideRiskName(quoteVo.getAccidentalDrivingVo().getGoodsName());
|
|
|
insAreaCompanyAccidentalDriving.setQuantity(quoteVo.getAccidentalDrivingVo().getQuantity());
|
|
|
}
|
|
|
- insAreaCompanyService.insertCompanyAndOrders(iac,insAreaCompanyAccidentalDriving);
|
|
|
+ insAreaCompanyService.insertCompanyAndOrders(iac, insAreaCompanyAccidentalDriving);
|
|
|
quoteRespVo.setCompanyId(iac.getId());
|
|
|
// 返回核心车型
|
|
|
quoteRespVo.setCoreModels(vinQ.toCoreModelsVo());
|
|
|
@@ -340,7 +340,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
//子订单
|
|
|
InsAreaCompany iac = insAreaCompanyService.getByIdIsExist(quoteOrderNo);
|
|
|
|
|
|
- String oldStatus =iac.getOrderstatus();
|
|
|
+ String oldStatus = iac.getOrderstatus();
|
|
|
// 获取协议配置信息
|
|
|
ChannelInfoDto channelInfo = gainChannelConfigInfo(iac.getAgreementId());
|
|
|
|
|
|
@@ -358,7 +358,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
String statusJq = auditResp.getData().get(0).getUnderWriteFlagCI();
|
|
|
String statusSy = auditResp.getData().get(0).getUnderWriteFlagBI();
|
|
|
String message = auditResp.getData().get(0).getMessage();
|
|
|
- if (StringUtils.isEmpty(statusJq) && StringUtils.isEmpty(statusSy)){
|
|
|
+ if (StringUtils.isEmpty(statusJq) && StringUtils.isEmpty(statusSy)) {
|
|
|
return HttpResult.error("核保失败:" + message);
|
|
|
}
|
|
|
//单交 核保状态 0初始值/1通过/2不通过/3 无需核保 9待核保
|
|
|
@@ -397,7 +397,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
if (iac.getOrderstatus().equals(InsOrderStatusEnum.WAIT_AUDIT.getCode())) {
|
|
|
iac.setUnderwritingStatus(UnderwritingStatus.US_2.getCode());
|
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(iac,oldStatus,iac.getOrderstatus(),"1");
|
|
|
+ insSubOrderUpdateDetailService.insertData(iac, oldStatus, iac.getOrderstatus(), "1");
|
|
|
insAreaCompanyService.updateCompanyAndOrdersMessage(iac, message);
|
|
|
return HttpResult.error(message);
|
|
|
}
|
|
|
@@ -409,7 +409,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
return HttpResult.error(message);
|
|
|
}
|
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(iac,oldStatus,iac.getOrderstatus(),"1");
|
|
|
+ insSubOrderUpdateDetailService.insertData(iac, oldStatus, iac.getOrderstatus(), "1");
|
|
|
InsUtils.buildOrderStatus(order, iac);
|
|
|
if (iac.getOrderstatus().equals(InsOrderStatusEnum.WAIT_PAY.getCode())) {
|
|
|
//获取签名地址
|
|
|
@@ -462,7 +462,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
if (jqBoo || syBoo || jqSyBoo) {
|
|
|
|
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(iac,iac.getOrderstatus(),InsOrderStatusEnum.WAIT_PAY.getCode(),"1");
|
|
|
+ insSubOrderUpdateDetailService.insertData(iac, iac.getOrderstatus(), InsOrderStatusEnum.WAIT_PAY.getCode(), "1");
|
|
|
iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
//更新支付链接
|
|
|
SignatureResponse signature = guorenRequestApiComponent.signature(iac);
|
|
|
@@ -489,7 +489,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
// 支付
|
|
|
if (updateFlag) {
|
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(iac,iac.getOrderstatus(),InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(),"1");
|
|
|
+ insSubOrderUpdateDetailService.insertData(iac, iac.getOrderstatus(), InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(), "1");
|
|
|
iac.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
guorenRequestApiComponent.queryNoCarPolicyNo(iac);
|
|
|
insAreaCompanyService.updateCompanyAndOrders(iac);
|
|
|
@@ -641,9 +641,6 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public HttpResult callBackApi(HttpServletRequest request) {
|
|
|
@@ -668,7 +665,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
InsAreaCompany iac = insAreaCompanyService.getByInsOrderNo(orderId);
|
|
|
if (null != iac) {
|
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(iac,iac.getOrderstatus(),InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(),"1");
|
|
|
+ insSubOrderUpdateDetailService.insertData(iac, iac.getOrderstatus(), InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(), "1");
|
|
|
iac.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
InsOrders order = insOrdersService.getById(iac.getOrderno());
|
|
|
if (StringUtils.toInt(order.getOrderstatus()) < StringUtils.toInt(iac.getOrderstatus())) {
|
|
|
@@ -839,7 +836,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
for (PremiumResp.DataDTO.CiInsureDemandDTO ciInsureDemandDTO : ciInsureDemandDTOS) {
|
|
|
if (GuoRenRiskCode.R_0507.getCode().equals(ciInsureDemandDTO.getRiskCode())) {
|
|
|
quoteRespVo.setJqClaims(ciInsureDemandDTO.getClaimTimes());
|
|
|
- }else if(GuoRenRiskCode.R_0518.getCode().equals(ciInsureDemandDTO.getRiskCode())){
|
|
|
+ } else if (GuoRenRiskCode.R_0518.getCode().equals(ciInsureDemandDTO.getRiskCode())) {
|
|
|
quoteRespVo.setSyClaims(ciInsureDemandDTO.getClaimTimes());
|
|
|
}
|
|
|
}
|
|
|
@@ -1094,7 +1091,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
//构造请求参数
|
|
|
PremiumReq req = PremiumReq.buildQuoteParam(yaQuoteInfoVo, carPriceResult, vinQ, isNoCar, specialAgreementVo, noCarPremium, goodsCode);
|
|
|
PremiumResp resp;
|
|
|
-
|
|
|
+ int a = 0;
|
|
|
for (; ; ) {
|
|
|
resp = guorenRequestApiComponent.request(req, PlatformInterfaceCode.API_IIRBT00004, PremiumResp.class);
|
|
|
req.getCi().getPrpTmain().setAnswer(null);
|
|
|
@@ -1102,19 +1099,26 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
//1、 交强险重复投保 替换时间
|
|
|
boo = GuorenDuplicateInsuranceComponent.processor(resp, requestInfoList, req);
|
|
|
if (boo) {
|
|
|
+ a++;
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
boo = GuorenDuplicateInsuranceComponent.theCheckCodeIsWrong(resp);
|
|
|
if (boo) {
|
|
|
+ a++;
|
|
|
continue;
|
|
|
}
|
|
|
//2、 转保
|
|
|
boo = GuorenDuplicateInsuranceComponent.buildCheckCodeParam(resp, requestInfoList, req);
|
|
|
if (boo) {
|
|
|
+ a++;
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
+ if (a > 6) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
@@ -1224,11 +1228,11 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
// 支付
|
|
|
if (updateFlag) {
|
|
|
//设置支付时间
|
|
|
- if(iac.getPayDate()==null){
|
|
|
+ if (iac.getPayDate() == null) {
|
|
|
iac.setPayDate(LocalDateTime.now());
|
|
|
}
|
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(iac,iac.getOrderstatus(),InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(),"1");
|
|
|
+ insSubOrderUpdateDetailService.insertData(iac, iac.getOrderstatus(), InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(), "1");
|
|
|
iac.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
guorenRequestApiComponent.queryNoCarPolicyNo(iac);
|
|
|
insAreaCompanyService.updateCompanyAndOrdersNew(iac);
|
|
|
@@ -1241,11 +1245,11 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
public boolean cancelOrder(InsAreaCompany insAreaCompany) {
|
|
|
String jqapplyno = insAreaCompany.getJqapplyno();
|
|
|
List<String> list = new ArrayList<>();
|
|
|
- if(StringUtils.isNotEmpty(jqapplyno)){
|
|
|
+ if (StringUtils.isNotEmpty(jqapplyno)) {
|
|
|
list.add(jqapplyno);
|
|
|
}
|
|
|
String syapplyno = insAreaCompany.getSyapplyno();
|
|
|
- if(StringUtils.isNotEmpty(syapplyno)){
|
|
|
+ if (StringUtils.isNotEmpty(syapplyno)) {
|
|
|
list.add(syapplyno);
|
|
|
}
|
|
|
|