|
|
@ -380,35 +380,38 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
Assert.throwEx("当前活动状态不可作废"); |
|
|
|
} |
|
|
|
|
|
|
|
String host = "http://59.37.164.96:2506/action/cms/cost/deletion"; |
|
|
|
|
|
|
|
//TODO 请求伟成接口,删除 XLT_BIFyDbf
|
|
|
|
SysUser sysUser = sysUserService.getById(AuthContextUtils.getSysUserId()); |
|
|
|
XltDelVerificationDto delVerificationDto = new XltDelVerificationDto( |
|
|
|
sysUser.getAccount(), |
|
|
|
null, |
|
|
|
verification.getVerificationCode() |
|
|
|
); |
|
|
|
String requestBody = JsonUtil.objectToJson(delVerificationDto); |
|
|
|
String response = HttpUtil.doPost(host,requestBody,null); |
|
|
|
String errorMsg = null; |
|
|
|
if(!response.contains("200")){ |
|
|
|
errorMsg = response; |
|
|
|
} |
|
|
|
SysSyncLog syncLog = new SysSyncLog(); |
|
|
|
syncLog.setFromPlat("移除核销记录"); |
|
|
|
syncLog.setUrl(host); |
|
|
|
syncLog.setEntityClass(XltDelVerificationDto.class.getName()); |
|
|
|
syncLog.setRequestJson(requestBody); |
|
|
|
syncLog.setFailReason(errorMsg); |
|
|
|
syncLog.setSuccessStatus(errorMsg==null?0:1); |
|
|
|
syncLog.setTodoState(0); |
|
|
|
syncLog.setTryTimes(0); |
|
|
|
sysSyncLogService.save(syncLog); |
|
|
|
if(errorMsg!=null){ |
|
|
|
Assert.throwEx(errorMsg); |
|
|
|
if(!verification.getVerificationCode().contains("TEST")){ |
|
|
|
String host = "http://59.37.164.96:2506/action/cms/cost/deletion"; |
|
|
|
|
|
|
|
//TODO 请求伟成接口,删除 XLT_BIFyDbf
|
|
|
|
SysUser sysUser = sysUserService.getById(AuthContextUtils.getSysUserId()); |
|
|
|
XltDelVerificationDto delVerificationDto = new XltDelVerificationDto( |
|
|
|
sysUser.getAccount(), |
|
|
|
null, |
|
|
|
verification.getVerificationCode() |
|
|
|
); |
|
|
|
String requestBody = JsonUtil.objectToJson(delVerificationDto); |
|
|
|
String response = HttpUtil.doPost(host,requestBody,null); |
|
|
|
String errorMsg = null; |
|
|
|
if(!response.contains("200")){ |
|
|
|
errorMsg = response; |
|
|
|
} |
|
|
|
SysSyncLog syncLog = new SysSyncLog(); |
|
|
|
syncLog.setFromPlat("移除核销记录"); |
|
|
|
syncLog.setUrl(host); |
|
|
|
syncLog.setEntityClass(XltDelVerificationDto.class.getName()); |
|
|
|
syncLog.setRequestJson(requestBody); |
|
|
|
syncLog.setFailReason(errorMsg); |
|
|
|
syncLog.setSuccessStatus(errorMsg==null?0:1); |
|
|
|
syncLog.setTodoState(0); |
|
|
|
syncLog.setTryTimes(0); |
|
|
|
sysSyncLogService.save(syncLog); |
|
|
|
if(errorMsg!=null){ |
|
|
|
Assert.throwEx(errorMsg); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
verification.setVerificationState(VtbVerificationState.Cancel.getCode()); |
|
|
|
vtbFundFlowService.removeByVerificationId(verification.getId()); |
|
|
|
this.updateById(verification); |
|
|
@ -508,8 +511,20 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
Assert.throwEx("状态不支持释放活动费用"); |
|
|
|
} |
|
|
|
} |
|
|
|
BigDecimal releaseAmount = this.validActivity(costApply.getContractFlag()!=null |
|
|
|
&&costApply.getContractFlag().equals(1),activity,false,false); |
|
|
|
BigDecimal releaseAmount = null; |
|
|
|
String errorMsg = null; |
|
|
|
try { |
|
|
|
releaseAmount = this.validActivity(costApply.getContractFlag()!=null |
|
|
|
&&costApply.getContractFlag().equals(1),activity,false,false); |
|
|
|
} catch (Exception e) { |
|
|
|
errorMsg = e.getMessage(); |
|
|
|
} |
|
|
|
if(StringUtils.hasText(errorMsg)){ |
|
|
|
if(throwEx){ |
|
|
|
Assert.throwEx(errorMsg); |
|
|
|
} |
|
|
|
return; |
|
|
|
} |
|
|
|
TbsActivity param = new TbsActivity(); |
|
|
|
param.setId(activityId); |
|
|
|
param.setActivityState(TbsActivityState.STATE_4_Release); |
|
|
@ -942,6 +957,7 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
.subtract(currActivityCenter.getUsedAmount()) |
|
|
|
.subtract(centerAmt); |
|
|
|
if(surplus.compareTo(BigDecimal.ZERO)<0){ |
|
|
|
log.warn("SubjectCenterId:{} 当前输入金额:{}",centerBo.getSubjectCenterId(),centerAmt); |
|
|
|
Assert.throwEx("SubjectCenterId: "+centerBo.getSubjectCenterId()+" 金额不足"); |
|
|
|
} |
|
|
|
VtbVerificationSubjectCenter subjectCenter = new VtbVerificationSubjectCenter(); |
|
|
@ -1437,7 +1453,8 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
&&verification.getRegReleaseFlag()!=null |
|
|
|
&&verification.getRegReleaseFlag().equals(1)){ |
|
|
|
//更新活动状态
|
|
|
|
this.release(verification.getActivityId(),"0",false); |
|
|
|
SysUser sysUser = sysUserService.getById(verification.getRegReleaseUserId()); |
|
|
|
this.release(verification.getActivityId(),sysUser.getCode(),false); |
|
|
|
} |
|
|
|
|
|
|
|
BigDecimal totalCostApplyUsed = costApplyService.totalCostUsed(activity.getCostApplyId()); |
|
|
|