Commit 38b7e180 authored by fangxinjiang's avatar fangxinjiang

是否BPO结算模式字段同步-fxj

parent 7b41b49d
......@@ -644,7 +644,7 @@ public interface CommonConstants {
List<String> processStatus = Stream.of("0","1").collect(Collectors.toList());
List<String> insuranceAutoProcessStatus = Stream.of("0","1","2","5").collect(Collectors.toList());
List<String> insuranceAutoProcessStatus = Stream.of("0","1","2","5","7").collect(Collectors.toList());
List<String> processPreStatus = Stream.of("1").collect(Collectors.toList());
......
......@@ -33,4 +33,9 @@ public class EkpStatusParamVo implements Serializable {
*/
private String callBackFlag;
/**
* 0代表收款结算单已收或垫付
*/
private String paymentStatsus;
}
......@@ -299,10 +299,10 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
).collect(Collectors.toList());
if (autoAddParamList.isEmpty()) {
LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>();
/*LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.in(TEmployeeInsurancePre::getId,pushIdList)
.set(TEmployeeInsurancePre::getProcessStatus, CommonConstants.THREE_STRING);
this.update(updateWrapper);
this.update(updateWrapper);*/
} else {
// 将 autoAddParamList 中的id等信息提取出来,放入一个 Set 中
Set<String> autoAddParamSet = new HashSet<>();
......
......@@ -12,6 +12,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -446,14 +447,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
baseMapper.insert(detail);
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
updateEmployeeInsurancePre(success.getInsurancePreId(),detail,CommonConstants.SEVEN_STRING);
updateEmployeeInsurancePreRenew(success.getInsurancePreRenewId(),detail,CommonConstants.SEVEN_STRING);
//异步任务推送
List<TInsuranceDetail> successList = new ArrayList<>();
successList.add(detail);
doJointInsuranceTask.pushEstime(successList);
}else {
updateEmployeeInsurancePre(success.getInsurancePreId(),detail,CommonConstants.THREE_STRING);
updateEmployeeInsurancePreRenew(success.getInsurancePreRenewId(),detail,CommonConstants.THREE_STRING);
}
updateEmployeeInsurancePreRenew(success.getInsurancePreRenewId(),detail,CommonConstants.THREE_STRING);
if (isAuto || Common.isNotNull(success.getCustomerUserName())) {
isAuto = true;
......@@ -647,14 +650,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
baseMapper.insert(detail);
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
updateEmployeeInsurancePre(success.getInsurancePreId(),detail,CommonConstants.SEVEN_STRING);
updateEmployeeInsurancePreRenew(success.getInsurancePreRenewId(),detail,CommonConstants.SEVEN_STRING);
//异步任务推送
List<TInsuranceDetail> successList = new ArrayList<>();
successList.add(detail);
doJointInsuranceTask.pushEstime(successList);
}else {
updateEmployeeInsurancePre(success.getInsurancePreId(),detail,CommonConstants.THREE_STRING);
updateEmployeeInsurancePreRenew(success.getInsurancePreRenewId(),detail,CommonConstants.THREE_STRING);
}
updateEmployeeInsurancePreRenew(success.getInsurancePreRenewId(),detail,CommonConstants.THREE_STRING);
if (isAuto || Common.isNotNull(success.getCustomerUserName())) {
isAuto = true;
......@@ -1877,10 +1882,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//如果是见费出单,投保中,推送作废 2026-01-22 v1.7.19
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
updateEmployeeInsurancePreById(detail,Stream.of("3","4","6").collect(Collectors.toList()),CommonConstants.SEVEN_STRING);
updateEmployeeInsurancePreRenewById(detail,Stream.of("3","4","6").collect(Collectors.toList()),CommonConstants.SEVEN_STRING, true);
}else {
updateEmployeeInsurancePreById(detail,Stream.of("3","4","6").collect(Collectors.toList()),CommonConstants.FIVE_STRING);
updateEmployeeInsurancePreRenewById(detail,Stream.of("3","4","6").collect(Collectors.toList()),CommonConstants.FIVE_STRING, true);
}
updateEmployeeInsurancePreRenewById(detail,Stream.of("3","4","6").collect(Collectors.toList()),CommonConstants.FIVE_STRING, true);
}
//更新状态
this.updateBatchById(successList);
......@@ -2154,7 +2161,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detailTemp.setDefaultSettleId(settle.getId());
detailTemp.setEstimatePremium(BigDecimalUtils.safeAdd(detail.getActualPremium(),detail.getEstimatePremium()));
detailTemp.setActualPremium(BigDecimal.ZERO);
//差额结算 TODO 需要解决已退回和删除时的数据处理
//差额结算
detailTemp.setSettleType(CommonConstants.TWO_INT);
successBanlance.add(detailTemp);
}
......@@ -9388,7 +9395,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (null != insurancePreId) {
pre = employeeInsurancePreMapper.selectOne(Wrappers.<TEmployeeInsurancePre>query().lambda()
.eq(TEmployeeInsurancePre::getId,insurancePreId)
.in(TEmployeeInsurancePre::getProcessStatus,Stream.of("0","1","2","5").collect(Collectors.toList()))
.in(TEmployeeInsurancePre::getProcessStatus,Stream.of("0","1","2","5","7").collect(Collectors.toList()))
.last(CommonConstants.LAST_ONE_SQL));
} else {
pre = employeeInsurancePreMapper.selectOne(Wrappers.<TEmployeeInsurancePre>query().lambda()
......@@ -9399,7 +9406,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TEmployeeInsurancePre::getInsuranceCompanyName, insuranceDetail.getInsuranceCompanyName())
.eq(TEmployeeInsurancePre::getPolicyStart, insuranceDetail.getPolicyStart())
.eq(TEmployeeInsurancePre::getPolicyEnd, insuranceDetail.getPolicyEnd())
.in(TEmployeeInsurancePre::getProcessStatus, Stream.of("0","1","2","5").collect(Collectors.toList()))
.in(TEmployeeInsurancePre::getProcessStatus, Stream.of("0","1","2","5","7").collect(Collectors.toList()))
.last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isNotNull(pre)) {
......@@ -9437,7 +9444,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (null != insurancePreId) {
pre = tInsurancePreRenewDetailMapper.selectOne(Wrappers.<TInsurancePreRenewDetail>query().lambda()
.eq(TInsurancePreRenewDetail::getId,insurancePreId)
.in(TInsurancePreRenewDetail::getProcessStatus,Stream.of("0","1","2","5").collect(Collectors.toList()))
.in(TInsurancePreRenewDetail::getProcessStatus,Stream.of("0","1","2","5","7").collect(Collectors.toList()))
.last(CommonConstants.LAST_ONE_SQL));
} else {
pre = tInsurancePreRenewDetailMapper.selectOne(Wrappers.<TInsurancePreRenewDetail>query().lambda()
......@@ -9448,7 +9455,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsurancePreRenewDetail::getInsuranceCompanyName, insuranceDetail.getInsuranceCompanyName())
.eq(TInsurancePreRenewDetail::getPolicyStart, insuranceDetail.getPolicyStart())
.eq(TInsurancePreRenewDetail::getPolicyEnd, insuranceDetail.getPolicyEnd())
.in(TInsurancePreRenewDetail::getProcessStatus, Stream.of("0","1","2","5").collect(Collectors.toList()))
.in(TInsurancePreRenewDetail::getProcessStatus, Stream.of("0","1","2","5","7").collect(Collectors.toList()))
.last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isNotNull(pre)) {
......@@ -9696,7 +9703,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//未结算更新自动化测的状态为待派单 temployeeinsurancepre
employeeInsurancePreMapper.delete(Wrappers.<TEmployeeInsurancePre>query().lambda().eq(TEmployeeInsurancePre::getInsurancesId,detail.getId()));
LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TEmployeeInsurancePre::getInsurancesId,detail.getId());
updateWrapper.set(TEmployeeInsurancePre::getProcessStatus,CommonConstants.ONE_STRING);
employeeInsurancePreMapper.update(null,updateWrapper);
} catch (Exception e) {
return R.failed("撤回异常:"+e.getMessage());
}
......
......@@ -254,7 +254,8 @@ public class DoJointInsuranceTask {
if (CommonConstants.ZERO_STRING.equals(vo.getPayFlag())) {
detail.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
detail.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
// 这里就是EKP 同步已收及垫付后同步HRO的特殊处理
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd()) && "0".equals(vo.getPaymentStatsus())){
if (CommonConstants.ZERO_STRING.equals(detail.getPaymentStatus())
&&("0".equals(viewVo.getIncomeCollectFlag())
|| "2".equals(viewVo.getIncomeCollectFlag()))){
......
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