河北专项检查和移动端

This commit is contained in:
2025-04-06 23:26:22 +08:00
parent 64c7be5db4
commit 8aba5b01bc
204 changed files with 41904 additions and 3226 deletions
@@ -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>