Commit 8be268ea authored by 李灿灿's avatar 李灿灿

Merge branch 'feature-licancan' into 'feature/insurance-1.3.0'

Feature licancan

See merge request !302
parents b91ebcaa 27632d98
......@@ -2040,6 +2040,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getBuyStandard,success.getBuyStandard())
//排除替换类型
.ne(TInsuranceDetail::getBuyType,CommonConstants.FOUR_INT)
//只查询已投保和已减员的
.in(TInsuranceDetail::getBuyHandleStatus,CommonConstants.THREE_INT,CommonConstants.FIVE_INT)
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL)
......@@ -2059,7 +2061,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ekpUpdateParam.setFd_3b5bf030ab1a56(success.getInvoiceNo());
ekpUpdateParam.setFd_3b5bf031b52314(detail.getBuyStandard());
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId());
ekpUpdateParam.setFd_3b5bf0b7b4c058("操作人:"+user.getNickname() + ";操作时间:"+LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) + ";变更前发票号:" + detail.getInvoiceNo() + ";变更后发票号:" + success.getInvoiceNo());
ekpUpdateParam.setFd_3b5bf0b7b4c058("操作人:"+user.getNickname() + ";操作时间:"+LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) + ";变更前发票号:" + detail.getInvoiceNo() + ";变更后发票号:" + success.getInvoiceNo());
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
}catch (Exception e){
log.error("pushEkp error registeredInvoiceNo:",e.getMessage());
......@@ -2140,6 +2142,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(success.getPolicyEnd()))
.eq(TInsuranceDetail::getBuyStandard,success.getBuyStandard())
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
//只查询已投保和已减员的
.in(TInsuranceDetail::getBuyHandleStatus,CommonConstants.THREE_INT,CommonConstants.FIVE_INT)
.orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
......@@ -2162,15 +2166,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
try {
//推送修改信息
StringBuilder sb = new StringBuilder();
sb.append("操作人:" + user.getNickname() + ";操作时间:" + LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
if (!detail.getPolicyStart().toString().equals(success.getPolicyStart())) {
sb.append(";变更前保单开始时间:" + detail.getPolicyStart() + ";变更后保单开始时间:" + success.getPolicyStart());
sb.append("操作人:" + user.getNickname() + ";操作时间:" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
if (!oldDetail.getPolicyStart().toString().equals(success.getPolicyStart())) {
sb.append(";变更前保单开始时间:" + oldDetail.getPolicyStart() + ";变更后保单开始时间:" + success.getPolicyStart());
}
if (!detail.getPolicyEnd().toString().equals(success.getPolicyEnd())) {
sb.append(";变更前保单结束时间:" + detail.getPolicyEnd() + ";变更后保单结束时间:" + success.getPolicyEnd());
if (!oldDetail.getPolicyEnd().toString().equals(success.getPolicyEnd())) {
sb.append(";变更前保单结束时间:" + oldDetail.getPolicyEnd() + ";变更后保单结束时间:" + success.getPolicyEnd());
}
if (!detail.getBuyType().equals(success.getBuyType())) {
sb.append(";变更前投保类型:" + getBuyType(detail.getBuyType()) + ";变更后投保类型:" + getBuyType(success.getBuyType()));
if (!oldDetail.getBuyType().equals(success.getBuyType())) {
sb.append(";变更前投保类型:" + getBuyType(oldDetail.getBuyType()) + ";变更后投保类型:" + getBuyType(success.getBuyType()));
}
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
ekpUpdateParam.setFd_3b5bf02d3b8fc4(success.getPolicyStart());
......@@ -2265,15 +2269,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
try {
//推送修改信息
StringBuilder sb = new StringBuilder();
sb.append("操作人:" + user.getNickname() + ";操作时间:" + LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
if (!byId.getPolicyStart().toString().equals(param.getPolicyStart())) {
sb.append(";变更前保单开始时间:" + byId.getPolicyStart() + ";变更后保单开始时间:" + param.getPolicyStart());
sb.append("操作人:" + user.getNickname() + ";操作时间:" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
if (!old.getPolicyStart().toString().equals(param.getPolicyStart())) {
sb.append(";变更前保单开始时间:" + old.getPolicyStart() + ";变更后保单开始时间:" + param.getPolicyStart());
}
if (!byId.getPolicyEnd().toString().equals(param.getPolicyEnd())) {
sb.append(";变更前保单结束时间:" + byId.getPolicyEnd() + ";变更后保单结束时间:" + param.getPolicyEnd());
if (!old.getPolicyEnd().toString().equals(param.getPolicyEnd())) {
sb.append(";变更前保单结束时间:" + old.getPolicyEnd() + ";变更后保单结束时间:" + param.getPolicyEnd());
}
if (!byId.getBuyType().equals(param.getBuyType())) {
sb.append(";变更前投保类型:" + getBuyType(byId.getBuyType()) + ";变更后投保类型:" + getBuyType(param.getBuyType()));
if (!old.getBuyType().equals(param.getBuyType())) {
sb.append(";变更前投保类型:" + getBuyType(old.getBuyType()) + ";变更后投保类型:" + getBuyType(param.getBuyType()));
}
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
ekpUpdateParam.setFd_3b5bf02d3b8fc4(param.getPolicyStart());
......@@ -3569,7 +3573,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
param.setErrorMessage(CommonConstants.RESULT_DATA_SUCESS);
}
return paramList;
return paramList.stream().distinct().collect(Collectors.toList());
}
/**
......@@ -3580,7 +3584,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link List<InsuranceRegisterInvoiceNoParam>}
*/
private List<InsuranceRegisterInvoiceNoParam> registeredInvoiceNoCheck(List<InsuranceRegisterInvoiceNoParam> paramList){
for (InsuranceRegisterInvoiceNoParam param : paramList.stream().distinct().collect(Collectors.toList())) {
List<InsuranceRegisterInvoiceNoParam> collect = paramList.stream().distinct().collect(Collectors.toList());
for (InsuranceRegisterInvoiceNoParam param : collect) {
// 必填校验
if (StringUtils.isBlank(param.getEmpName())){
param.setErrorMessage(InsurancesConstants.EMP_NAME_NOT_EMPTY);
......@@ -3633,6 +3638,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getBuyStandard,param.getBuyStandard())
//排除替换类型
.ne(TInsuranceDetail::getBuyType,CommonConstants.FOUR_INT)
//只查询已投保和已减员的
.in(TInsuranceDetail::getBuyHandleStatus,CommonConstants.THREE_INT,CommonConstants.FIVE_INT)
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL)
......@@ -3648,7 +3655,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
param.setErrorMessage(CommonConstants.RESULT_DATA_SUCESS);
}
return paramList;
return collect;
}
public static final List<String> BUY_TYPE = Arrays.asList(InsurancesConstants.INSERT,InsurancesConstants.BATCH_INSERT);
......@@ -3661,7 +3668,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link List<InsuranceInsuredParam>}
*/
private List<InsuranceInsuredParam> updateInsuranceInsuredCheck(List<InsuranceInsuredParam> paramList){
for (InsuranceInsuredParam param : paramList.stream().distinct().collect(Collectors.toList())) {
List<InsuranceInsuredParam> collect = paramList.stream().distinct().collect(Collectors.toList());
for (InsuranceInsuredParam param : collect) {
// 必填校验
if (StringUtils.isBlank(param.getEmpName())){
param.setErrorMessage(InsurancesConstants.EMP_NAME_NOT_EMPTY);
......@@ -3752,6 +3760,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(param.getPolicyEnd()))
.eq(TInsuranceDetail::getBuyStandard,param.getBuyStandard())
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
//只查询已投保和已减员的
.in(TInsuranceDetail::getBuyHandleStatus,CommonConstants.THREE_INT,CommonConstants.FIVE_INT)
.orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
......@@ -3771,7 +3781,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
param.setErrorMessage(CommonConstants.RESULT_DATA_SUCESS);
}
return paramList;
return collect;
}
/**
......
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