合并最新
This commit is contained in:
@@ -141,7 +141,7 @@ namespace BLL
|
||||
/// <returns>人员的数量</returns>
|
||||
public static int GetPersonCountByUnitId(string unitId, string projectId)
|
||||
{
|
||||
var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && x.IsUsed == true select x).ToList();
|
||||
var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && x.IsUsed == 1 select x).ToList();
|
||||
return q.Count();
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace BLL
|
||||
/// <returns>HSE人员的数量</returns>
|
||||
public static int GetHSEPersonCountByUnitId(string unitId, string projectId)
|
||||
{
|
||||
var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && (x.WorkPostId == BLL.Const.WorkPost_HSSEEngineer || x.WorkPostId == BLL.Const.WorkPost_SafetyManager) && x.IsUsed == true select x).ToList();
|
||||
var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && (x.WorkPostId == BLL.Const.WorkPost_HSSEEngineer || x.WorkPostId == BLL.Const.WorkPost_SafetyManager) && x.IsUsed == 1 select x).ToList();
|
||||
return q.Count();
|
||||
}
|
||||
|
||||
@@ -519,6 +519,27 @@ namespace BLL
|
||||
return (from x in Funs.DB.SitePerson_Person where x.WorkAreaId == workAreaId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 人员离岗
|
||||
/// </summary>
|
||||
/// <param name="person"></param>
|
||||
public static void PersonOut(string personId, DateTime date)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var person = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == personId);
|
||||
if (person != null)
|
||||
{
|
||||
person.OutTime = date;
|
||||
person.IsUsed = 1;
|
||||
person.ExchangeTime = null;
|
||||
person.ExchangeTime2 = null;
|
||||
person.RealNameUpdateTime = null;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 表下拉框
|
||||
/// <summary>
|
||||
/// 表下拉框
|
||||
@@ -592,7 +613,7 @@ namespace BLL
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.SitePerson_Person> getInPersonLists = from x in db.SitePerson_Person
|
||||
where x.IsUsed == true && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime > DateTime.Now)
|
||||
where x.IsUsed == 1 && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime > DateTime.Now)
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user