Commit 371b5256 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.7.1' into MVP1.7.1

parents 9eb35a1d 2cca8adf
...@@ -469,6 +469,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -469,6 +469,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//保存到数据库中的结果 //保存到数据库中的结果
List<InsuranceReplaceParam> listSuccess = map.get("listSuccess"); List<InsuranceReplaceParam> listSuccess = map.get("listSuccess");
List<TInsuranceDetail> detailList = new ArrayList<>(); List<TInsuranceDetail> detailList = new ArrayList<>();
TInsuranceType insuranceType;
TInsuranceCompany insuranceCompany;
if (CollectionUtils.isNotEmpty(listSuccess)){ if (CollectionUtils.isNotEmpty(listSuccess)){
for (InsuranceReplaceParam success : listSuccess) { for (InsuranceReplaceParam success : listSuccess) {
//替换 //替换
...@@ -480,6 +482,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -480,6 +482,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setIsOverdue(null); detail.setIsOverdue(null);
detail.setUpdateTime(LocalDateTime.now()); detail.setUpdateTime(LocalDateTime.now());
this.updateById(detail); this.updateById(detail);
// 保险公司-险种-购买标准 是否存在
insuranceCompany = tInsuranceCompanyService.getOne(Wrappers.<TInsuranceCompany>query().lambda()
.eq(TInsuranceCompany::getCompanyName, detail.getInsuranceCompanyName())
.eq(TInsuranceCompany::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(insuranceCompany).isPresent()) {
insuranceType = tInsuranceTypeService.getOne(Wrappers.<TInsuranceType>query().lambda()
.eq(TInsuranceType::getName, detail.getInsuranceTypeName())
.eq(TInsuranceType::getInsuranceCompanyId, insuranceCompany.getId())
.eq(TInsuranceType::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(insuranceType).isPresent()) {
newDetail.setIsAdress(insuranceType.getIsAdress());
}
}
//新数据置为待办理 //新数据置为待办理
newDetail.setId(null); newDetail.setId(null);
newDetail.setOrderNo(orderNo); newDetail.setOrderNo(orderNo);
...@@ -1393,23 +1412,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1393,23 +1412,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceSettle settle; TInsuranceSettle settle;
SettleVo settleVo; SettleVo settleVo;
R<TIncomeDetailReturnVo> incomeDetailList; R<TIncomeDetailReturnVo> incomeDetailList;
TInsuranceCompany insuranceCompany; // TInsuranceCompany insuranceCompany;
TInsuranceType insuranceType; // TInsuranceType insuranceType;
for (TInsuranceDetail detail : successList) { for (TInsuranceDetail detail : successList) {
// 是否地市自购 // // 是否地市自购
insuranceCompany = tInsuranceCompanyService.getOne(Wrappers.<TInsuranceCompany>query().lambda() // insuranceCompany = tInsuranceCompanyService.getOne(Wrappers.<TInsuranceCompany>query().lambda()
.eq(TInsuranceCompany::getCompanyName, detail.getInsuranceCompanyName()) // .eq(TInsuranceCompany::getCompanyName, detail.getInsuranceCompanyName())
.eq(TInsuranceCompany::getDeleteFlag, CommonConstants.ZERO_INT) // .eq(TInsuranceCompany::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)); // .last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(insuranceCompany).isPresent()) { // if (Optional.ofNullable(insuranceCompany).isPresent()) {
insuranceType = tInsuranceTypeService.getOne(Wrappers.<TInsuranceType>query().lambda() // insuranceType = tInsuranceTypeService.getOne(Wrappers.<TInsuranceType>query().lambda()
.eq(TInsuranceType::getName, detail.getInsuranceTypeName()) // .eq(TInsuranceType::getName, detail.getInsuranceTypeName())
.eq(TInsuranceType::getInsuranceCompanyId, insuranceCompany.getId()) // .eq(TInsuranceType::getInsuranceCompanyId, insuranceCompany.getId())
.eq(TInsuranceType::getDeleteFlag, CommonConstants.ZERO_INT) // .eq(TInsuranceType::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL) // .last(CommonConstants.LAST_ONE_SQL)
); // );
detail.setIsAdress(insuranceType.getIsAdress()); // detail.setIsAdress(insuranceType.getIsAdress());
} // }
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){ if (StringUtils.isNotBlank(detail.getDefaultSettleId())){
settle = tInsuranceSettleService.getById(detail.getDefaultSettleId()); settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
...@@ -3440,7 +3459,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3440,7 +3459,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.last(CommonConstants.LAST_ONE_SQL) .last(CommonConstants.LAST_ONE_SQL)
); );
if (Optional.ofNullable(insuranceType).isPresent()) { if (Optional.ofNullable(insuranceType).isPresent()) {
param.setIsAdress(insuranceType.getIsAdress()); // param.setIsAdress(insuranceType.getIsAdress());
if (CommonConstants.ZERO_STRING.equals( if (CommonConstants.ZERO_STRING.equals(
insuranceType.getAgeLimit()) && (IdCardUtil.getFullAge(param.getEmpIdcardNo()) insuranceType.getAgeLimit()) && (IdCardUtil.getFullAge(param.getEmpIdcardNo())
< CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo()) < CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo())
......
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