fix 补充岗位信息记录
This commit is contained in:
@@ -112,6 +112,9 @@ public class BirthdayVoucherService : BaseVoucherService, IVoucherService
|
|||||||
CostId = gainfo.CostId,
|
CostId = gainfo.CostId,
|
||||||
Werks = gainfo.Werks,
|
Werks = gainfo.Werks,
|
||||||
Factory = gainfo.Factory,
|
Factory = gainfo.Factory,
|
||||||
|
|
||||||
|
PositionNo = gainfo.PositionNo,
|
||||||
|
|
||||||
DepartmentNo = gainfo.DepartmentNo,
|
DepartmentNo = gainfo.DepartmentNo,
|
||||||
DepartmentNoFirst = department?.DepartmentNoFirst,
|
DepartmentNoFirst = department?.DepartmentNoFirst,
|
||||||
DepartmentNoSecond = department?.DepartmentNoSecond,
|
DepartmentNoSecond = department?.DepartmentNoSecond,
|
||||||
@@ -179,10 +182,23 @@ public class BirthdayVoucherService : BaseVoucherService, IVoucherService
|
|||||||
var endMonth = end.Month;
|
var endMonth = end.Month;
|
||||||
|
|
||||||
var overYear = endMonth < beginMonth;
|
var overYear = endMonth < beginMonth;
|
||||||
//var limit = end.Date.AddHours(9);//9点入职
|
|
||||||
|
var excludePositionNos = new List<string>
|
||||||
|
{
|
||||||
|
"41001471",
|
||||||
|
"43000181",
|
||||||
|
"43000452",
|
||||||
|
"43000459",
|
||||||
|
"49200047",
|
||||||
|
"49400001",
|
||||||
|
"49400002",
|
||||||
|
"49990004"
|
||||||
|
};
|
||||||
|
|
||||||
return await DbContext.Queryable<GainfoEntity>()
|
return await DbContext.Queryable<GainfoEntity>()
|
||||||
.WhereIF(userCodes.IsPresent(), x => userCodes.Contains(x.Code))
|
.WhereIF(userCodes.IsPresent(), x => userCodes.Contains(x.Code))
|
||||||
.Where(x => !SqlFunc.IsNullOrEmpty(x.DepartmentNo))
|
.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.Type == GainfoUserTypeEnumType.Normal || x.Type == GainfoUserTypeEnumType.SecurityWhite)
|
||||||
.Where(x => x.Birthday.HasValue && !string.IsNullOrEmpty(x.CostId))
|
.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)
|
.WhereIF(isToday, x => SqlFunc.DateValue(x.Birthday.Value, DateType.Month) == begin.Month && SqlFunc.DateValue(x.Birthday.Value, DateType.Day) == begin.Day)
|
||||||
|
|||||||
@@ -45,6 +45,12 @@ public class VoucherUserInfoEntity : SugarBaseEntity
|
|||||||
[SugarColumn(IsNullable = false)]
|
[SugarColumn(IsNullable = false)]
|
||||||
public string DepartmentNo { get; set; }
|
public string DepartmentNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 岗位No
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsNullable = false)]
|
||||||
|
public string PositionNo { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 一级部门
|
/// 一级部门
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user