1
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public static class ConstructionRiskCheckService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 要求主键获取危险清单信息
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public static class ConstructionRiskListService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 要求主键获取危险清单信息
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace BLL
|
||||
{
|
||||
public static class Hazard_EnvironmentalRiskItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据危险源明细表id得到明细信息
|
||||
@@ -136,6 +136,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Hazard_EnvironmentalRiskItem> GetEnvironmentalRiskItemByEnvironmentalId(string environmentalId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Hazard_EnvironmentalRiskItem where x.EnvironmentalId == environmentalId select x).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
{
|
||||
public static class Hazard_EnvironmentalRiskListService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 要求主键获取危险清单信息
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
{
|
||||
public static class Hazard_HazardListService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 要求主键获取危险清单信息
|
||||
@@ -27,6 +27,7 @@ namespace BLL
|
||||
/// <returns>危险清单的数量</returns>
|
||||
public static int GetHazardListCountByVersionNoIsNull(string projectId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Hazard_HazardList where x.VersionNo == null && x.ProjectId == projectId select x).Count();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public static class Hazard_HazardSelectedItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据危险源类别编号查询危险源类别
|
||||
@@ -17,6 +17,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getHazardSelectedItemByHazardListTypeId(string hazardListTypeId, string hazardListId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return from x in db.Hazard_HazardSelectedItem
|
||||
where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId
|
||||
select new
|
||||
@@ -51,6 +52,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getHazardSelectedItemByHazardListTypeId(string hazardListTypeId, string hazardListId, string workStage)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return from x in db.Hazard_HazardSelectedItem
|
||||
where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId && x.WorkStage == workStage
|
||||
select new
|
||||
@@ -84,6 +86,7 @@ namespace BLL
|
||||
/// <returns>危险因素明细集合</returns>
|
||||
public static List<Model.Hazard_HazardSelectedItem> GetHazardSelectedItemByHazardListTypeIdAndHazardListId(string hazardListTypeId, string hazardListId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Hazard_HazardSelectedItem where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId select x).ToList();
|
||||
}
|
||||
|
||||
@@ -93,6 +96,7 @@ namespace BLL
|
||||
/// <returns>危险因素明细集合</returns>
|
||||
public static List<Model.Hazard_HazardSelectedItem> GetPromptTimeIsNotNullHazardSelectedItemByHazardListTypeIdAndHazardListId(string hazardListTypeId, string hazardListId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Hazard_HazardSelectedItem where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId && x.PromptTime != null select x).ToList();
|
||||
}
|
||||
|
||||
@@ -103,6 +107,7 @@ namespace BLL
|
||||
/// <returns>一个危险源辨识与评价清单审批实体</returns>
|
||||
public static Model.Hazard_HazardSelectedItem GetHazardSelectedItemByHazardId(string hazardId, string hazardListId, string workStage)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.Hazard_HazardSelectedItem.FirstOrDefault(x => x.HazardId == hazardId && x.HazardListId == hazardListId && x.WorkStage == workStage);
|
||||
}
|
||||
|
||||
@@ -113,6 +118,7 @@ namespace BLL
|
||||
/// <returns>一个危险源辨识与评价清单审批实体</returns>
|
||||
public static Model.Hazard_HazardSelectedItem GetHazardSelectedItemByHazardSelectedItemId(string hazardSelectedItemId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.Hazard_HazardSelectedItem.FirstOrDefault(x => x.HazardSelectedItemId == hazardSelectedItemId);
|
||||
}
|
||||
|
||||
@@ -123,6 +129,7 @@ namespace BLL
|
||||
/// <returns>一个危险源辨识与评价清单审批实体</returns>
|
||||
public static Model.Hazard_HazardSelectedItem GetHazardSelectedItemByHazardId(string hazardId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.Hazard_HazardSelectedItem.FirstOrDefault(x => x.HazardId == hazardId);
|
||||
}
|
||||
|
||||
@@ -156,6 +163,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Hazard_HazardSelectedItem> GetHazardSelectedItemBySortAndListIdAndWorkStage(string hazardListTypeId, string hazardListId, string workStage)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Hazard_HazardSelectedItem where x.HazardListTypeId == hazardListTypeId && x.HazardListId == hazardListId && x.WorkStage == workStage select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user