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; } + /// /// 一级部门 ///