Commit 54d53db0 authored by fangxinjiang's avatar fangxinjiang

手动拉取商险缴费状态-fxj

parent 573d1f7f
......@@ -9682,7 +9682,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public R callBack(TInsuranceDetail detail) {
String id = detail.getId()+CommonConstants.DOWN_LINE_STRING+detail.getDefaultSettleId();
EkpSettleStatusVo vo = ekpSettleService.getSettleStatusFromEkpInsuranceDetailAsso(id);
if (null != vo && "已结算".equals(vo.getSettleStatus()) || "结算中".equals(vo.getSettleStatus())){
if (null != vo && ("已结算".equals(vo.getSettleStatus()) || "结算中".equals(vo.getSettleStatus()))){
return R.failed("已结算或结算中的投保记录不可撤回");
}
try {
......@@ -9733,25 +9733,33 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
if (Common.isNotNull(list)){
List<String> idStrs = new ArrayList<>();
for (TInsuranceDetail detail:list){
idStrs.add(detail.getId()+CommonConstants.DOWN_LINE_STRING+detail.getDefaultSettleId());
}
//list转为MAP id 为 key
Map<String,TInsuranceDetail> map = list.stream().collect(Collectors.toMap(TInsuranceDetail::getId, v -> v));
List<EkpSettleStatusVo> voList = ekpSettleService.getSettleStatusFromEkpAssoByIds(list.stream()
.map(TInsuranceDetail::getId).distinct().collect(Collectors.toList()));
List<EkpSettleStatusVo> voList = ekpSettleService.getSettleStatusFromEkpAssoByIds(idStrs);
if (Common.isNotNull(voList)){
//如果EKP对应提前缴费的预估数据已结算或已垫付则HRO商险派单状态同步为待投保
List<TInsuranceDetail> updateList = new ArrayList<>();
// 自动化测需要同步更新为待投保
List<String> ids = new ArrayList<>();
TInsuranceDetail detail = null;
String detailId = null;
for (EkpSettleStatusVo vo : voList){
if (("已收".equals(vo.getPaymentStatus())
|| "垫付".equals(vo.getPaymentStatus()))
&& map.containsKey(vo.getDetailId())){
detail = map.get(vo.getDetailId());
detail.setPaymentTime(DateUtil.formatDatePatten(new Date(),DateUtil.DATETIME_PATTERN_SECOND));
detail.setPaymentStatus(CommonConstants.ONE_STRING);
updateList.add(detail);
ids.add(vo.getDetailId());
if (null != vo.getDetailId() && vo.getDetailId().length() > 19){
detailId = vo.getDetailId().substring(0,19);
if (("已收".equals(vo.getPaymentStatus())
|| "垫付".equals(vo.getPaymentStatus()))
&& map.containsKey(detailId)){
detail = map.get(detailId);
detail.setPaymentTime(DateUtil.formatDatePatten(new Date(),DateUtil.DATETIME_PATTERN_SECOND));
detail.setPaymentStatus(CommonConstants.ONE_STRING);
detail.setBuyHandleStatus(CommonConstants.ONE_INT);
updateList.add(detail);
ids.add(detailId);
}
}
}
if (Common.isNotNull(updateList)){
......@@ -9761,7 +9769,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//通过ids 更新自动化测状态processStatus为待投保
LambdaUpdateWrapper<TEmployeeInsurancePre> updateDiyInfoWrapper = new LambdaUpdateWrapper<>();
updateDiyInfoWrapper.in(TEmployeeInsurancePre::getInsurancesId, ids)
.set(TEmployeeInsurancePre::getProcessStatus,CommonConstants.SEVEN_STRING);
.set(TEmployeeInsurancePre::getProcessStatus,CommonConstants.THREE_STRING);
employeeInsurancePreMapper.update(null, updateDiyInfoWrapper);
}
}
......
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