|
@@ -119,8 +119,7 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
|
|
|
ptlAgreement.setCreateTime(LocalDateTime.now());
|
|
ptlAgreement.setCreateTime(LocalDateTime.now());
|
|
|
save(ptlAgreement);
|
|
save(ptlAgreement);
|
|
|
// 产品费用
|
|
// 产品费用
|
|
|
- String insuranceCompanyId = esmInsCompany.getId();
|
|
|
|
|
- proxyObject.saveAssociationInformation(ptlAgreement.getId(), insuranceCompanyId, agreement);
|
|
|
|
|
|
|
+ proxyObject.saveAssociationInformation(ptlAgreement.getId(), esmInsCompany, agreement);
|
|
|
return HttpResult.ok("添加成功");
|
|
return HttpResult.ok("添加成功");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -189,19 +188,21 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
|
|
|
// 关联表都是先删除后添加
|
|
// 关联表都是先删除后添加
|
|
|
proxyObject.deleteAssociationInformation(agreementId);
|
|
proxyObject.deleteAssociationInformation(agreementId);
|
|
|
|
|
|
|
|
- String insuranceCompanyId = esmInsCompany.getId();
|
|
|
|
|
- proxyObject.saveAssociationInformation(agreementId, insuranceCompanyId, agreement);
|
|
|
|
|
|
|
+ proxyObject.saveAssociationInformation(agreementId, esmInsCompany, agreement);
|
|
|
return HttpResult.ok("修改成功");
|
|
return HttpResult.ok("修改成功");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public void saveAssociationInformation(String agreementId, String insuranceCompanyId, PtlAgreementSaveVo agreement) {
|
|
|
|
|
|
|
+ public void saveAssociationInformation(String agreementId, EsmInsCompany esmInsCompany, PtlAgreementSaveVo agreement) {
|
|
|
// 产品费用
|
|
// 产品费用
|
|
|
ptlAgreementProductCostsService.saveBatchProductCosts(agreementId, agreement.getScheme());
|
|
ptlAgreementProductCostsService.saveBatchProductCosts(agreementId, agreement.getScheme());
|
|
|
// 承包规则
|
|
// 承包规则
|
|
|
ptlAgreementUnderwritingRulesService.saveBatchUnderwritingRules(agreementId, agreement.getUnderwritingRules());
|
|
ptlAgreementUnderwritingRulesService.saveBatchUnderwritingRules(agreementId, agreement.getUnderwritingRules());
|
|
|
// 账号添加
|
|
// 账号添加
|
|
|
- ptlAgreementAttributionService.saveAttribution(agreementId, insuranceCompanyId, agreement.getAttribution());
|
|
|
|
|
|
|
+ PtlAgreementAttributionDto attribution = agreement.getAttribution();
|
|
|
|
|
+ if(StringUtils.isNotEmpty(attribution.getTemplateId())){
|
|
|
|
|
+ ptlAgreementAttributionService.saveAttribution(agreementId, esmInsCompany, agreement.getAttribution());
|
|
|
|
|
+ }
|
|
|
// 部门授权
|
|
// 部门授权
|
|
|
ptlAgreementDeptService.saveBatchDept(agreementId, agreement.getDept());
|
|
ptlAgreementDeptService.saveBatchDept(agreementId, agreement.getDept());
|
|
|
}
|
|
}
|