|
@@ -26,6 +26,7 @@ import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
|
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
|
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
|
|
|
import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
|
|
import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
|
|
|
|
|
+import com.ydtech.modules.order.entity.vo.SpecialAuditVo;
|
|
|
import com.ydtech.modules.order.entity.vo.zj.ZjVehicleProductsQueryVo;
|
|
import com.ydtech.modules.order.entity.vo.zj.ZjVehicleProductsQueryVo;
|
|
|
import com.ydtech.modules.order.entity.vo.zj.ZjVehicleProductsVo;
|
|
import com.ydtech.modules.order.entity.vo.zj.ZjVehicleProductsVo;
|
|
|
import com.ydtech.modules.order.service.InsAreaCompanyService;
|
|
import com.ydtech.modules.order.service.InsAreaCompanyService;
|
|
@@ -39,6 +40,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.http.HttpHeaders;
|
|
import org.springframework.http.HttpHeaders;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
+import java.io.Serializable;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -81,7 +83,6 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
|
|
|
QueryVehicProductsRequest queryVehicProductsRequest = new QueryVehicProductsRequest(zjVehicleProductsQueryVo.getSeatCount(), zjConfigureParameters.getAppKey(), zjConfigureParameters.getProposalCityCode());
|
|
QueryVehicProductsRequest queryVehicProductsRequest = new QueryVehicProductsRequest(zjVehicleProductsQueryVo.getSeatCount(), zjConfigureParameters.getAppKey(), zjConfigureParameters.getProposalCityCode());
|
|
|
QueryVehicProductsResponse queryVehicProductsResponse = zijinRequestApiComponents.queryVehicleProducts(queryVehicProductsRequest, httpHeaders);
|
|
QueryVehicProductsResponse queryVehicProductsResponse = zijinRequestApiComponents.queryVehicleProducts(queryVehicProductsRequest, httpHeaders);
|
|
|
return HttpResult.ok(ZjVehicleProductsVo.toZjVehicleProductsVoList(queryVehicProductsResponse.getProductDtoList()));
|
|
return HttpResult.ok(ZjVehicleProductsVo.toZjVehicleProductsVoList(queryVehicProductsResponse.getProductDtoList()));
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -128,45 +129,55 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public HttpResult<Object> audit(String companyId) {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ public HttpResult<List<QueryClauseDataResponse.ClauseInfoDtoListDTO>> queryClauseData(String companyId) {
|
|
|
InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
|
|
InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
|
|
|
- InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
|
|
|
-
|
|
|
|
|
- // 1 通过 协议id获取配置实体
|
|
|
|
|
- PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
|
|
|
|
|
- ZjConfigureParameters zjConfigureParameters = configureParametersComponents.toEntity(ZjConfigureParameters.class, ptlAgreementAttribution);
|
|
|
|
|
- HttpHeaders httpHeaders = zijinRequestApiComponents.getHttpHeaders(zjConfigureParameters, ZijinRequestApiComponents.RECURSIVE_HIERARCHY);
|
|
|
|
|
|
|
+ HttpHeaders httpHeaders = zijinRequestApiComponents.getHttpHeaders(insAreaCompany.getAgreementId());
|
|
|
|
|
+ List<QueryClauseDataResponse.ClauseInfoDtoListDTO> clauseInfoDtoList = new ArrayList<>();
|
|
|
|
|
|
|
|
// 2 查询特约
|
|
// 2 查询特约
|
|
|
QueryClauseDataRequest queryClauseDataRequest = new QueryClauseDataRequest();
|
|
QueryClauseDataRequest queryClauseDataRequest = new QueryClauseDataRequest();
|
|
|
queryClauseDataRequest.setOrderId(insAreaCompany.getInsOrderNo());
|
|
queryClauseDataRequest.setOrderId(insAreaCompany.getInsOrderNo());
|
|
|
if (insAreaCompany.getJqpremium().intValue() != 0) {
|
|
if (insAreaCompany.getJqpremium().intValue() != 0) {
|
|
|
queryClauseDataRequest.setRiskCode(RiskCodeEnum.RC_0590.getCode());
|
|
queryClauseDataRequest.setRiskCode(RiskCodeEnum.RC_0590.getCode());
|
|
|
- zijinRequestApiComponents.queryClauseData(queryClauseDataRequest, httpHeaders);
|
|
|
|
|
|
|
+ QueryClauseDataResponse queryClauseDataResponse = zijinRequestApiComponents.queryClauseData(queryClauseDataRequest, httpHeaders);
|
|
|
|
|
+ clauseInfoDtoList.addAll(queryClauseDataResponse.getClauseInfoDtoList());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (insAreaCompany.getSypremium().intValue() != 0) {
|
|
if (insAreaCompany.getSypremium().intValue() != 0) {
|
|
|
queryClauseDataRequest.setRiskCode(RiskCodeEnum.RC_050A.getCode());
|
|
queryClauseDataRequest.setRiskCode(RiskCodeEnum.RC_050A.getCode());
|
|
|
- zijinRequestApiComponents.queryClauseData(queryClauseDataRequest, httpHeaders);
|
|
|
|
|
|
|
+ QueryClauseDataResponse queryClauseDataResponse = zijinRequestApiComponents.queryClauseData(queryClauseDataRequest, httpHeaders);
|
|
|
|
|
+ clauseInfoDtoList.addAll(queryClauseDataResponse.getClauseInfoDtoList());
|
|
|
}
|
|
}
|
|
|
|
|
+ return HttpResult.ok(clauseInfoDtoList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public HttpResult<Object> audit(SpecialAuditVo<SubmitVerifyRequest.EngageListDTO> specialAudit ) {
|
|
|
|
|
+
|
|
|
|
|
+ InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(specialAudit.getCompanyId());
|
|
|
|
|
+ InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
|
|
|
+
|
|
|
|
|
+ // 1 通过 协议id获取配置实体
|
|
|
|
|
+ PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
|
|
|
|
|
+ ZjConfigureParameters zjConfigureParameters = configureParametersComponents.toEntity(ZjConfigureParameters.class, ptlAgreementAttribution);
|
|
|
|
|
+ HttpHeaders httpHeaders = zijinRequestApiComponents.getHttpHeaders(zjConfigureParameters, ZijinRequestApiComponents.RECURSIVE_HIERARCHY);
|
|
|
|
|
|
|
|
- // 3 提交核保
|
|
|
|
|
|
|
+ // 2 提交核保
|
|
|
String productid = insOrders.getProductid();
|
|
String productid = insOrders.getProductid();
|
|
|
|
|
|
|
|
- SubmitVerifyRequest submitVerifyRequest = new SubmitVerifyRequest(insAreaCompany.getInsOrderNo(), insAreaCompany.getId(), productid);
|
|
|
|
|
|
|
+ SubmitVerifyRequest submitVerifyRequest = new SubmitVerifyRequest(insAreaCompany.getInsOrderNo(), insAreaCompany.getId(), productid, specialAudit.getEngageList());
|
|
|
SubmitVerifyResponse submitVerifyResponse = zijinRequestApiComponents.submitVerify(submitVerifyRequest, httpHeaders);
|
|
SubmitVerifyResponse submitVerifyResponse = zijinRequestApiComponents.submitVerify(submitVerifyRequest, httpHeaders);
|
|
|
SubmitVerifyResponse.SubmitVerifyInfoDTO submitVerifyInfo = submitVerifyResponse.getSubmitVerifyInfo();
|
|
SubmitVerifyResponse.SubmitVerifyInfoDTO submitVerifyInfo = submitVerifyResponse.getSubmitVerifyInfo();
|
|
|
|
|
|
|
|
- // 3.1 保单号
|
|
|
|
|
|
|
+ // 2.1 保单号
|
|
|
insAreaCompany.setJqpolicyno(submitVerifyInfo.getPolicyNoCI());
|
|
insAreaCompany.setJqpolicyno(submitVerifyInfo.getPolicyNoCI());
|
|
|
insAreaCompany.setSypolicyno(submitVerifyInfo.getPolicyNo());
|
|
insAreaCompany.setSypolicyno(submitVerifyInfo.getPolicyNo());
|
|
|
- // 3.2 投保单号
|
|
|
|
|
|
|
+ // 2.2 投保单号
|
|
|
insAreaCompany.setJqapplyno(submitVerifyInfo.getProposalNoCI());
|
|
insAreaCompany.setJqapplyno(submitVerifyInfo.getProposalNoCI());
|
|
|
insAreaCompany.setSyapplyno(submitVerifyInfo.getProposalNo());
|
|
insAreaCompany.setSyapplyno(submitVerifyInfo.getProposalNo());
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatus.S_2.getCode());
|
|
insAreaCompany.setOrderstatus(InsOrderStatus.S_2.getCode());
|
|
|
|
|
|
|
|
- // 3. 聚合支付服务
|
|
|
|
|
|
|
+ // 2. 聚合支付服务
|
|
|
BigDecimal multiply = insAreaCompany.getSumpremium().multiply(new BigDecimal(100));
|
|
BigDecimal multiply = insAreaCompany.getSumpremium().multiply(new BigDecimal(100));
|
|
|
ZbfAggregatePayRequest zbfAggregatePayRequest = new ZbfAggregatePayRequest(String.valueOf(multiply.intValue()), zjConfigureParameters.getAppKey(), insAreaCompany.getId());
|
|
ZbfAggregatePayRequest zbfAggregatePayRequest = new ZbfAggregatePayRequest(String.valueOf(multiply.intValue()), zjConfigureParameters.getAppKey(), insAreaCompany.getId());
|
|
|
ZbfAggregatePayResponse zbfAggregatePayResponse = zijinRequestApiComponents.zbfAggregatePay(zbfAggregatePayRequest, httpHeaders);
|
|
ZbfAggregatePayResponse zbfAggregatePayResponse = zijinRequestApiComponents.zbfAggregatePay(zbfAggregatePayRequest, httpHeaders);
|