20231031 WBS复制粘贴
This commit is contained in:
+1
-1
@@ -1015,7 +1015,7 @@
|
||||
<Version>2.1.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json">
|
||||
<Version>12.0.3</Version>
|
||||
<Version>13.0.3</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NPOI">
|
||||
<Version>2.5.5</Version>
|
||||
|
||||
@@ -421,5 +421,10 @@ namespace BLL
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static Model.WBS_BreakdownProject GetBreakdownProjectByName(string divisionProjectId, string breakdownName)
|
||||
{
|
||||
return Funs.DB.WBS_BreakdownProject.FirstOrDefault(x => x.DivisionProjectId == divisionProjectId && x.BreakdownName == breakdownName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,5 +189,26 @@ namespace BLL
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据分部id获取下级项
|
||||
/// </summary>
|
||||
/// <param name="divisionProjectId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.WBS_DivisionProject> GetDivisionProjectBySupId(string divisionProjectId)
|
||||
{
|
||||
return (from x in Funs.DB.WBS_DivisionProject where x.SuperDivisionId == divisionProjectId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据分部名称获取信息
|
||||
/// </summary>
|
||||
/// <param name="divisionName"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.WBS_DivisionProject GetDivisionProjectByName(string CNProfessionalId, string unitWorkId,string superDivisionId, string divisionName)
|
||||
{
|
||||
var q = Funs.DB.WBS_DivisionProject.FirstOrDefault(x => x.CNProfessionalId == CNProfessionalId && x.UnitWorkId == unitWorkId && x.SuperDivisionId==superDivisionId && x.DivisionName == divisionName);
|
||||
return q;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user