河北专项检查和移动端

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
+83 -6
View File
@@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
@@ -34,9 +35,7 @@ namespace FineUIPro.Web.common
if (!IsPostBack)
{
Model.SGGLDB db = Funs.DB;
this.divMajorProjectsUnderConstructionNum.InnerHtml = (from x in db.Solution_LargerHazard
where x.States == "2" && x.RecordTime > Const.DtmarkTime
select x).Count().ToString();
////项目信息
getProjectInfo(db);
getPersonWorkTime(db);
@@ -79,6 +78,86 @@ namespace FineUIPro.Web.common
getRate();
}
}
#region
[WebMethod]
public static Object GetServiceData(string date)
{
DateTime mdate = Funs.GetNewDateTimeOrNow(date);
int m_count = Funs.DB.Project_ProjectUser.Count();
int job_count = (from x in Funs.DB.Meeting_ClassMeeting
where x.ClassMeetingDate.Value.Year == mdate.Year && x.ClassMeetingDate.Value.Month == mdate.Month && x.ClassMeetingDate.Value.Day == mdate.Day
select new Model.MeetingItem
{
AttentPersonNum = x.AttentPersonNum ?? 0,
}).ToList().Sum(s => s.AttentPersonNum);
return new
{
m_count = m_count,
job_count = job_count,
all_count = job_count + m_count,
};
}
#endregion
#region
[WebMethod]
public static Object GetSafetyProblemStatistics( string startdate, string enddate)
{
DateTime startd = Funs.GetNewDateTimeOrNow(string.Format("{0} {1}", startdate, "00:00:00"));
DateTime endd = Funs.GetNewDateTimeOrNow(string.Format("{0} {1}", enddate, "23:59:59"));
// 日常巡检总数
List<Model.HSSE_Hazard_HazardRegister> HAllList = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProblemTypes == "1" && x.CheckTime > startd && x.CheckTime < endd).ToList();
int HAllCount = HAllList.Where(x => x.States != "4").Count();
int HDoneCount = HAllList.Where(x => x.States == "3").Count();
int HUnDoneCount = HAllCount - HDoneCount;
// 专项检查
List<Model.Inspect_InspectionItem> SpecialList = (from x in Funs.DB.Inspect_InspectionItem
join i in Funs.DB.Inspect_Inspection on x.InspectionId equals i.InspectionId
where i.InspectType == "1" && x.CompileTime > startd && x.CompileTime < endd
select new Model.Inspect_InspectionItem()).ToList();
int SAllCount = SpecialList.Count();
int SDoneCount = SpecialList.Where(x => x.States == "3").Count();
int SUnDoneCount = SAllCount - SDoneCount;
// 检查列表
var query = (
from hsse in Funs.DB.HSSE_Hazard_HazardRegister
where hsse.RectifyName != null && hsse.RegisterDate > startd && hsse.RegisterDate < endd
group hsse by hsse.RectifyName into g1
select new { type = g1.Key, count = g1.Count() }
).Concat(
from i in Funs.DB.Inspect_Inspection
join itm in Funs.DB.Inspect_InspectionItem on i.InspectionId equals itm.InspectionId
where i.ProblemTypeName != null && i.CreateTime > startd && i.CreateTime < endd
group i by i.ProblemTypeName into g2
select new { type = g2.Key, count = g2.Count() }
).Concat(
from ins in Funs.DB.Inspect_Inspection
join itm in Funs.DB.Inspect_InspectionItem on ins.InspectionId equals itm.InspectionId
where ins.Place != null && ins.CreateTime > startd && ins.CreateTime < endd
group ins by ins.Place into g3
select new { type = g3.Key, count = g3.Count() }
)
.GroupBy(x => x.type)
.Select(g => new { type = g.Key, count = g.Sum(x => x.count) });
return new
{
AllCount = HAllCount + SAllCount,
DoneCount = HDoneCount + SDoneCount,
UnDoneCount = HUnDoneCount + SUnDoneCount,
CheckList = query
};
}
#endregion
#region
protected string ProjectInfo;
/// <summary>
@@ -150,7 +229,7 @@ namespace FineUIPro.Web.common
}
}
this.divProjectNum.InnerHtml = projectNum;
var persons = from x in db.SitePerson_Person
join y in db.Base_Project on x.ProjectId equals y.ProjectId
where x.IsUsed == true && (x.OutTime == null || x.OutTime > DateTime.Now) && (y.ProjectState == Const.ProjectState_1 || y.ProjectState == null) && (y.IsDelete == null || y.IsDelete == false)
@@ -170,7 +249,6 @@ namespace FineUIPro.Web.common
}
}
this.divJoinConstructionPersonNum.InnerHtml = personsNum;
var getProjectMap = getProjects.Where(x => x.MapCoordinates.Length > 0);
if (getProjectMap.Count() > 0)
{
@@ -214,7 +292,6 @@ namespace FineUIPro.Web.common
{
wHours = Convert.ToInt32(getMax.Sum(x => x.PersonWorkTime) ?? 0);
}
this.divSafeWorkTime.InnerHtml = wHours.ToString("0000000000");
}