Commit cdf56385 authored by huyuchen's avatar huyuchen

huych-商险替换详情替换人展示问题修复

parent ad6a7554
...@@ -950,6 +950,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -950,6 +950,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//被替换人 //被替换人
TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda() TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, insuranceDetailVO.getId()) .eq(TInsuranceReplace::getToInsuranceDetailId, insuranceDetailVO.getId())
//huyc-代码优化,取替换状态为成功的那一条数据
.eq(TInsuranceReplace::getReplaceStatus, CommonConstants.ONE_INT)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(one).isPresent()) { if (Optional.ofNullable(one).isPresent()) {
TInsuranceDetail byId = this.getById(one.getFromInsuranceDetailId()); TInsuranceDetail byId = this.getById(one.getFromInsuranceDetailId());
...@@ -973,6 +975,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -973,6 +975,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//替换人 //替换人
TInsuranceReplace replace = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda() TInsuranceReplace replace = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getFromInsuranceDetailId, insuranceDetailVO.getId()) .eq(TInsuranceReplace::getFromInsuranceDetailId, insuranceDetailVO.getId())
//huyc-代码优化,取替换状态为成功的那一条数据
.eq(TInsuranceReplace::getReplaceStatus, CommonConstants.ONE_INT)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(replace).isPresent()) { if (Optional.ofNullable(replace).isPresent()) {
TInsuranceDetail replaceById = this.getById(replace.getToInsuranceDetailId()); TInsuranceDetail replaceById = this.getById(replace.getToInsuranceDetailId());
...@@ -1437,6 +1441,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1437,6 +1441,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setIsEffect(null); detail.setIsEffect(null);
one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda() one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, detail.getId()) .eq(TInsuranceReplace::getToInsuranceDetailId, detail.getId())
//huyc-代码优化,取替换状态为成功的那一条数据
.eq(TInsuranceReplace::getReplaceStatus, CommonConstants.ONE_INT)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(one).isPresent()){ if (Optional.ofNullable(one).isPresent()){
//替换记录变为失败 //替换记录变为失败
...@@ -1726,6 +1732,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1726,6 +1732,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//查找被替换人信息 //查找被替换人信息
one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda() one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, detail.getId()) .eq(TInsuranceReplace::getToInsuranceDetailId, detail.getId())
//huyc-代码优化,取替换状态为成功的那一条数据
.eq(TInsuranceReplace::getReplaceStatus, CommonConstants.ONE_INT)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(one).isPresent()) { if (Optional.ofNullable(one).isPresent()) {
byId = this.getById(one.getFromInsuranceDetailId()); byId = this.getById(one.getFromInsuranceDetailId());
......
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