Commit 29cf6630 by jianan

新单跟进v2

parent 45bcdfef
...@@ -627,25 +627,30 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -627,25 +627,30 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//待签单 //待签单
follow.setStatus(PolicyFollowStatusEnum.PENDING_SIGN.getItemValue()); follow.setStatus(PolicyFollowStatusEnum.PENDING_SIGN.getItemValue());
follow.setNextStatusList(policyFollowService.getNextStatus(PolicyFollowStatusEnum.PENDING_SIGN)); follow.setNextStatusList(policyFollowService.getNextStatus(PolicyFollowStatusEnum.PENDING_SIGN));
//TODO 保险公司业务id
// follow.setInsurerBizId(); // 从预约信息获取备注
//TODO 期交保费 if (appointment.getRemark() != null) {
// follow.setPaymentPremium(); 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) { if (apiPolicyholderInfoDto != null) {
follow.setPolicyHolder(apiPolicyholderInfoDto.getNameCn()); follow.setPolicyHolder(apiPolicyholderInfoDto.getNameCn());
} }
//TODO 预缴年期
// follow.setPrepaidTerm();
//TODO 产品类别
// follow.setProductCate();
//TODO 对账公司
// follow.setReconciliationCompany();
//TODO 对账公司业务id
// follow.setReconciliationCompanyBizId();
//TODO 续保日期
// follow.setRenewalDate();
// 受保人信息
if (!Objects.isNull(apiInsurantInfoDto)) { if (!Objects.isNull(apiInsurantInfoDto)) {
// 受保人 // 受保人
follow.setInsured(apiInsurantInfoDto.getNameCn()); follow.setInsured(apiInsurantInfoDto.getNameCn());
...@@ -653,40 +658,84 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -653,40 +658,84 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
if ("MYSELF".equals(apiInsurantInfoDto.getPolicyholderRel())) { if ("MYSELF".equals(apiInsurantInfoDto.getPolicyholderRel())) {
follow.setInsured(follow.getPolicyHolder()); 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)) { 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()); follow.setPolicyCurrency(apiProductPlanMainInfoDto.getPolicyCurrency());
//生效日期 // 供款年期
// if (!Objects.isNull(apiProductPlanMainInfoDto.getPolicyEffectiveDate())) { if (apiProductPlanMainInfoDto.getIssueNumber() != null) {
// follow.setEffectiveDate(Date.from(apiProductPlanMainInfoDto.getPolicyEffectiveDate().atZone(ZoneId.systemDefault()).toInstant())); 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.setInitialPremium(apiProductPlanMainInfoDto.getEachIssuePremium());
//保险公司 // 是否预缴
follow.setInsuranceCompany(apiProductPlanMainInfoDto.getCompanyName()); follow.setIsPrepay(apiProductPlanMainInfoDto.getIsPrepay());
//产品名称 // 是否追溯
follow.setProductName(apiProductPlanMainInfoDto.getProductLaunchMainName()); 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); policyFollowService.saveOrUpdate(follow);
// 同步保存保单(产品计划) // // 同步保存保单(产品计划)
savePolicy(productPlan, apiPolicyholderInfoDto, apiInsurantInfoDto, apiProductPlanMainInfoDto, policyBizId, policyTransfer); // savePolicy(productPlan, apiPolicyholderInfoDto, apiInsurantInfoDto, apiProductPlanMainInfoDto, policyBizId, policyTransfer);
// 同步保存保单产品计划附加险 // // 同步保存保单产品计划附加险
savePolicyAdditional(apiProductPlanAdditionalInfoDtoList, policyBizId); // savePolicyAdditional(apiProductPlanAdditionalInfoDtoList, policyBizId);
// 同步保存保单投保人 // // 同步保存保单投保人
savePolicyPolicyholder(apiPolicyholderInfoDto, policyBizId); // savePolicyPolicyholder(apiPolicyholderInfoDto, policyBizId);
// 同步保存保单受保人 // // 同步保存保单受保人
savePolicyInsurant(apiInsurantInfoDto, policyBizId); // savePolicyInsurant(apiInsurantInfoDto, policyBizId);
// 同步保存保单受益人 // // 同步保存保单受益人
savePolicyBeneficiary(apiBeneficiaryInfoDtoList, policyBizId); // savePolicyBeneficiary(apiBeneficiaryInfoDtoList, policyBizId);
// 同步保存保单第二持有人 // // 同步保存保单第二持有人
savePolicySecondHolder(apiSecondHolderInfoDto, policyBizId); // savePolicySecondHolder(apiSecondHolderInfoDto, policyBizId);
// 同步问卷信息 // // 同步问卷信息
savePolicyQuestionnaire(appointment.getAppointmentBizId(), policyBizId); // savePolicyQuestionnaire(appointment.getAppointmentBizId(), policyBizId);
return Result.success(); 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