撤回清算上锁

清算标记更新
master
yixian 4 years ago
parent b98c423e69
commit 70d1c78885

@ -1649,20 +1649,27 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
if (!log.getBooleanValue("editable")) {
throw new ForbiddenException("Settlement log has been sent and unable to edit");
}
List<JSONObject> details = clearingDetailMapper.listReportsOfSettlement(clearingId);
List<JSONObject> detailsWithDistributedSurcharge = details.stream().filter(detail -> detail.getBigDecimal("distributed_surcharge").compareTo(BigDecimal.ZERO) > 0).collect(Collectors.toList());
if (!detailsWithDistributedSurcharge.isEmpty()) {
for (JSONObject detail : detailsWithDistributedSurcharge) {
releaseDistributedSurcharge(detail);
if (!locker.lock("settle_task", 3600_000)) {
throw new ServerErrorException("Settle Task Running!");
}
try {
List<JSONObject> details = clearingDetailMapper.listReportsOfSettlement(clearingId);
List<JSONObject> detailsWithDistributedSurcharge = details.stream().filter(detail -> detail.getBigDecimal("distributed_surcharge").compareTo(BigDecimal.ZERO) > 0).collect(Collectors.toList());
if (!detailsWithDistributedSurcharge.isEmpty()) {
for (JSONObject detail : detailsWithDistributedSurcharge) {
releaseDistributedSurcharge(detail);
}
}
transactionMapper.deleteSettlementTransaction(clearingId);
transactionMapper.removeSettleRemark(clearingId);
preSettleTaskMapper.resetClearStatus(clearingId);
clearingDetailAnalysisMapper.clearAnalysis(clearingId);
taskManualSettleMapper.rollbackExecutedTask(clearingId);
clearingDetailMapper.deleteSettleLogs(clearingId);
clearingLogMapper.deleteSettleLogs(clearingId);
}finally {
locker.unlock("settle_task");
}
transactionMapper.deleteSettlementTransaction(clearingId);
transactionMapper.removeSettleRemark(clearingId);
preSettleTaskMapper.resetClearStatus(clearingId);
clearingDetailAnalysisMapper.clearAnalysis(clearingId);
taskManualSettleMapper.rollbackExecutedTask(clearingId);
clearingDetailMapper.deleteSettleLogs(clearingId);
clearingLogMapper.deleteSettleLogs(clearingId);
}
@Override

@ -231,7 +231,7 @@
<tr ng-repeat="log in settlementLogs">
<td>
{{log.report_date|limitTo:10}}
&nbsp;<span ng-if="$index==0&&padding" class="text-red">
&nbsp;<span ng-if="log.padding" class="text-red">
<i class="glyphicon glyphicon-time" uib-tooltip="清算正在执行中,以最终结果为准"></i>
</span>
</td>

@ -284,7 +284,7 @@
<tr ng-repeat="log in settlementLogs">
<td>
{{log.clearing_time|limitTo:10}}
&nbsp;<span ng-if="$index==0&&padding" class="text-red"><i class="glyphicon glyphicon-time" uib-tooltip="清算正在执行中,以最终结果为准"></i></span>
&nbsp;<span ng-if="log.padding" class="text-red"><i class="glyphicon glyphicon-time" uib-tooltip="清算正在执行中,以最终结果为准"></i></span>
</td>
<td>
<span ng-if="log.balance_group=='RPAY_SVC_CARD'">Card Payment</span>

Loading…
Cancel
Save