fix 处理营业点分配功能问题

This commit is contained in:
2024-07-02 15:53:55 +08:00
parent 38ab947790
commit 2cea51232f
9 changed files with 46 additions and 91 deletions

View File

@@ -303,7 +303,7 @@ public class BalanceService : IBalanceService
.WhereIF(request.SearchDateTimePeriod?.End.HasValue == true, record => record.CostDate <= request.SearchDateTimePeriod.End)
.WhereIF(request.ApplicationType.HasValue, record => record.ApplicationType == request.ApplicationType)
.Where((record, ga) => ga.Code == jinkoCode)
.OrderBy(record => record.CreateTime, OrderByType.Desc)
.OrderBy(record => record.CostDateTime)
.Select((record, ga, department, bPlace) => new BalanceRecordUserPageResponse
{
Id = record.Id,
@@ -621,7 +621,7 @@ public class BalanceService : IBalanceService
.Where(x => x.Code == request.UserCode)
.SingleAsync();
(gainfo == null).ThrowIfTrue($"工号{request.UserCode}不存在");
gainfo.ThrowIfNull($"工号{request.UserCode}不存在");
await _dbContext.InsertAsync(new BalanceRecordEntity
{
@@ -686,7 +686,7 @@ public class BalanceService : IBalanceService
}
}
public async Task ReCalcAsync(BalanceReCalcRequest request)
{
await CommonHelper.RetryAsync(async () =>