Commit a5f7258e by jianan

新单跟进同步预约信息6

parent 444adf7b
...@@ -152,6 +152,9 @@ public class PolicyFollowDto implements Serializable { ...@@ -152,6 +152,9 @@ public class PolicyFollowDto implements Serializable {
@Schema(description = "对账公司") @Schema(description = "对账公司")
private String reconciliationCompany; private String reconciliationCompany;
@Schema(description = "对账公司编码")
private String reconciliationCode;
@Schema(description = "对账公司业务id") @Schema(description = "对账公司业务id")
private String reconciliationCompanyBizId; private String reconciliationCompanyBizId;
......
...@@ -241,6 +241,11 @@ public class PolicyFollow implements Serializable { ...@@ -241,6 +241,11 @@ public class PolicyFollow implements Serializable {
private String reconciliationCompany; private String reconciliationCompany;
/** /**
* 对账公司编码
*/
private String reconciliationCompanyCode;
/**
* 对账公司业务id * 对账公司业务id
*/ */
private String reconciliationCompanyBizId; private String reconciliationCompanyBizId;
......
...@@ -89,6 +89,8 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol ...@@ -89,6 +89,8 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
private FnaService fnaService; private FnaService fnaService;
@Resource @Resource
private ApiInsuranceReconciliationCompanyFeignClient apiInsuranceReconciliationCompanyFeignClient; private ApiInsuranceReconciliationCompanyFeignClient apiInsuranceReconciliationCompanyFeignClient;
@Resource
private CustomerService customerService;
@Override @Override
...@@ -199,6 +201,9 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol ...@@ -199,6 +201,9 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
// 复制属性,排除系统字段 // 复制属性,排除系统字段
BeanUtils.copyProperties(policyFollowDto, policyFollow, "id", "policyBizId", "brokerList"); BeanUtils.copyProperties(policyFollowDto, policyFollow, "id", "policyBizId", "brokerList");
if (StringUtils.isNotBlank(policyFollowDto.getReconciliationCode())) {
policyFollow.setReconciliationCompanyCode(policyFollowDto.getReconciliationCode());
}
// 检查保单号是否从空变为有值 // 检查保单号是否从空变为有值
String oldPolicyNo = policyFollow.getPolicyNo(); String oldPolicyNo = policyFollow.getPolicyNo();
...@@ -493,6 +498,7 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol ...@@ -493,6 +498,7 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
policy.setPaymentTerm(policyFollow.getIssueNumber()); policy.setPaymentTerm(policyFollow.getIssueNumber());
policy.setUnderwritingDate(changePolicyFollowStatusRequest.getUnderwritingDate()); policy.setUnderwritingDate(changePolicyFollowStatusRequest.getUnderwritingDate());
policy.setEffectiveDate(changePolicyFollowStatusRequest.getEffectiveDate()); policy.setEffectiveDate(changePolicyFollowStatusRequest.getEffectiveDate());
policy.setPolicyHolderAge(calculatePolicyHolderAge(policyFollow.getCustomerBizId()));
if (ObjectUtils.isEmpty(policy.getInsuranceCompany()) || ObjectUtils.isEmpty(policy.getReconciliationCompanyBizId())) { if (ObjectUtils.isEmpty(policy.getInsuranceCompany()) || ObjectUtils.isEmpty(policy.getReconciliationCompanyBizId())) {
// 获取保单产品信息,填充对账公司相关字段 // 获取保单产品信息,填充对账公司相关字段
...@@ -541,6 +547,18 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol ...@@ -541,6 +547,18 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
return true; return true;
} }
private Integer calculatePolicyHolderAge(String customerBizId) {
Customer customer = customerService.getByCustomerBizId(customerBizId);
if (customer == null) {
throw new BusinessException("客户不存在");
}
if (customer.getBirthday() == null) {
throw new BusinessException("客户生日不能为空");
}
// 根据生日计算年龄
return DateUtil.ageOfNow(customer.getBirthday());
}
/** /**
* 调用对账公司 feignclient,查询对账公司编码 * 调用对账公司 feignclient,查询对账公司编码
*/ */
......
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