Commit 9783fe98 authored by fangxinjiang's avatar fangxinjiang

见费出单逻辑-fxj

parent 54d53db0
...@@ -33,6 +33,10 @@ public class EkpStatusParamVo implements Serializable { ...@@ -33,6 +33,10 @@ public class EkpStatusParamVo implements Serializable {
*/ */
private String callBackFlag; private String callBackFlag;
/**
* 收款结算单退单或款项撤销表示 商险ID
*/
private String detailIds;
/** /**
* 0代表收款结算单已收或垫付 * 0代表收款结算单已收或垫付
*/ */
......
...@@ -9746,6 +9746,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -9746,6 +9746,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 自动化测需要同步更新为待投保 // 自动化测需要同步更新为待投保
List<String> ids = new ArrayList<>(); List<String> ids = new ArrayList<>();
TInsuranceDetail detail = null; TInsuranceDetail detail = null;
TInsuranceDetail detailOld = null;
String detailId = null; String detailId = null;
for (EkpSettleStatusVo vo : voList){ for (EkpSettleStatusVo vo : voList){
if (null != vo.getDetailId() && vo.getDetailId().length() > 19){ if (null != vo.getDetailId() && vo.getDetailId().length() > 19){
...@@ -9754,11 +9755,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -9754,11 +9755,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
|| "垫付".equals(vo.getPaymentStatus())) || "垫付".equals(vo.getPaymentStatus()))
&& map.containsKey(detailId)){ && map.containsKey(detailId)){
detail = map.get(detailId); detail = map.get(detailId);
detail.setPaymentTime(DateUtil.formatDatePatten(new Date(),DateUtil.DATETIME_PATTERN_SECOND));
detail.setPaymentStatus(CommonConstants.ONE_STRING); detail.setPaymentStatus(CommonConstants.ONE_STRING);
detail.setBuyHandleStatus(CommonConstants.ONE_INT); if (null != detail){
updateList.add(detail); detailOld = new TInsuranceDetail();
ids.add(detailId); BeanCopyUtils.copyProperties(detail,detailOld);
detail.setPaymentTime(DateUtil.formatDatePatten(new Date(),DateUtil.DATETIME_PATTERN_SECOND));
detail.setBuyHandleStatus(CommonConstants.ONE_INT);
detail.setUpdateTime(LocalDateTime.now());
detail.setPaymentStatus(CommonConstants.ONE_STRING);
detail.setUpdateBy("05501879fed711eca3540242ac110010");
tBusinessOperateService.saveModificationRecord(detail.getId(),detailOld,detail,"收款结算单已收或垫付同步更新投保状态为待投保");
updateList.add(detail);
ids.add(detailId);
}
} }
} }
} }
...@@ -9791,18 +9800,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -9791,18 +9800,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public void callBackInsuranceBuyHandleStatusSub(EkpStatusParamVo vo) { public void callBackInsuranceBuyHandleStatusSub(EkpStatusParamVo vo) {
try { try {
//根据结算单号获取明细id和结算状态 //根据结算单号获取明细id和结算状态
List<EkpInsuranceViewVo> viewVoList; List<String> detailIds = null;
TInsuranceDetail detail; if (null != vo && Common.isNotNull(vo.getDetailIds())){
viewVoList = ekpSettleService.selectViewBySettleNo(vo.getSettleNo(), vo.getPayFlag()); detailIds = Arrays.asList(vo.getDetailIds().split(CommonConstants.COMMA_STRING));
if (viewVoList != null && !viewVoList.isEmpty()) { }
String insuranceId; if (detailIds != null && !detailIds.isEmpty()) {
List<String> insuranceIds = new ArrayList<>(); List<String> insuranceIds = new ArrayList<>();
TInsuranceDetail detailOld = null; TInsuranceDetail detailOld = null;
for (EkpInsuranceViewVo viewVo : viewVoList) { TInsuranceDetail detail = null;
for (String id : detailIds) {
//获取所有的明细id //获取所有的明细id
if (Common.isNotNull(viewVo.getId())) { if (Common.isNotNull(id)) {
insuranceId = viewVo.getId().substring(0, 19); detail = baseMapper.selectById(id);
detail = baseMapper.selectById(insuranceId);
detailOld = new TInsuranceDetail(); detailOld = new TInsuranceDetail();
BeanCopyUtils.copyProperties(detail,detailOld); BeanCopyUtils.copyProperties(detail,detailOld);
//见费出单且是待投保状态 直接回退到 待缴费 并清空缴费时间和缴费状态 //见费出单且是待投保状态 直接回退到 待缴费 并清空缴费时间和缴费状态
...@@ -9816,7 +9825,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -9816,7 +9825,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setUpdateTime(LocalDateTime.now()); detail.setUpdateTime(LocalDateTime.now());
baseMapper.updateById(detail); baseMapper.updateById(detail);
tBusinessOperateService.saveModificationRecord(detail.getId(),detailOld,detail,"收款结算单退单或撤销匹配同步更新投保状态为待缴费"); tBusinessOperateService.saveModificationRecord(detail.getId(),detailOld,detail,"收款结算单退单或撤销匹配同步更新投保状态为待缴费");
insuranceIds.add(insuranceId); insuranceIds.add(id);
} }
} }
} }
......
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