fix 作废明细增加权限控制
This commit is contained in:
@@ -82,6 +82,7 @@ public class BalanceService : IBalanceService
|
||||
TenantId = record.TenantId,
|
||||
})
|
||||
.ToPageListAsync(request);
|
||||
|
||||
page.Data.ForEach(item =>
|
||||
{
|
||||
item.Amount = Math.Abs(item.Amount);
|
||||
@@ -414,7 +415,7 @@ public class BalanceService : IBalanceService
|
||||
//每个餐次人数
|
||||
BreakfastNumberOfPeople = first.Where(x => x.ShiftType == ShiftEnumType.Breakfast).Select(x => x.UserNo).Distinct().Count(),
|
||||
LunchNumberOfPeople = first.Where(x => x.ShiftType == ShiftEnumType.Lunch).Select(x => x.UserNo).Distinct().Count(),
|
||||
DinnerNumberOfPeople = first.Where(x => x.ShiftType == ShiftEnumType.Lunch).Select(x => x.UserNo).Distinct().Count(),
|
||||
DinnerNumberOfPeople = first.Where(x => x.ShiftType == ShiftEnumType.Dinner).Select(x => x.UserNo).Distinct().Count(),
|
||||
LateNightNumberOfPeople = first.Where(x => x.ShiftType == ShiftEnumType.Nightsnack).Select(x => x.UserNo).Distinct().Count(),
|
||||
|
||||
TotalNumberOfPeople = first.Where(x => x.CostDate.ToString("yyyy-MM-dd") == first.Key).Select(x => x.UserNo).Distinct().Count()
|
||||
@@ -532,7 +533,7 @@ public class BalanceService : IBalanceService
|
||||
.Select((record, ga, department, bplace) => new BalanceRecordUserPageResponse
|
||||
{
|
||||
Id = record.Id,
|
||||
CurrentAmount = record.Amount,
|
||||
CurrentAmount = SqlFunc.Abs(record.Amount),
|
||||
Source = record.Source,
|
||||
No = record.No,
|
||||
BusinessPlaceName = bplace.Name,
|
||||
@@ -549,6 +550,7 @@ public class BalanceService : IBalanceService
|
||||
var monthSum = await _dbContext.Queryable<BalanceRecordEntity>()
|
||||
.Where(x => x.CostDateTime >= monthStart && x.CostDateTime <= monthEnd)
|
||||
.Where(x => x.Type == BalanceRecordTypeEnumType.Out)
|
||||
.Where(x => x.Status == BalanceRecordStatusEnumType.Valid)
|
||||
.Where(x => x.UserCode == jinkoCode)
|
||||
.SumAsync(x => SqlFunc.Abs(x.Amount));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user