From b23bdc3e467158d3dd23799442b74c5bfc41ccf8 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Tue, 30 Dec 2025 10:15:31 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=A1=A5=E5=85=85=E5=B2=97=E4=BD=8D?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implements/BirthdayVoucherService.cs | 18 +++++++++++++++++- .../Entities/Voucher/VoucherUserInfoEntity.cs | 6 ++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Src/Dlhis.Canteen/Voucher/Services/Implements/BirthdayVoucherService.cs b/Src/Dlhis.Canteen/Voucher/Services/Implements/BirthdayVoucherService.cs index 14c4a2c5..d6a84c5e 100644 --- a/Src/Dlhis.Canteen/Voucher/Services/Implements/BirthdayVoucherService.cs +++ b/Src/Dlhis.Canteen/Voucher/Services/Implements/BirthdayVoucherService.cs @@ -112,6 +112,9 @@ public class BirthdayVoucherService : BaseVoucherService, IVoucherService CostId = gainfo.CostId, Werks = gainfo.Werks, Factory = gainfo.Factory, + + PositionNo = gainfo.PositionNo, + DepartmentNo = gainfo.DepartmentNo, DepartmentNoFirst = department?.DepartmentNoFirst, DepartmentNoSecond = department?.DepartmentNoSecond, @@ -179,10 +182,23 @@ public class BirthdayVoucherService : BaseVoucherService, IVoucherService var endMonth = end.Month; var overYear = endMonth < beginMonth; - //var limit = end.Date.AddHours(9);//9点入职 + + var excludePositionNos = new List + { + "41001471", + "43000181", + "43000452", + "43000459", + "49200047", + "49400001", + "49400002", + "49990004" + }; + return await DbContext.Queryable() .WhereIF(userCodes.IsPresent(), x => userCodes.Contains(x.Code)) .Where(x => !SqlFunc.IsNullOrEmpty(x.DepartmentNo)) + .Where(x => !excludePositionNos.Contains(x.PositionNo))//排除特殊岗位 .Where(x => x.Type == GainfoUserTypeEnumType.Normal || x.Type == GainfoUserTypeEnumType.SecurityWhite) .Where(x => x.Birthday.HasValue && !string.IsNullOrEmpty(x.CostId)) .WhereIF(isToday, x => SqlFunc.DateValue(x.Birthday.Value, DateType.Month) == begin.Month && SqlFunc.DateValue(x.Birthday.Value, DateType.Day) == begin.Day) diff --git a/Src/Dlhis.Entity/Canteen/Entities/Voucher/VoucherUserInfoEntity.cs b/Src/Dlhis.Entity/Canteen/Entities/Voucher/VoucherUserInfoEntity.cs index 54874fc7..a98084fa 100644 --- a/Src/Dlhis.Entity/Canteen/Entities/Voucher/VoucherUserInfoEntity.cs +++ b/Src/Dlhis.Entity/Canteen/Entities/Voucher/VoucherUserInfoEntity.cs @@ -45,6 +45,12 @@ public class VoucherUserInfoEntity : SugarBaseEntity [SugarColumn(IsNullable = false)] public string DepartmentNo { get; set; } + /// + /// 岗位No + /// + [SugarColumn(IsNullable = false)] + public string PositionNo { get; set; } + /// /// 一级部门 ///