专项检查

This commit is contained in:
2025-04-15 20:48:53 +08:00
parent 80ea8ec450
commit 1c6dca4612
36 changed files with 29955 additions and 932 deletions
+21 -11
View File
@@ -82,12 +82,13 @@ namespace FineUIPro.Web.common
#region
[WebMethod]
public static Object GetServiceData(string date)
public static Object GetServiceData(string startdate, string enddate)
{
DateTime mdate = Funs.GetNewDateTimeOrNow(date);
DateTime startd = Funs.GetNewDateTimeOrNow(string.Format("{0} {1}", startdate, "00:00:00"));
DateTime endd = Funs.GetNewDateTimeOrNow(string.Format("{0} {1}", enddate, "23:59:59"));
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
where x.ClassMeetingDate >= startd && x.ClassMeetingDate <= endd
select new Model.MeetingItem
{
AttentPersonNum = x.AttentPersonNum ?? 0,
@@ -103,8 +104,23 @@ namespace FineUIPro.Web.common
}
#endregion
#region
[WebMethod]
public static Object GetQualityProblemStatistics(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.Inspect_InspectionItem> list = (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();
#region
return null;
}
#endregion
#region
[WebMethod]
public static Object GetSafetyProblemStatistics( string startdate, string enddate)
{
@@ -135,16 +151,10 @@ namespace FineUIPro.Web.common
).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
where i.ProblemTypeName != null && i.CreateTime > startd && i.CreateTime < endd && i.InspectType == "1"
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) });