|
@@ -169,7 +169,8 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
|
|
|
public AgreementVo isExistById(String id) {
|
|
public AgreementVo isExistById(String id) {
|
|
|
AgreementVo agreementVo = baseMapper.queryById(id);
|
|
AgreementVo agreementVo = baseMapper.queryById(id);
|
|
|
if (ObjectUtils.isEmpty(agreementVo)) {
|
|
if (ObjectUtils.isEmpty(agreementVo)) {
|
|
|
- throw new SystemException("协议id不存在!");
|
|
|
|
|
|
|
+ log.info("协议id不存在:id=[{}]",id);
|
|
|
|
|
+ throw new SystemException("协议id不存在!id=" + id);
|
|
|
}
|
|
}
|
|
|
return agreementVo;
|
|
return agreementVo;
|
|
|
}
|
|
}
|
|
@@ -197,7 +198,7 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
|
|
|
|
|
|
|
|
// 获取保险公司信息
|
|
// 获取保险公司信息
|
|
|
HttpResult<EsmInsCompany> result = companyClient.findById(param.getCompanyId());
|
|
HttpResult<EsmInsCompany> result = companyClient.findById(param.getCompanyId());
|
|
|
- String companyCode = "";
|
|
|
|
|
|
|
+ String companyCode;
|
|
|
if(result.getCode() == 200 && Objects.nonNull(result.getData())){
|
|
if(result.getCode() == 200 && Objects.nonNull(result.getData())){
|
|
|
companyCode = result.getData().getCompanyCode();
|
|
companyCode = result.getData().getCompanyCode();
|
|
|
}else{
|
|
}else{
|
|
@@ -288,7 +289,7 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
|
|
|
agreementCostService.removeByIds(costIds);
|
|
agreementCostService.removeByIds(costIds);
|
|
|
|
|
|
|
|
// 删除费用关联的规则
|
|
// 删除费用关联的规则
|
|
|
- if(costIds.size() > 0) {
|
|
|
|
|
|
|
+ if(!costIds.isEmpty()) {
|
|
|
agreementCostRuleService.remove(new LambdaQueryWrapper<PtlAgreementCostRule>()
|
|
agreementCostRuleService.remove(new LambdaQueryWrapper<PtlAgreementCostRule>()
|
|
|
.in(PtlAgreementCostRule::getPtlAgreementCostId, costIds));
|
|
.in(PtlAgreementCostRule::getPtlAgreementCostId, costIds));
|
|
|
}
|
|
}
|
|
@@ -364,8 +365,7 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
|
|
|
costGroup.put(ptlAgreementCost.getCoverRuleId(), costGroupList);
|
|
costGroup.put(ptlAgreementCost.getCoverRuleId(), costGroupList);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- /** 复制承保规则和费用 **/
|
|
|
|
|
|
|
+ // 复制承保规则和费用
|
|
|
this.copyRuleAndCost(costGroup,costIds,costList,newAgreement);
|
|
this.copyRuleAndCost(costGroup,costIds,costList,newAgreement);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -404,8 +404,7 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
|
|
|
Collectors.groupingBy(PtlAgreementCostType::getPtlAgreementCostId));
|
|
Collectors.groupingBy(PtlAgreementCostType::getPtlAgreementCostId));
|
|
|
|
|
|
|
|
costGroup.forEach((key, value) -> {
|
|
costGroup.forEach((key, value) -> {
|
|
|
-
|
|
|
|
|
- /** 1-承保规则复制 **/
|
|
|
|
|
|
|
+ //1-承保规则复制
|
|
|
PtlAgreementUndwrtRules agreementUndwrtRules = rulesMap.get(key);
|
|
PtlAgreementUndwrtRules agreementUndwrtRules = rulesMap.get(key);
|
|
|
PtlAgreementUndwrtRules newAgreementUndwrtRules = new PtlAgreementUndwrtRules();
|
|
PtlAgreementUndwrtRules newAgreementUndwrtRules = new PtlAgreementUndwrtRules();
|
|
|
BeanUtils.copyProperties(agreementUndwrtRules,newAgreementUndwrtRules);
|
|
BeanUtils.copyProperties(agreementUndwrtRules,newAgreementUndwrtRules);
|
|
@@ -431,7 +430,7 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
|
|
|
agreementUndwrtRulesAttrLinkService.saveBatch(links);
|
|
agreementUndwrtRulesAttrLinkService.saveBatch(links);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /** 2-费用复制 **/
|
|
|
|
|
|
|
+ // 2-费用复制
|
|
|
List<PtlAgreementCost> agreementCostList = costGroup.get(key);
|
|
List<PtlAgreementCost> agreementCostList = costGroup.get(key);
|
|
|
if(CollUtil.isNotEmpty(agreementCostList)) {
|
|
if(CollUtil.isNotEmpty(agreementCostList)) {
|
|
|
agreementCostList.forEach(agreementCost -> {
|
|
agreementCostList.forEach(agreementCost -> {
|
|
@@ -469,7 +468,7 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
|
|
|
|
|
|
|
|
// 获取保险公司信息
|
|
// 获取保险公司信息
|
|
|
HttpResult<EsmInsCompany> result = companyClient.findById(param.getCompanyId());
|
|
HttpResult<EsmInsCompany> result = companyClient.findById(param.getCompanyId());
|
|
|
- String companyCode = "";
|
|
|
|
|
|
|
+ String companyCode;
|
|
|
if(result.getCode() == 200 && Objects.nonNull(result.getData())){
|
|
if(result.getCode() == 200 && Objects.nonNull(result.getData())){
|
|
|
companyCode = result.getData().getCompanyCode();
|
|
companyCode = result.getData().getCompanyCode();
|
|
|
}else{
|
|
}else{
|