河北专项检查和移动端
This commit is contained in:
@@ -150,6 +150,42 @@ namespace BLL
|
||||
}
|
||||
|
||||
|
||||
#region 按项目和检查日期获取日常巡检
|
||||
public static List<Model.HazardRegisterItem> getHazardRegisterByProjectIdStates(string projectId, string date)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
DateTime mdate = Funs.GetNewDateTimeOrNow(date);
|
||||
var hazardRegisters = (from x in db.HSSE_Hazard_HazardRegister
|
||||
//join y in db.Base_Project on x.ProjectId equals projectId
|
||||
where x.ProjectId == projectId
|
||||
&& x.CheckTime.Value.Year == mdate.Year
|
||||
&& x.CheckTime.Value.Month == mdate.Month
|
||||
&& x.CheckTime.Value.Day == mdate.Day
|
||||
select new Model.HazardRegisterItem
|
||||
{
|
||||
HazardRegisterId = x.HazardRegisterId,
|
||||
ProjectId = x.ProjectId,
|
||||
ProjectName = db.Base_Project.First(p=>p.ProjectId == x.ProjectId).ProjectName,
|
||||
States = x.States,
|
||||
Place = x.Place,
|
||||
CheckTime = x.CheckTime,
|
||||
CheckManName = db.Sys_User.First(u => u.UserId == x.CheckManId).UserName,
|
||||
RectifyName = x.RectifyName,
|
||||
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 = db.Sys_User.First(User => x.ResponsibleMan == User.UserId).UserName,
|
||||
RectificationTime = x.RectificationTime,
|
||||
Risk_Level = x.Risk_Level,
|
||||
|
||||
}).OrderBy(x => x.CheckTime).ToList();
|
||||
return hazardRegisters;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 安全巡检
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user