|
|
@ -1196,7 +1196,6 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
.collect(Collectors.groupingBy(TbsActivityCenter::getSubjectId)); |
|
|
|
List<VtbFundFlow> addFundFlowList = new ArrayList<>(); |
|
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
|
Date now2 = Date.from(now.atZone(ZoneId.systemDefault()).toInstant()); |
|
|
|
|
|
|
|
for (VtbVerificationSubject verificationSubject : verificationSubjects) { |
|
|
|
Long subjectId = verificationSubject.getSubjectId(); |
|
|
@ -1221,7 +1220,6 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
currentCenterAmount = subjectCenter.getUsedAmount(); |
|
|
|
} |
|
|
|
} |
|
|
|
buildFundFlows(verificationId, addFundFlowList, activityGoodsListOfSubjectCenter,currentCenterAmount); |
|
|
|
}else { |
|
|
|
//按比例分配
|
|
|
|
if(i == activityCenters.size()-1){ |
|
|
@ -1232,9 +1230,8 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
.setScale(2, RoundingMode.DOWN); |
|
|
|
preCenterAmount = preCenterAmount.add(currentCenterAmount); |
|
|
|
} |
|
|
|
buildFundFlows(verificationId, addFundFlowList, activityGoodsListOfSubjectCenter,currentCenterAmount); |
|
|
|
} |
|
|
|
|
|
|
|
buildFundFlows(verificationId, addFundFlowList, activityGoodsListOfSubjectCenter,currentCenterAmount); |
|
|
|
} |
|
|
|
|
|
|
|
//调用支付接口
|
|
|
@ -1253,39 +1250,6 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
syncLog.setTodoState(1); |
|
|
|
sysSyncLogService.save(syncLog); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// //发送请求到中间服务
|
|
|
|
// XltApticlaim apticlaim = new XltApticlaim();
|
|
|
|
// apticlaim.setVerificationCode(verificationSubject.getVerificationSubCode());
|
|
|
|
// apticlaim.setCostCode(verificationSubject.getVerificationSubCode());
|
|
|
|
// apticlaim.setCostCode2(verificationSubject.getVerificationSubCode());
|
|
|
|
// apticlaim.setCusCode(verificationSubject.getSupplierCode());
|
|
|
|
// apticlaim.setAmount(verificationSubject.getUsedAmount());
|
|
|
|
// apticlaim.setSubjectCode(verificationSubject.getSubjectCode());
|
|
|
|
// apticlaim.setSubjectName(verificationSubject.getSubjectName());
|
|
|
|
// apticlaim.setExpType("TI");
|
|
|
|
// apticlaim.setApplyType("01");
|
|
|
|
// apticlaim.setEffDate(now2);
|
|
|
|
// apticlaim.setInvoiced("2");
|
|
|
|
// apticlaim.setCreateTime(now2);
|
|
|
|
// apticlaim.setDealTime(now2);
|
|
|
|
// apticlaim.setTopic(costApply.getChargeTheme());
|
|
|
|
//
|
|
|
|
// //设置默认字段
|
|
|
|
// apticlaim.setStatus("00");
|
|
|
|
// apticlaim.setApticlaimAmtTax(BigDecimal.ZERO);
|
|
|
|
// apticlaim.setApticlaimVat("0");
|
|
|
|
// apticlaim.setApticlaimInvoice("");
|
|
|
|
//
|
|
|
|
// try {
|
|
|
|
// //todo 如果失败做补偿处理
|
|
|
|
// xiaoLuTonService.saveApticlaim(apticlaim);
|
|
|
|
// log.info("发送对象(apticlaim)到OA服务成功");
|
|
|
|
// } catch (Exception e) {
|
|
|
|
// e.printStackTrace();
|
|
|
|
// log.error("发送对象到OA服务失败,数据内容如下:{}",JsonUtil.objectToJson(apticlaim));
|
|
|
|
// }
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1296,6 +1260,7 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
subjectLqw.eq(VtbVerificationSubject::getVerificationId,verificationId); |
|
|
|
VtbVerificationSubject subjectParam = new VtbVerificationSubject(); |
|
|
|
subjectParam.setEffectiveFlag(1); |
|
|
|
//fundFlowService.flushActivityAmount() 必须把FundFlow操作前置
|
|
|
|
//更新已用费用记录,并更新活动状态是否完成(旧流程按比例分配,新流程按比例分配后,进行再分配)
|
|
|
|
fundFlowService.flushActivityAmount(verification.getActivityId()); |
|
|
|
verificationSubjectService.update(subjectParam,subjectLqw); |
|
|
|