This commit is contained in:
2026-04-08 14:03:39 +08:00
parent 7ecbc2ebc0
commit 4a1b636ce0
353 changed files with 1378 additions and 500 deletions
@@ -7,7 +7,7 @@ namespace BLL
{
public class ConstructionRiskApproveService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 获取风险管控模板列表
/// </summary>
@@ -16,6 +16,7 @@ namespace BLL
/// <returns></returns>
public static DataTable getListData(string ConstructionRiskId)
{
Model.CNPCDB db = Funs.DB;
var res = from x in db.HSSE_ConstructionRiskApprove
where x.ConstructionRiskId == ConstructionRiskId && x.ApproveDate != null && x.ApproveType != "S"
orderby x.ApproveDate
@@ -76,6 +77,7 @@ namespace BLL
/// <returns></returns>
public static Model.HSSE_ConstructionRiskApprove GetSee(string ConstructionRiskId, string userId)
{
Model.CNPCDB db = Funs.DB;
return db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
}
public static void See(string ConstructionRiskId, string userId)
@@ -97,6 +99,7 @@ namespace BLL
/// <returns>一个风险管控审批实体</returns>
public static Model.HSSE_ConstructionRiskApprove GetConstructionRiskApproveByConstructionRiskId(string ConstructionRiskId)
{
Model.CNPCDB db = Funs.DB;
return db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType != "S" && x.ApproveDate == null);
}
/// <summary>
@@ -162,6 +165,7 @@ namespace BLL
/// <returns></returns>
public static Model.HSSE_ConstructionRiskApprove GetAudit1(string ConstructionRiskId)
{
Model.CNPCDB db = Funs.DB;
return db.HSSE_ConstructionRiskApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Audit1);
}
@@ -172,6 +176,7 @@ namespace BLL
/// <returns></returns>
public static Model.HSSE_ConstructionRiskApprove GetAudit2(string ConstructionRiskId)
{
Model.CNPCDB db = Funs.DB;
return db.HSSE_ConstructionRiskApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Audit2);
}
@@ -182,11 +187,13 @@ namespace BLL
/// <returns></returns>
public static Model.HSSE_ConstructionRiskApprove GetAudit3(string ConstructionRiskId)
{
Model.CNPCDB db = Funs.DB;
return db.HSSE_ConstructionRiskApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Audit3);
}
public static Model.HSSE_ConstructionRiskApprove GetComplie(string ConstructionRiskId)
{
Model.CNPCDB db = Funs.DB;
return db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == BLL.Const.ConstructionRisk_Compile);
}
public static List<Model.HSSE_ConstructionRiskApprove> GetListDataByCodeForApi(string code)