|
|
@ -326,6 +326,8 @@ public class Ghre_StudyRuleServices : BaseServices<Ghre_StudyRule, Ghre_StudyRul |
|
|
|
{ |
|
|
|
{ |
|
|
|
//await Db.Ado.BeginTranAsync(); |
|
|
|
//await Db.Ado.BeginTranAsync(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isFliterTempStaff = false; |
|
|
|
|
|
|
|
|
|
|
|
var rule = await Db.Queryable<Ghre_StudyRule>().FirstAsync(x => x.Id == ruleId); |
|
|
|
var rule = await Db.Queryable<Ghre_StudyRule>().FirstAsync(x => x.Id == ruleId); |
|
|
|
|
|
|
|
|
|
|
|
var ZoneIds = new List<int?>(); |
|
|
|
var ZoneIds = new List<int?>(); |
|
|
@ -399,6 +401,12 @@ public class Ghre_StudyRuleServices : BaseServices<Ghre_StudyRule, Ghre_StudyRul |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 判断是否需要过滤临时工(宝连通) |
|
|
|
|
|
|
|
if (rule.DataBelongID.IsNotEmptyOrNull() && rule.TrainType == "NewStaff") |
|
|
|
|
|
|
|
isFliterTempStaff = await Db.Queryable<Ghrs_DataBelong>().Where(x => x.DataBelongNo == "BLT01").AnyAsync(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
var staffs = await Db.Queryable<Ghra_Staff>() |
|
|
|
var staffs = await Db.Queryable<Ghra_Staff>() |
|
|
|
.WhereIF(inStaffIds.Any(), x => inStaffIds.Contains(x.StaffID)) |
|
|
|
.WhereIF(inStaffIds.Any(), x => inStaffIds.Contains(x.StaffID)) |
|
|
|
.Where(x => x.OutDate == null || (x.OutDate != null && x.Indate != null && x.Indate.Value.Date <= DateTime.Now.Date && x.Indate.Value.Date >= DateTime.Now.Date)) |
|
|
|
.Where(x => x.OutDate == null || (x.OutDate != null && x.Indate != null && x.Indate.Value.Date <= DateTime.Now.Date && x.Indate.Value.Date >= DateTime.Now.Date)) |
|
|
@ -409,6 +417,7 @@ public class Ghre_StudyRuleServices : BaseServices<Ghre_StudyRule, Ghre_StudyRul |
|
|
|
.WhereIF(JobIds.Any(), x => JobIds.Contains(x.JobID)) |
|
|
|
.WhereIF(JobIds.Any(), x => JobIds.Contains(x.JobID)) |
|
|
|
.WhereIF(!ruleStaffIds.IsNull() && ruleStaffIds.Any(), x => ruleStaffIds.Contains(x.StaffID)) |
|
|
|
.WhereIF(!ruleStaffIds.IsNull() && ruleStaffIds.Any(), x => ruleStaffIds.Contains(x.StaffID)) |
|
|
|
.WhereIF(rule.DataBelongID.IsNotEmptyOrNull(), x => x.DataBelongID == rule.DataBelongID) |
|
|
|
.WhereIF(rule.DataBelongID.IsNotEmptyOrNull(), x => x.DataBelongID == rule.DataBelongID) |
|
|
|
|
|
|
|
.WhereIF(isFliterTempStaff, x => x.Reverse16 != "03") |
|
|
|
.ToListAsync(); |
|
|
|
.ToListAsync(); |
|
|
|
|
|
|
|
|
|
|
|
if (staffs.Any()) |
|
|
|
if (staffs.Any()) |
|
|
|