五环大屏;进度管理;等

This commit is contained in:
2025-05-24 14:48:16 +08:00
parent 3e6008ee29
commit f135a948da
42 changed files with 1513 additions and 122 deletions
+32 -17
View File
@@ -127,23 +127,38 @@ namespace FineUIPro.Web.common
{
this.divSafeWorkTimeMonth.InnerHtml = countMonthAqrgs.ToString().Split('.')[0];
}
// 安全培训人员(合并数据库查询)
var trainingQuery = db.EduTrain_TrainRecord
.Where(x => pids.Contains(x.ProjectId))
.GroupBy(x => 1)
.Select(g => new
{
TrainCount = g.Sum(x => x.TrainPersonNum) ?? 0,
BoShengCount = db.Bo_Sheng_TrainPerson
.Where(x => (x.DeleteTag == "False" || x.DeleteTag == null))
.Where(x => pids.Contains(x.ProjectId))
.Count()
}).FirstOrDefault();
//// 安全培训人员(合并数据库查询)
//var trainingQuery = db.EduTrain_TrainRecord
// .Where(x => pids.Contains(x.ProjectId))
// .GroupBy(x => 1)
// .Select(g => new
// {
// TrainCount = g.Sum(x => x.TrainPersonNum) ?? 0,
// BoShengCount = db.Bo_Sheng_TrainPerson
// .Where(x => (x.DeleteTag == "False" || x.DeleteTag == null))
// .Where(x => pids.Contains(x.ProjectId))
// .Count()
// }).FirstOrDefault();
//divSafePersonNum.InnerHtml = trainingQuery != null
// ? (trainingQuery.TrainCount + trainingQuery.BoShengCount).ToString()
// : "0";
int getTrainRecord = 0, boShengCount = 0;
if (pids == null)
{
getTrainRecord = db.View_EduTrain_TrainFind.Count();
//修改:增加博晟教育中的人数
boShengCount = db.Bo_Sheng_TrainPerson.Count(x => x.DeleteTag == "False" || x.DeleteTag == null);
}
else
{
getTrainRecord = db.View_EduTrain_TrainFind.Where(x => pids.Contains(x.ProjectId)).Count();
//修改:增加博晟教育中的人数
boShengCount = db.Bo_Sheng_TrainPerson.Count(x => pids.Contains(x.ProjectId) && (x.DeleteTag == "False" || x.DeleteTag == null));
}
this.divSafePersonNum.InnerHtml = (getTrainRecord + boShengCount).ToString();
divSafePersonNum.InnerHtml = trainingQuery != null
? (trainingQuery.TrainCount + trainingQuery.BoShengCount).ToString()
: "0";
@@ -1237,11 +1252,11 @@ namespace FineUIPro.Web.common
{
var wsAccidentList1 = from x in db.Accident_AccidentPersonRecord
join y in db.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId
where y.AccidentTypeName.Contains("未遂")
where y.AccidentTypeName.Contains("未遂")
select x;
var wsAccidentList2 = from x in db.Accident_AccidentReportOther
join y in db.Sys_Const on x.AccidentTypeId equals y.ConstValue
where y.ConstText.Contains("未遂")
where y.ConstText.Contains("未遂")
select x;
result = wsAccidentList1.Count() + wsAccidentList2.Count();
//result = (from x in Funs.DB.Accident_AccidentPersonRecord