diff --git a/SGGL/BLL/API/HSSE/APIHazardRegisterService.cs b/SGGL/BLL/API/HSSE/APIHazardRegisterService.cs
index f6b55d29..984e0eb3 100644
--- a/SGGL/BLL/API/HSSE/APIHazardRegisterService.cs
+++ b/SGGL/BLL/API/HSSE/APIHazardRegisterService.cs
@@ -133,5 +133,51 @@ namespace BLL
}
}
}
+
+ ///
+ /// 安全巡检
+ ///
+ ///
+ ///
+ public static List getHazardRegisterByProjectIdStates(int pageIndex)
+ {
+ string unitName = null, unitId = null;
+ var getUnit = CommonService.GetIsThisUnit();
+ if (getUnit != null)
+ {
+ unitId = getUnit.UnitId;
+ unitName = getUnit.UnitName;
+ }
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var hazardRegisters = (from x in db.HSSE_Hazard_HazardRegister
+ join y in db.Base_Project on x.ProjectId equals y.ProjectId
+ join u in db.Base_Unit on x.ResponsibleUnit equals u.UnitId
+ where x.ProjectId != null && x.States != null
+ select new Model.HazardRegisterItem
+ {
+ HazardRegisterId = x.HazardRegisterId,
+ ProjectId = x.ProjectId,
+ ProjectName = y.ProjectName,
+ ProjectAddress = y.ProjectAddress,
+ UnitId = unitId,
+ UnitName = unitName,
+ PUnitId = y.UnitId,
+ PUnitName = db.Base_Unit.First(U => y.UnitId == U.UnitId).UnitName,
+ States = x.States,
+ WorkAreaName = db.WBS_UnitWork.First(w => x.Place == w.UnitWorkId).UnitWorkName,
+ CheckTime = x.CheckTime,
+ RegisterDef = x.RegisterDef,
+ RegisterTypesName = db.HSSE_Hazard_HazardRegisterTypes.First(T => x.RegisterTypesId == T.RegisterTypesId).RegisterTypesName,
+ Rectification = x.Rectification,
+ ResponsibilityUnitName = db.Base_Unit.First(U => x.ResponsibleUnit == U.UnitId).UnitName,
+ ResponsibilityManName = "",
+ RectificationTime = x.RectificationTime,
+ Risk_Level = (x.HazardValue =="3"?"重大":"一般"),
+
+ }).OrderBy(x => x.CheckTime).Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
+ return hazardRegisters;
+ }
+ }
}
}
diff --git a/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj b/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj
index c4c16785..27c0cbf1 100644
--- a/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj
+++ b/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj
@@ -3392,7 +3392,6 @@
ActionPlanListEdit.aspx
- ASPXCodeBehind
ActionPlanListEdit.aspx
diff --git a/SGGL/Model/APIItem/HSSE/HazardRegisterItem.cs b/SGGL/Model/APIItem/HSSE/HazardRegisterItem.cs
index b1aa5eb8..47bce3b2 100644
--- a/SGGL/Model/APIItem/HSSE/HazardRegisterItem.cs
+++ b/SGGL/Model/APIItem/HSSE/HazardRegisterItem.cs
@@ -28,6 +28,46 @@ namespace Model
get;
set;
}
+ ///
+ /// 单位ID
+ ///
+ public string UnitId
+ {
+ get;
+ set;
+ }
+ ///
+ /// 单位名称
+ ///
+ public string UnitName
+ {
+ get;
+ set;
+ }
+ ///
+ /// 项目单位ID
+ ///
+ public string PUnitId
+ {
+ get;
+ set;
+ }
+ ///
+ /// 项目单位名称
+ ///
+ public string PUnitName
+ {
+ get;
+ set;
+ }
+ ///
+ /// 项目名称
+ ///
+ public string ProjectAddress
+ {
+ get;
+ set;
+ }
///
/// 状态
@@ -391,5 +431,14 @@ namespace Model
get;
set;
}
+
+ ///
+ /// 风险等级
+ ///
+ public string Risk_Level
+ {
+ get;
+ set;
+ }
}
}
diff --git a/SGGL/WebAPI/Controllers/HSSE/HazardRegisterController.cs b/SGGL/WebAPI/Controllers/HSSE/HazardRegisterController.cs
index 0db9548c..e76f8a56 100644
--- a/SGGL/WebAPI/Controllers/HSSE/HazardRegisterController.cs
+++ b/SGGL/WebAPI/Controllers/HSSE/HazardRegisterController.cs
@@ -123,5 +123,51 @@ namespace WebAPI.Controllers
return responeData;
}
#endregion
+
+ #region 获取总安全巡检
+ ///
+ /// 获取总安全巡检
+ ///
+ ///
+ public Model.ResponeData getHazardRegisterTotalCount()
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ //总数
+ responeData.data = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId != null && x.States != null).Count();
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+
+ return responeData;
+ }
+ #endregion
+
+ #region 获取总安全巡检
+ ///
+ /// 获取总安全巡检
+ ///
+ /// 页码
+ ///
+ public Model.ResponeData getHazardRegisterByProjectIdStates(int pageIndex)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = APIHazardRegisterService.getHazardRegisterByProjectIdStates(pageIndex);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+
+ return responeData;
+ }
+ #endregion
}
}