新增:安全技术数据

This commit is contained in:
2026-09-11 11:14:08 +08:00
parent 9bce0d340f
commit 5a2830d36a
24 changed files with 5065 additions and 292 deletions
@@ -523,173 +523,132 @@ namespace BLL
return result;
}
/// <summary>
/// 按质量控制点级别(S/A/B/C)统计数量
/// </summary>
private static int GetClassNum(string projectid, string classType)
{
return (from x in Funs.DB.WBS_BreakdownProject
where x.ProjectId == projectid && x.Class.Contains(classType) && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
select x).Count();
}
/// <summary>
/// 获取S级数
/// </summary>
/// <returns></returns>
public static int GetSNum(string projectid)
{
int result = (from x in Funs.DB.WBS_BreakdownProject
where x.ProjectId == projectid && x.Class.Contains("S") && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
select x).Count();
return result;
return GetClassNum(projectid, "S");
}
/// <summary>
/// 获取A级数
/// </summary>
/// <returns></returns>
public static int GetANum(string projectid)
{
int result = (from x in Funs.DB.WBS_BreakdownProject
where x.ProjectId == projectid && x.Class.Contains("A") && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
select x).Count();
return result;
return GetClassNum(projectid, "A");
}
/// <summary>
/// 获取B级数
/// </summary>
/// <returns></returns>
public static int GetBNum(string projectid)
{
int result = (from x in Funs.DB.WBS_BreakdownProject
where x.ProjectId == projectid && x.Class.Contains("B") && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
select x).Count();
return result;
return GetClassNum(projectid, "B");
}
/// <summary>
/// 获取C级数
/// </summary>
/// <returns></returns>
public static int GetCNum(string projectid)
{
int result = (from x in Funs.DB.WBS_BreakdownProject
where x.ProjectId == projectid && x.Class.Contains("C") && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
select x).Count();
return result;
return GetClassNum(projectid, "C");
}
/// <summary>
/// 按验收类型统计验收数
/// </summary>
private static int GetInspectionNum(string projectid, string checkAcceptType)
{
return (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
where y.ProjectId == projectid && y.CheckAcceptType == checkAcceptType && x.CreateDate > Const.DtmarkTime
select x).Count();
}
/// <summary>
/// 按验收类型统计一次验收合格数
/// </summary>
private static int GetInspectionOkNum(string projectid, string checkAcceptType)
{
return (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
where y.ProjectId == projectid && y.CheckAcceptType == checkAcceptType && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count();
}
/// <summary>
/// 获取关键工序验收数
/// </summary>
/// <returns></returns>
public static int GetKeyProcessNum(string projectid)
{
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
where y.ProjectId == projectid && y.CheckAcceptType == "1" && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
return GetInspectionNum(projectid, "1");
}
/// <summary>
/// 获取关键工序验收合格数
/// </summary>
/// <returns></returns>
public static int GetKeyProcessOkNum(string projectid)
{
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
where y.ProjectId == projectid && y.CheckAcceptType == "1" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
return GetInspectionOkNum(projectid, "1");
}
/// <summary>
/// 获取特殊过程验收数
/// </summary>
/// <returns></returns>
public static int GetSpecialProcessNum(string projectid)
{
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
where y.ProjectId == projectid && y.CheckAcceptType == "2" && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
return GetInspectionNum(projectid, "2");
}
/// <summary>
/// 获取特殊过程验收合格数
/// </summary>
/// <returns></returns>
public static int GetSpecialProcessOkNum(string projectid)
{
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
where y.ProjectId == projectid && y.CheckAcceptType == "2" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
return GetInspectionOkNum(projectid, "2");
}
/// <summary>
/// 获取隐蔽工程验收数
/// </summary>
/// <returns></returns>
public static int GetConcealedWorksNum(string projectid)
{
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
where y.ProjectId == projectid && y.CheckAcceptType == "3" && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
return GetInspectionNum(projectid, "3");
}
/// <summary>
/// 获取隐蔽工程验收合格数
/// </summary>
/// <returns></returns>
public static int GetConcealedWorksOkNum(string projectid)
{
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
where y.ProjectId == projectid && y.CheckAcceptType == "3" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
return GetInspectionOkNum(projectid, "3");
}
/// <summary>
/// 获取单位工程一次验收数
/// </summary>
/// <returns></returns>
public static int GetUnitProjectOnesNum(string projectid)
{
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
where y.ProjectId == projectid && y.CheckAcceptType == "4" && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
return GetInspectionNum(projectid, "4");
}
/// <summary>
/// 获取单位工程一次验收合格数
/// </summary>
/// <returns></returns>
public static int GetUnitProjectOnesOKNum(string projectid)
{
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
where y.ProjectId == projectid && y.CheckAcceptType == "4" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
return GetInspectionOkNum(projectid, "4");
}
/// <summary>
/// 获取材料进场复验数
/// </summary>
/// <returns></returns>
public static int GetMaterialInRecheckNum(string projectid)
{
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
where y.ProjectId == projectid && y.CheckAcceptType == "5" && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
return GetInspectionNum(projectid, "5");
}
/// <summary>
/// 获取材料进场复验合格数
/// </summary>
/// <returns></returns>
public static int GetMaterialInRecheckOKNum(string projectid)
{
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
where y.ProjectId == projectid && y.CheckAcceptType == "5" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
return GetInspectionOkNum(projectid, "5");
}
/// <summary>
/// 获取单项工程个数