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
//保存到数据库中的结果
List<InsuranceReplaceParam> listSuccess = map.get("listSuccess");
List<TInsuranceDetail> detailList = new ArrayList<>();
TInsuranceType insuranceType;
TInsuranceCompany insuranceCompany;
if (CollectionUtils.isNotEmpty(listSuccess)){
for (InsuranceReplaceParam success : listSuccess) {
//替换
......@@ -480,6 +482,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setIsOverdue(null);
detail.setUpdateTime(LocalDateTime.now());
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.setOrderNo(orderNo);
......@@ -1393,23 +1412,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceSettle settle;
SettleVo settleVo;
R<TIncomeDetailReturnVo> incomeDetailList;
TInsuranceCompany insuranceCompany;
TInsuranceType insuranceType;
// TInsuranceCompany insuranceCompany;
// TInsuranceType insuranceType;
for (TInsuranceDetail detail : successList) {
// 是否地市自购
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)
);
detail.setIsAdress(insuranceType.getIsAdress());
}
// // 是否地市自购
// 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)
// );
// detail.setIsAdress(insuranceType.getIsAdress());
// }
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){
settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
......@@ -3440,7 +3459,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(insuranceType).isPresent()) {
param.setIsAdress(insuranceType.getIsAdress());
// param.setIsAdress(insuranceType.getIsAdress());
if (CommonConstants.ZERO_STRING.equals(
insuranceType.getAgeLimit()) && (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