Commit 88b0ab3b by zhangxingmin

Merge remote-tracking branch 'origin/test' into test

parents 069c7ae1 29cf6630
......@@ -627,25 +627,30 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//待签单
follow.setStatus(PolicyFollowStatusEnum.PENDING_SIGN.getItemValue());
follow.setNextStatusList(policyFollowService.getNextStatus(PolicyFollowStatusEnum.PENDING_SIGN));
//TODO 保险公司业务id
// follow.setInsurerBizId();
//TODO 期交保费
// follow.setPaymentPremium();
// 从预约信息获取备注
if (appointment.getRemark() != null) {
follow.setRemark(appointment.getRemark());
}
// 从预约信息获取签单日期
if (appointment.getSignDate() != null) {
follow.setSignDate(Date.from(appointment.getSignDate().atZone(ZoneId.systemDefault()).toInstant()));
}
// 从预约信息获取签单地点(优先使用签单地址,否则使用会面地点)
if (appointment.getSigningAddress() != null) {
follow.setSignLocation(appointment.getSigningAddress());
} else if (appointment.getMeetingPoint() != null) {
follow.setSignLocation(appointment.getMeetingPoint());
}
// 保單持有人
if (apiPolicyholderInfoDto != null) {
follow.setPolicyHolder(apiPolicyholderInfoDto.getNameCn());
}
//TODO 预缴年期
// follow.setPrepaidTerm();
//TODO 产品类别
// follow.setProductCate();
//TODO 对账公司
// follow.setReconciliationCompany();
//TODO 对账公司业务id
// follow.setReconciliationCompanyBizId();
//TODO 续保日期
// follow.setRenewalDate();
// 受保人信息
if (!Objects.isNull(apiInsurantInfoDto)) {
// 受保人
follow.setInsured(apiInsurantInfoDto.getNameCn());
......@@ -653,40 +658,84 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
if ("MYSELF".equals(apiInsurantInfoDto.getPolicyholderRel())) {
follow.setInsured(follow.getPolicyHolder());
}
// 受保人年龄
if (apiInsurantInfoDto.getAge() != null) {
follow.setInsuredAge(Integer.valueOf(apiInsurantInfoDto.getAge()));
}
}
// 从签单员列表获取第一个签单人信息
if (response.getApiAppointmentInfoDto() != null
&& response.getApiAppointmentInfoDto().getUserSignDtoList() != null
&& !response.getApiAppointmentInfoDto().getUserSignDtoList().isEmpty()) {
ApiAppointmentUserSignDto firstSigner = response.getApiAppointmentInfoDto().getUserSignDtoList().get(0);
follow.setSigner(firstSigner.getName());
follow.setSignerBizId(firstSigner.getUserBizId());
follow.setSignerRegNo(firstSigner.getPracticeCode());
}
// 产品计划信息
if (!Objects.isNull(apiProductPlanMainInfoDto)) {
//币种
// 产品上架信息表唯一业务ID
follow.setProductLaunchBizId(apiProductPlanMainInfoDto.getProductLaunchBizId());
// 产品名称
follow.setProductName(apiProductPlanMainInfoDto.getProductLaunchMainName());
// 产品类别(保险险种名称)
follow.setProductCate(apiProductPlanMainInfoDto.getInsuranceTypeName());
// 保险公司
follow.setInsuranceCompany(apiProductPlanMainInfoDto.getCompanyName());
// 保险公司业务ID(从产品计划获取的公司ID)
follow.setInsuranceCompanyBizId(apiProductPlanMainInfoDto.getCompanyId());
// 币种
follow.setPolicyCurrency(apiProductPlanMainInfoDto.getPolicyCurrency());
//生效日期
// if (!Objects.isNull(apiProductPlanMainInfoDto.getPolicyEffectiveDate())) {
// follow.setEffectiveDate(Date.from(apiProductPlanMainInfoDto.getPolicyEffectiveDate().atZone(ZoneId.systemDefault()).toInstant()));
// }
//首期保费(不含徽费,预缴保费)每期保费
// 供款年期
if (apiProductPlanMainInfoDto.getIssueNumber() != null) {
follow.setIssueNumber(Integer.parseInt(apiProductPlanMainInfoDto.getIssueNumber()));
}
// 保障期限
if (apiProductPlanMainInfoDto.getGuaranteePeriod() != null) {
follow.setGuaranteePeriod(Integer.parseInt(apiProductPlanMainInfoDto.getGuaranteePeriod()));
}
// 保额(重疾险)
follow.setSumInsured(apiProductPlanMainInfoDto.getSumInsured());
// 付款频率
follow.setPaymentFrequency(apiProductPlanMainInfoDto.getPaymentFrequency());
// 每期保费
follow.setEachIssuePremium(apiProductPlanMainInfoDto.getEachIssuePremium());
// 首期保费(不含徽费,预缴保费)
follow.setInitialPremium(apiProductPlanMainInfoDto.getEachIssuePremium());
//保险公司
follow.setInsuranceCompany(apiProductPlanMainInfoDto.getCompanyName());
//产品名称
follow.setProductName(apiProductPlanMainInfoDto.getProductLaunchMainName());
// 是否预缴
follow.setIsPrepay(apiProductPlanMainInfoDto.getIsPrepay());
// 是否追溯
follow.setIsTraceable(apiProductPlanMainInfoDto.getIsTraceable());
// 是否参加递增保障权益
follow.setIsJoin(apiProductPlanMainInfoDto.getIsJoin());
// 首期付款方式
follow.setInitialPaymentMethod(apiProductPlanMainInfoDto.getInitialPaymentMethod());
// 续期付款方式
follow.setRenewalPaymentMethod(apiProductPlanMainInfoDto.getRenewalPaymentMethod());
// 保单征费
if (apiProductPlanMainInfoDto.getPolicyLevy() != null) {
follow.setPolicyLevy(apiProductPlanMainInfoDto.getPolicyLevy().toString());
}
}
policyFollowService.saveOrUpdate(follow);
// 同步保存保单(产品计划)
savePolicy(productPlan, apiPolicyholderInfoDto, apiInsurantInfoDto, apiProductPlanMainInfoDto, policyBizId, policyTransfer);
// 同步保存保单产品计划附加险
savePolicyAdditional(apiProductPlanAdditionalInfoDtoList, policyBizId);
// 同步保存保单投保人
savePolicyPolicyholder(apiPolicyholderInfoDto, policyBizId);
// 同步保存保单受保人
savePolicyInsurant(apiInsurantInfoDto, policyBizId);
// 同步保存保单受益人
savePolicyBeneficiary(apiBeneficiaryInfoDtoList, policyBizId);
// 同步保存保单第二持有人
savePolicySecondHolder(apiSecondHolderInfoDto, policyBizId);
// 同步问卷信息
savePolicyQuestionnaire(appointment.getAppointmentBizId(), policyBizId);
// // 同步保存保单(产品计划)
// savePolicy(productPlan, apiPolicyholderInfoDto, apiInsurantInfoDto, apiProductPlanMainInfoDto, policyBizId, policyTransfer);
// // 同步保存保单产品计划附加险
// savePolicyAdditional(apiProductPlanAdditionalInfoDtoList, policyBizId);
// // 同步保存保单投保人
// savePolicyPolicyholder(apiPolicyholderInfoDto, policyBizId);
// // 同步保存保单受保人
// savePolicyInsurant(apiInsurantInfoDto, policyBizId);
// // 同步保存保单受益人
// savePolicyBeneficiary(apiBeneficiaryInfoDtoList, policyBizId);
// // 同步保存保单第二持有人
// savePolicySecondHolder(apiSecondHolderInfoDto, policyBizId);
// // 同步问卷信息
// savePolicyQuestionnaire(appointment.getAppointmentBizId(), policyBizId);
return Result.success();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment