Commit daf95103 authored by 李灿灿's avatar 李灿灿

Merge branch 'feature-licancan' into 'develop'

Feature licancan

See merge request fangxinjiang/yifu!142
parents b1ed3760 18143da9
......@@ -401,6 +401,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(success.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(success.getPolicyEnd()))
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
BeanCopyUtils.copyProperties(detail,newDetail);
......@@ -439,6 +440,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
replace.setToInsuranceDetailId(newDetail.getId());
TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, detail.getId())
.orderByDesc(TInsuranceReplace::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(one).isPresent()){
......@@ -550,6 +552,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceCompany insuranceCompany = tInsuranceCompanyService.getOne(Wrappers.<TInsuranceCompany>query().lambda()
.eq(TInsuranceCompany::getCompanyName, param.getInsuranceCompanyName())
.eq(TInsuranceCompany::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceCompany::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(insuranceCompany).isPresent()){
return R.failed(InsurancesConstants.INSURANCE_COMPANY_NAME_NOT_EXIST);
......@@ -561,6 +565,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceType::getName, param.getInsuranceTypeName())
.eq(TInsuranceType::getInsuranceCompanyId, insuranceCompany.getId())
.eq(TInsuranceType::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceType::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(insuranceType).isPresent()){
return R.failed(InsurancesConstants.INSURANCE_TYPE_NAME_NOT_EXIST);
......@@ -570,6 +576,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceTypeStandard::getBuyStandard, param.getBuyStandard())
.eq(TInsuranceTypeStandard::getInsuranceTypeId, insuranceType.getId())
.eq(TInsuranceTypeStandard::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceTypeStandard::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(typeStandard).isPresent()){
return R.failed(InsurancesConstants.BUY_STANDARD_NOT_EXIST);
......@@ -589,6 +597,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceTypeRate::getInsuranceTypeId, insuranceType.getId())
.eq(TInsuranceTypeRate::getMonth, month)
.eq(TInsuranceTypeRate::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceTypeRate::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(typeRate).isPresent()){
......@@ -624,6 +633,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper -> wrapper.eq(TInsuranceDetail::getIsOverdue,CommonConstants.ZERO_INT)
.or().isNull(TInsuranceDetail::getIsOverdue)
)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(insuranceDetail).isPresent() && !insuranceDetail.getId().equals(param.getId())){
......@@ -655,6 +665,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper -> wrapper.eq(TInsuranceDetail::getIsOverdue,CommonConstants.ZERO_INT)
.or().isNull(TInsuranceDetail::getIsOverdue)
)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
......@@ -694,6 +705,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, byId.getId())
.orderByDesc(TInsuranceReplace::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(one).isPresent()){
TInsuranceDetail insuranceDetail = this.getById(one.getFromInsuranceDetailId());
......@@ -824,6 +836,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listVO.setRemark(InsurancesConstants.ADD);
TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, listVO.getId())
.orderByDesc(TInsuranceReplace::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(one).isPresent()){
TInsuranceDetail byId = this.getById(one.getFromInsuranceDetailId());
......@@ -1148,6 +1161,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(success.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(success.getPolicyEnd()))
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (StringUtils.isNotBlank(success.getInvoiceNo())){
......@@ -1442,6 +1456,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceCompany insuranceCompany = tInsuranceCompanyService.getOne(Wrappers.<TInsuranceCompany>query().lambda()
.eq(TInsuranceCompany::getCompanyName, param.getInsuranceCompanyName())
.eq(TInsuranceCompany::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceCompany::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(insuranceCompany).isPresent()){
param.setErrorMessage(InsurancesConstants.INSURANCE_COMPANY_NAME_NOT_EXIST);
......@@ -1455,6 +1471,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceType::getName, param.getInsuranceTypeName())
.eq(TInsuranceType::getInsuranceCompanyId, insuranceCompany.getId())
.eq(TInsuranceType::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceType::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(insuranceType).isPresent()){
param.setErrorMessage(InsurancesConstants.INSURANCE_TYPE_NAME_NOT_EXIST);
......@@ -1466,6 +1484,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceTypeStandard::getBuyStandard, param.getBuyStandard())
.eq(TInsuranceTypeStandard::getInsuranceTypeId, insuranceType.getId())
.eq(TInsuranceTypeStandard::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceTypeStandard::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(typeStandard).isPresent()){
param.setErrorMessage(InsurancesConstants.BUY_STANDARD_NOT_EXIST);
......@@ -1487,6 +1507,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceTypeRate::getInsuranceTypeId, insuranceType.getId())
.eq(TInsuranceTypeRate::getMonth, month)
.eq(TInsuranceTypeRate::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceTypeRate::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(typeRate).isPresent()){
......@@ -1536,6 +1557,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper -> wrapper.eq(TInsuranceDetail::getIsOverdue,CommonConstants.ZERO_INT)
.or().isNull(TInsuranceDetail::getIsOverdue)
)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(insuranceDetail).isPresent()){
......@@ -1570,6 +1592,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper -> wrapper.eq(TInsuranceDetail::getIsOverdue,CommonConstants.ZERO_INT)
.or().isNull(TInsuranceDetail::getIsOverdue)
)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
......@@ -1803,6 +1826,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.or().isNull(TInsuranceDetail::getIsOverdue)
)
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(limitOne).isPresent()){
......@@ -1818,6 +1842,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceCompany insuranceCompany = tInsuranceCompanyService.getOne(Wrappers.<TInsuranceCompany>query().lambda()
.eq(TInsuranceCompany::getCompanyName, param.getInsuranceCompanyName())
.eq(TInsuranceCompany::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceCompany::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(insuranceCompany).isPresent()){
param.setErrorMessage(InsurancesConstants.INSURANCE_COMPANY_NAME_NOT_EXIST);
......@@ -1831,6 +1857,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceType::getName, param.getInsuranceTypeName())
.eq(TInsuranceType::getInsuranceCompanyId, insuranceCompany.getId())
.eq(TInsuranceType::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceType::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(insuranceType).isPresent()){
param.setErrorMessage(InsurancesConstants.INSURANCE_TYPE_NAME_NOT_EXIST);
......@@ -1842,6 +1870,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceTypeStandard::getBuyStandard, param.getBuyStandard())
.eq(TInsuranceTypeStandard::getInsuranceTypeId, insuranceType.getId())
.eq(TInsuranceTypeStandard::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceTypeStandard::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(typeStandard).isPresent()){
param.setErrorMessage(InsurancesConstants.BUY_STANDARD_NOT_EXIST);
......@@ -1863,6 +1893,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceTypeRate::getInsuranceTypeId, insuranceType.getId())
.eq(TInsuranceTypeRate::getMonth, month)
.eq(TInsuranceTypeRate::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceTypeRate::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(typeRate).isPresent()){
......@@ -1923,6 +1954,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper -> wrapper.eq(TInsuranceDetail::getIsOverdue,CommonConstants.ZERO_INT)
.or().isNull(TInsuranceDetail::getIsOverdue)
)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(insuranceDetail).isPresent()){
......@@ -2130,6 +2162,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(param.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(param.getPolicyEnd()))
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(detail).isPresent()){
......@@ -2215,6 +2248,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper -> wrapper.eq(TInsuranceDetail::getIsOverdue,CommonConstants.ZERO_INT)
.or().isNull(TInsuranceDetail::getIsOverdue)
)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(replace).isPresent()){
......@@ -2248,6 +2282,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
wrapper -> wrapper.eq(TInsuranceDetail::getIsOverdue,CommonConstants.ZERO_INT)
.or().isNull(TInsuranceDetail::getIsOverdue)
)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
......@@ -2348,6 +2383,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(param.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(param.getPolicyEnd()))
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(detail).isPresent()){
......@@ -2375,6 +2411,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail batchPolicyNo = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getPolicyNo, param.getPolicyNo())
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(batchPolicyNo).isPresent()){
......@@ -2398,6 +2435,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail addPolicyNo = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getPolicyNo, param.getPolicyNo())
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceDetail::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(addPolicyNo).isPresent()){
......
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