撤回清算上锁

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

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

@ -231,7 +231,7 @@
<tr ng-repeat="log in settlementLogs"> <tr ng-repeat="log in settlementLogs">
<td> <td>
{{log.report_date|limitTo:10}} {{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> <i class="glyphicon glyphicon-time" uib-tooltip="清算正在执行中,以最终结果为准"></i>
</span> </span>
</td> </td>

@ -284,7 +284,7 @@
<tr ng-repeat="log in settlementLogs"> <tr ng-repeat="log in settlementLogs">
<td> <td>
{{log.clearing_time|limitTo:10}} {{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>
<td> <td>
<span ng-if="log.balance_group=='RPAY_SVC_CARD'">Card Payment</span> <span ng-if="log.balance_group=='RPAY_SVC_CARD'">Card Payment</span>

Loading…
Cancel
Save