From a520782f36f0180ee2d1ba35298bf73a0b902a9f Mon Sep 17 00:00:00 2001 From: liguoyang Date: Tue, 16 Jan 2024 15:30:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=AD=97=E6=AE=B5=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/Dlhis.Basic/MealUser/Response/MealUserResponse.cs | 2 +- .../MealUser/Services/Implements/MealUserService.cs | 2 +- Src/Dlhis.Basic/Organization/Request/GainfoSaveRequest.cs | 2 +- .../Organization/Response/GainfoPageResponse.cs | 2 +- .../Organization/Services/Implements/GainfoService.cs | 7 ++++++- Src/Dlhis.Entity/Basic/Entity/CanteenUserEntity.cs | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Src/Dlhis.Basic/MealUser/Response/MealUserResponse.cs b/Src/Dlhis.Basic/MealUser/Response/MealUserResponse.cs index 8f8ee0cb..a750372e 100644 --- a/Src/Dlhis.Basic/MealUser/Response/MealUserResponse.cs +++ b/Src/Dlhis.Basic/MealUser/Response/MealUserResponse.cs @@ -25,7 +25,7 @@ public class MealUserResponse /// /// 卡号 /// - public string CarNo { get; set; } + public string CardNo { get; set; } /// diff --git a/Src/Dlhis.Basic/MealUser/Services/Implements/MealUserService.cs b/Src/Dlhis.Basic/MealUser/Services/Implements/MealUserService.cs index abb698f6..91eba167 100644 --- a/Src/Dlhis.Basic/MealUser/Services/Implements/MealUserService.cs +++ b/Src/Dlhis.Basic/MealUser/Services/Implements/MealUserService.cs @@ -45,7 +45,7 @@ public class MealUserService : IMealUserService UserNo = request.UserNo, UserType = request.UserType, UserCode = gainfoEntity.Code, - CarNo = gainfoEntity.CardNo, + CardNo = gainfoEntity.CardNo, Balance = 0, BalanceOfRecharge = 0, BalanceOfSubsidies = 0, diff --git a/Src/Dlhis.Basic/Organization/Request/GainfoSaveRequest.cs b/Src/Dlhis.Basic/Organization/Request/GainfoSaveRequest.cs index 895357ff..54f41fe3 100644 --- a/Src/Dlhis.Basic/Organization/Request/GainfoSaveRequest.cs +++ b/Src/Dlhis.Basic/Organization/Request/GainfoSaveRequest.cs @@ -98,7 +98,7 @@ public class GainfoSaveRequest : IValidatableObject /// /// 卡号 /// - public string CarNo { get; set; } + public string CardNo { get; set; } /// /// 备注 diff --git a/Src/Dlhis.Basic/Organization/Response/GainfoPageResponse.cs b/Src/Dlhis.Basic/Organization/Response/GainfoPageResponse.cs index 5c3a43be..df112cee 100644 --- a/Src/Dlhis.Basic/Organization/Response/GainfoPageResponse.cs +++ b/Src/Dlhis.Basic/Organization/Response/GainfoPageResponse.cs @@ -97,7 +97,7 @@ public class GainfoPageResponse /// /// 卡号 /// - public string CarNo { get; set; } + public string CardNo { get; set; } /// /// 备注 diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs index 3da1f9bc..9a7f6a44 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs @@ -4,6 +4,7 @@ using Dlhis.Basic.Organization.Response; using Dlhis.Entity.Basic.Entity; using Dlhis.Entity.Basic.Enums; using Dlhis.Entity.Device.Enums; +using Dm.filter.rw; using Kurisu.AspNetCore.Scope; using Kurisu.AspNetCore.UnifyResultAndValidation; using Kurisu.AspNetCore.Utils.Extensions; @@ -29,7 +30,8 @@ public class GainfoService : IGainfoService public GainfoService(IGainfoStore gainfoStore, IDbContext dbContext, ICurrentUser currentUser, - IDevicePermissionService devicePermissionService, ILogger logger) + IDevicePermissionService devicePermissionService, + ILogger logger) { _gainfoStore = gainfoStore; _dbContext = dbContext; @@ -47,8 +49,11 @@ public class GainfoService : IGainfoService { request.DepartmentNos = await GetRecursionDepartmentNosAsync(request.DepartmentNos); + var tenant = _currentUser.GetStringTenantId(); + var page = await _gainfoStore.Queryable(request.Status) .WhereIF(request.DepartmentNos?.Any() == true, gainfo => request.DepartmentNos.Contains(gainfo.DepartmentNo)) + .Where(gainfo => gainfo.Werks == tenant) .Select() .ToPageListAsync(request); diff --git a/Src/Dlhis.Entity/Basic/Entity/CanteenUserEntity.cs b/Src/Dlhis.Entity/Basic/Entity/CanteenUserEntity.cs index f5ccb93b..8ec7bdab 100644 --- a/Src/Dlhis.Entity/Basic/Entity/CanteenUserEntity.cs +++ b/Src/Dlhis.Entity/Basic/Entity/CanteenUserEntity.cs @@ -37,7 +37,7 @@ public class CanteenUserEntity : SugarBaseEntity, IVersion, ITenantId /// 卡号 /// [SugarColumn(ColumnDescription = "卡号")] - public string CarNo { get; set; } + public string CardNo { get; set; } ///