|
@@ -134,6 +134,9 @@ public class UnifyOrderManager {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
OrgClient orgClient;
|
|
OrgClient orgClient;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ AgreementCacheService agreementCacheService;
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
InsOrdersPolicyService insOrdersPolicyService;
|
|
InsOrdersPolicyService insOrdersPolicyService;
|
|
|
|
|
|
|
@@ -268,12 +271,7 @@ public class UnifyOrderManager {
|
|
|
AssertionUtils.isFail(esmInsCompanyHttpResult.getCode() != 200, esmInsCompanyHttpResult.getMsg());
|
|
AssertionUtils.isFail(esmInsCompanyHttpResult.getCode() != 200, esmInsCompanyHttpResult.getMsg());
|
|
|
String companyName = CompanyConstants.getCompanyNameByCode(esmInsCompanyHttpResult.getData().getCompanyCode());
|
|
String companyName = CompanyConstants.getCompanyNameByCode(esmInsCompanyHttpResult.getData().getCompanyCode());
|
|
|
|
|
|
|
|
- log.info("查询保司配置的协议:systemCode=[{}],companyId=[{}]", systemCode, esmInsCompanyHttpResult.getData().getId());
|
|
|
|
|
- HttpResult<List<PtlAgreement>> byCompanyId = orgClient.getByCompanyId(esmInsCompanyHttpResult.getData().getId(), systemCode);
|
|
|
|
|
- if (CollUtil.isEmpty(byCompanyId.getData())) {
|
|
|
|
|
- AssertionUtils.isFail(true, "保司未配置协议");
|
|
|
|
|
- }
|
|
|
|
|
- PtlAgreement ptlAgreement = byCompanyId.getData().stream().filter(x -> x.getId().equals(quoteVo.getOrder().getAgreementId())).findFirst().orElse(null);
|
|
|
|
|
|
|
+ PtlAgreement ptlAgreement = agreementCacheService.getByAgreementId(quoteVo.getOrder().getAgreementId());
|
|
|
if (Objects.isNull(ptlAgreement)) {
|
|
if (Objects.isNull(ptlAgreement)) {
|
|
|
log.info("协议不存在。quoteVo.getOrder().getAgreementId()=[{}]", quoteVo.getOrder().getAgreementId());
|
|
log.info("协议不存在。quoteVo.getOrder().getAgreementId()=[{}]", quoteVo.getOrder().getAgreementId());
|
|
|
throw new SystemException("当前无调度协议配置,无法确认协议");
|
|
throw new SystemException("当前无调度协议配置,无法确认协议");
|
|
@@ -857,8 +855,8 @@ public class UnifyOrderManager {
|
|
|
String systemCode = getSystemCode();
|
|
String systemCode = getSystemCode();
|
|
|
|
|
|
|
|
//先默认第一个协议
|
|
//先默认第一个协议
|
|
|
- HttpResult<List<PtlAgreement>> byCompanyId = orgClient.getByCompanyId(insOrders.getCompanyId(), systemCode);
|
|
|
|
|
- if (byCompanyId.getData().isEmpty()) {
|
|
|
|
|
|
|
+ List<PtlAgreement> byCompanyId = agreementCacheService.getByCompanyId(insOrders.getCompanyId(), systemCode);
|
|
|
|
|
+ if (CollUtil.isEmpty(byCompanyId)) {
|
|
|
AssertionUtils.isFail(true, "保司未配置协议");
|
|
AssertionUtils.isFail(true, "保司未配置协议");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -892,8 +890,8 @@ public class UnifyOrderManager {
|
|
|
String systemCode = getSystemCode();
|
|
String systemCode = getSystemCode();
|
|
|
|
|
|
|
|
//先默认第一个协议
|
|
//先默认第一个协议
|
|
|
- HttpResult<List<PtlAgreement>> byCompanyId = orgClient.getByCompanyId(insOrders.getCompanyId(), systemCode);
|
|
|
|
|
- if (byCompanyId.getData().isEmpty()) {
|
|
|
|
|
|
|
+ List<PtlAgreement> byCompanyId = agreementCacheService.getByCompanyId(insOrders.getCompanyId(), systemCode);
|
|
|
|
|
+ if (CollUtil.isEmpty(byCompanyId)) {
|
|
|
AssertionUtils.isFail(true, "保司未配置协议");
|
|
AssertionUtils.isFail(true, "保司未配置协议");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -920,7 +918,7 @@ public class UnifyOrderManager {
|
|
|
clauseDataVo.getOrder().setInsuranceCompanyId(esmInsCompanyHttpResult.getData().getId());
|
|
clauseDataVo.getOrder().setInsuranceCompanyId(esmInsCompanyHttpResult.getData().getId());
|
|
|
clauseDataVo.getOrder().setInsuranceCompanyCode(esmInsCompanyHttpResult.getData().getCompanyCode());
|
|
clauseDataVo.getOrder().setInsuranceCompanyCode(esmInsCompanyHttpResult.getData().getCompanyCode());
|
|
|
clauseDataVo.getOrder().setApiType(Integer.parseInt(insOrders.getApiType()));
|
|
clauseDataVo.getOrder().setApiType(Integer.parseInt(insOrders.getApiType()));
|
|
|
- clauseDataVo.getOrder().setAgreementId(byCompanyId.getData().get(0).getId());
|
|
|
|
|
|
|
+ clauseDataVo.getOrder().setAgreementId(byCompanyId.get(0).getId());
|
|
|
QuotationBaseService quoteService = companyFactory.getClauseDataService(clauseDataVo);
|
|
QuotationBaseService quoteService = companyFactory.getClauseDataService(clauseDataVo);
|
|
|
quoteService.queryClauseData(clauseDataVo);
|
|
quoteService.queryClauseData(clauseDataVo);
|
|
|
|
|
|