20231031 WBS复制粘贴

This commit is contained in:
2023-10-31 14:33:55 +08:00
parent 5fb9c49964
commit 55f9a30a24
11 changed files with 487 additions and 87 deletions
+5 -4
View File
@@ -384,9 +384,9 @@ namespace BLL
/// </summary>
/// <param name="unitId">单位Id</param>
/// <returns>人员的数量</returns>
public static int GetPersonCountByUnitId(string unitId, string projectId, bool isOutside)
public static int GetPersonCountByUnitId(string unitId, string projectId, DateTime inTime, bool isOutside)
{
var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && x.IsUsed == true && x.IsOutside == isOutside select x).ToList();
var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && x.InTime <= inTime && x.IsUsed == true && x.IsOutside == isOutside select x).ToList();
return q.Count();
}
@@ -395,11 +395,12 @@ namespace BLL
/// </summary>
/// <param name="unitId">单位Id</param>
/// <returns>HSE人员的数量</returns>
public static int GetHSEPersonCountByUnitId(string unitId, string projectId)
public static int GetHSEPersonCountByUnitId(string unitId, string projectId, DateTime inTime)
{
var q = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
where x.UnitId == unitId && x.ProjectId == projectId && y.IsHsse==true && x.IsUsed == true select x).ToList();
where x.UnitId == unitId && x.ProjectId == projectId && x.InTime <= inTime && y.IsHsse == true && 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 == true select x).ToList();
return q.Count();
}