|
|
@@ -285,11 +285,11 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- /**
|
|
|
+ /* *//**
|
|
|
* 缴费查询
|
|
|
* @param companyId 子订单号
|
|
|
* @return
|
|
|
- */
|
|
|
+ *//*
|
|
|
@Override
|
|
|
public HttpResult<Object> getPaymentUrl(String companyId) {
|
|
|
InsAreaCompany insAreaCompany = insAreaCompanyService.getByInsOrderNo(companyId);
|
|
|
@@ -301,12 +301,17 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
return HttpResult.ok(InsOrderStatusEnum.ACCEPT_INSURANCE.getDesc());
|
|
|
}
|
|
|
|
|
|
- // 2. 组装请求体
|
|
|
- HuaTaiPaymentUrlRequest orderStatusRequest = new HuaTaiPaymentUrlRequest();
|
|
|
- orderStatusRequest.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
|
|
|
- HuaTaiPaymentUrlResponse orderStatusResponse = huaTaiRequestApiComponents.getPaymentUrl(orderStatusRequest, HuaTaiPaymentUrlResponse.class);
|
|
|
- return HttpResult.ok("");
|
|
|
- }
|
|
|
+ // 2. 组装请求体 调用缴费接口获取缴费链接
|
|
|
+ HuaTaiPaymentUrlRequest huaTaiPaymentUrlRequest = new HuaTaiPaymentUrlRequest(insAreaCompany,huaTaiConfigureParameters);
|
|
|
+ huaTaiPaymentUrlRequest.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
|
|
|
+ HuaTaiPaymentUrlResponse paymentUrlResponse = huaTaiRequestApiComponents.getPaymentUrl(huaTaiPaymentUrlRequest, HuaTaiPaymentUrlResponse.class);
|
|
|
+ if(StringUtils.isNotEmpty(paymentUrlResponse.getPayUrl())){
|
|
|
+ insAreaCompany.setPaymentLink(paymentUrlResponse.getPayUrl());
|
|
|
+ }
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
+ insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
+ return HttpResult.ok("核保成功");
|
|
|
+ }*/
|
|
|
|
|
|
/**
|
|
|
*电子保单下载接口
|
|
|
@@ -319,10 +324,45 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
// 1. 协议id获取配置实体
|
|
|
HuaTaiConfigureParameters huaTaiConfigureParameters = configureParametersComponents.toEntity(HuaTaiConfigureParameters.class, insAreaCompany.getAgreementId());
|
|
|
InsOrders order = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
|
+ String policyNo;
|
|
|
+ String riskCode = policyPrintVo.getRiskCode();
|
|
|
+ if (InsuranceRisk.TRAFFIC.getCode().equals(riskCode)) {
|
|
|
+ policyNo = insAreaCompany.getJqpolicyno();
|
|
|
+ } else if (InsuranceRisk.BUSINESS.getCode().equals(riskCode)) {
|
|
|
+ policyNo = insAreaCompany.getJqpolicyno();
|
|
|
+ } else {
|
|
|
+ throw new SystemException("险种代码不存在");
|
|
|
+ }
|
|
|
|
|
|
// 2. 组装请求体
|
|
|
HuaTaiInsurancePolicyPrintRequest request = new HuaTaiInsurancePolicyPrintRequest();
|
|
|
+ request.setBusinessNo(policyNo);
|
|
|
HuaTaiInsurancePolicyPrintResponse response = huaTaiRequestApiComponents.insurancePolicyPrint(request, HuaTaiInsurancePolicyPrintResponse.class);
|
|
|
+ if("0000".equals(response.getRegistResult())){
|
|
|
+ List<String> urlList = response.getElecDownLoadResultList();
|
|
|
+ //接口文档与返回示例不一致,待联调后修改
|
|
|
+
|
|
|
+
|
|
|
+ /* if(urlList!=null && !urlList.isEmpty()){
|
|
|
+ String url = urlList.get(0);
|
|
|
+ String templateName = "";
|
|
|
+ if("DZ_AJ".equals(code)){
|
|
|
+ templateName = "-交强险标志.pdf";
|
|
|
+ }else if("DZ_AE".equals(code)){
|
|
|
+ if("0330".equals(request.getRiskCode())){
|
|
|
+ templateName = "-交强险保单.pdf";
|
|
|
+ }else {
|
|
|
+ templateName = "-商业险保单.pdf";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String transferUrl = gainCarInsPolicy(url, licensePlate + templateName, licensePlate);
|
|
|
+ List<String> transferUrlList = new ArrayList<>();
|
|
|
+ transferUrlList.add(transferUrl);
|
|
|
+ response.setDownloadUrl(transferUrlList);
|
|
|
+ }*/
|
|
|
+ }else{
|
|
|
+ return HttpResult.error("获取华泰电子保单失败:"+response.getRegistResult());
|
|
|
+ }
|
|
|
return HttpResult.ok("下载成功"/*, response.getDownloadUrl()*/);
|
|
|
}
|
|
|
|