Commit 3f5065f3 authored by huyuchen's avatar huyuchen

商险优化修改

parent 7678c11b
......@@ -157,7 +157,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<String> sourceIdCardList = new ArrayList<>();
List<String> replaceIdList = new ArrayList<>();
List<TInsuranceDetail> changeList = new ArrayList<>();
list.stream().forEach(e -> {
list.forEach(e -> {
if (!LocalDateUtil.isOverdueDate(e.getPolicyEnd().toString())){
e.setIsOverdue(CommonConstants.ONE_INT);
e.setUpdateTime(LocalDateTime.now());
......@@ -248,9 +248,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceList = baseMapper.getInsuranceListPage(page,param);
// 购买月数
if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
insuranceList.getRecords().stream().forEach(e ->{
e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString()));
});
insuranceList.getRecords().forEach(e -> e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString())));
}
return insuranceList;
}
......@@ -273,19 +271,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
List<InsuranceListVO> insuranceList;
insuranceList = baseMapper.getInsuranceList(param);
List<InsuranceListVO> insuranceList = baseMapper.getInsuranceList(param);
// 购买月数
if (CollectionUtils.isNotEmpty(insuranceList)){
/*if(insuranceList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}*/
insuranceList.stream().forEach(e ->{
e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString()));
});
insuranceList.forEach(e -> e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString())));
TInsuranceOperate tInsuranceOperate;
for (InsuranceListVO listVO : insuranceList) {
if (CommonConstants.FOUR_INT == listVO.getBuyHandleStatus()) {
TInsuranceOperate tInsuranceOperate = tInsuranceOperateService.getOne(Wrappers.<TInsuranceOperate>query().lambda()
tInsuranceOperate = tInsuranceOperateService.getOne(Wrappers.<TInsuranceOperate>query().lambda()
.eq(TInsuranceOperate::getInsuranceDetailId,listVO.getId())
.eq(TInsuranceOperate::getDisplayFlag,CommonConstants.ONE_INT)
.orderByDesc(TInsuranceOperate::getCreateTime)
......@@ -325,9 +318,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
IPage<InsuranceListVO> insuranceList = baseMapper.getInsuranceHandleListPage(page,param);
// 购买月数
if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
insuranceList.getRecords().stream().forEach(e ->{
e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString()));
});
insuranceList.getRecords().forEach(e -> e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString())));
}
return insuranceList;
}
......@@ -526,7 +517,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//保费都默认是0
newDetail.setActualPremium(new BigDecimal("0.00"));
newDetail.setEstimatePremium(new BigDecimal("0.00"));
Boolean insert = this.save(newDetail);
boolean insert = this.save(newDetail);
//替换记录
if (insert){
TInsuranceReplace replace = new TInsuranceReplace();
......
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