feat 重算

This commit is contained in:
2024-07-02 11:12:25 +08:00
parent e9f71bcef3
commit 80e92d0019
4 changed files with 66 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.Data;
using Dlhis.Canteen.Order.Request;
using Dlhis.Canteen.Order.Response;
using Dlhis.Canteen.Order.Services;
@@ -29,7 +30,7 @@ public class BalancesController : ControllerBase
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Authorize()]
[Authorize]
[HttpGet]
public async Task<Pagination<BalanceRecordResponse>> GetPageAsync([FromQuery] BalanceRecordPageRequest request)
{
@@ -174,4 +175,18 @@ public class BalancesController : ControllerBase
{
await _balanceService.ManuallyImportBalanceAndReCalcAsync(requests);
}
/// <summary>
/// 重算
/// </summary>
/// <param name="request"></param>
[Authorize(Roles = "admin")]
[HttpPost("manuallyRecalc")]
[IgnoreTenant]
[Transactional(IsolationLevel.ReadCommitted)]
public async Task ReCalcAsync(BalanceReCalcRequest request)
{
await _balanceService.ReCalcAsync(request);
}
}