Commit b4d73df9 authored by 李灿灿's avatar 李灿灿

feat:ekp调试优化

parent 8be268ea
......@@ -39,7 +39,7 @@ public class EkpUpdateParam implements Serializable {
private String fd_3b5bf031b52314;
/**
* 商险ID
* 商险ID:商险id_结算id
*/
private String fd_3b5bf032d7a822;
......
......@@ -2046,12 +2046,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(detail).isPresent()){
//当两次发票号不一致时才更新
if (!success.getInvoiceNo().equals(detail.getInvoiceNo())){
//设置发票号
detail.setInvoiceNo(success.getInvoiceNo());
detailList.add(detail);
//只有当结算id存在的时候修改数据才会推给ekp
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){
try {
//推送修改信息
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
......@@ -2060,7 +2063,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ekpUpdateParam.setFd_3b5bf02fa14596(getBuyType(detail.getBuyType()));
ekpUpdateParam.setFd_3b5bf030ab1a56(success.getInvoiceNo());
ekpUpdateParam.setFd_3b5bf031b52314(detail.getBuyStandard());
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId());
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId() + "_" + detail.getDefaultSettleId());
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){
......@@ -2069,6 +2072,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
}
if (CollectionUtils.isNotEmpty(detailList)){
this.updateBatchById(detailList);
......@@ -2147,7 +2152,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(detail).isPresent()){
TInsuranceDetail oldDetail = new TInsuranceDetail();
BeanCopyUtils.copyProperties(detail,oldDetail);
if (StringUtils.isNotBlank(success.getPolicyStartNew())){
......@@ -2163,6 +2168,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//变更记录
tBusinessOperateService.saveModificationRecord(detail.getId(),oldDetail,detail,success.getReason());
//只有当结算id存在的时候修改数据才会推给ekp
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){
try {
//推送修改信息
StringBuilder sb = new StringBuilder();
......@@ -2181,7 +2188,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ekpUpdateParam.setFd_3b5bf02e1d47cc(success.getPolicyEnd());
ekpUpdateParam.setFd_3b5bf02fa14596(getBuyType(success.getBuyType()));
ekpUpdateParam.setFd_3b5bf031b52314(detail.getBuyStandard());
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId());
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId() + "_" + detail.getDefaultSettleId());
ekpUpdateParam.setFd_3b5bf0b7b4c058(sb.toString());
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
}catch (Exception e){
......@@ -2189,6 +2196,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
}
if (CollectionUtils.isNotEmpty(detailList)){
this.updateBatchById(detailList);
......@@ -2266,6 +2275,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//变更记录
tBusinessOperateService.saveModificationRecord(byId.getId(),old,byId,param.getReason());
//只有当结算id存在的时候修改数据才会推给ekp
if(StringUtils.isNotBlank(byId.getDefaultSettleId())){
try {
//推送修改信息
StringBuilder sb = new StringBuilder();
......@@ -2284,12 +2295,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ekpUpdateParam.setFd_3b5bf02e1d47cc(param.getPolicyEnd());
ekpUpdateParam.setFd_3b5bf02fa14596(getBuyType(param.getBuyType()));
ekpUpdateParam.setFd_3b5bf031b52314(byId.getBuyStandard());
ekpUpdateParam.setFd_3b5bf032d7a822(byId.getId());
ekpUpdateParam.setFd_3b5bf032d7a822(byId.getId() + "_" + byId.getDefaultSettleId());
ekpUpdateParam.setFd_3b5bf0b7b4c058(sb.toString());
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
}catch (Exception e){
log.error("pushEkp error updateInsuranceInsuredById:",e.getMessage());
}
}
this.updateById(byId);
return R.ok(InsurancesConstants.OPERATE_SUCCESS);
}
......
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