1安全生产看板打开报错问题处理

This commit is contained in:
夏菊 2025-04-23 10:23:42 +08:00
parent a4b291fecb
commit b982382a48
1 changed files with 97 additions and 82 deletions

View File

@ -102,7 +102,8 @@ namespace FineUIPro.Web.common
div_zasrs.InnerHtml = tb.Rows.Count.ToString(); div_zasrs.InnerHtml = tb.Rows.Count.ToString();
} }
else { else
{
//项目总监 //项目总监
div_xmrs.InnerHtml = (from x in db.SitePerson_Person div_xmrs.InnerHtml = (from x in db.SitePerson_Person
where x.WorkPostId == Const.WorkPost_HSSEDirector && x.IsUsed == true where x.WorkPostId == Const.WorkPost_HSSEDirector && x.IsUsed == true
@ -184,8 +185,9 @@ namespace FineUIPro.Web.common
//int wHours = Funs.DB.SitePerson_PersonInOutNumber.Max(x => x.WorkHours) ?? 0; //int wHours = Funs.DB.SitePerson_PersonInOutNumber.Max(x => x.WorkHours) ?? 0;
this.div_safeworktime.InnerHtml = Count3().ToString().Split('.')[0]; this.div_safeworktime.InnerHtml = Count3().ToString().Split('.')[0];
} }
else { else
var list = db.Base_Project.Where(x=>pids.Contains(x.ProjectId)); {
var list = db.Base_Project.Where(x => pids.Contains(x.ProjectId));
//在建项目 //在建项目
div_zjxm.InnerHtml = list.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).Count().ToString(); div_zjxm.InnerHtml = list.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).Count().ToString();
//停工项目 //停工项目
@ -242,7 +244,8 @@ namespace FineUIPro.Web.common
cout1 = cout1 - getD2.Sum(x => x.WorkingHoursLoss ?? 0); cout1 = cout1 - getD2.Sum(x => x.WorkingHoursLoss ?? 0);
} }
} }
else { else
{
var getAllPersonInOutList = from x in db.SitePerson_PersonInOutNumber var getAllPersonInOutList = from x in db.SitePerson_PersonInOutNumber
where pids.Contains(x.ProjectId) where pids.Contains(x.ProjectId)
select x; select x;
@ -256,7 +259,7 @@ namespace FineUIPro.Web.common
var getD1 = from x in db.Accident_AccidentHandle var getD1 = from x in db.Accident_AccidentHandle
join y in db.Base_Project on x.ProjectId equals y.ProjectId join y in db.Base_Project on x.ProjectId equals y.ProjectId
where pids.Contains(x.ProjectId) where pids.Contains(x.ProjectId)
select x; select x;
var getD2 = from x in db.Accident_AccidentReport var getD2 = from x in db.Accident_AccidentReport
join y in db.Base_Project on x.ProjectId equals y.ProjectId join y in db.Base_Project on x.ProjectId equals y.ProjectId
@ -300,7 +303,8 @@ namespace FineUIPro.Web.common
{ {
list = db.Base_Project.Where(x => pids.Contains(x.ProjectId)).ToList(); list = db.Base_Project.Where(x => pids.Contains(x.ProjectId)).ToList();
} }
else { else
{
list = db.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList(); list = db.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList();
} }
var hazardRegisters = from x in db.HSSE_Hazard_HazardRegister select x; var hazardRegisters = from x in db.HSSE_Hazard_HazardRegister select x;
@ -366,17 +370,20 @@ namespace FineUIPro.Web.common
div_xmalh.InnerHtml = ((from x in Funs.DB.Meeting_WeekMeeting where x.WeekMeetingDate.Value.Year == date.Year && x.WeekMeetingDate.Value.Month == date.Month && x.WeekMeetingDate.Value.Day == date.Day select x).Count() div_xmalh.InnerHtml = ((from x in Funs.DB.Meeting_WeekMeeting where x.WeekMeetingDate.Value.Year == date.Year && x.WeekMeetingDate.Value.Month == date.Month && x.WeekMeetingDate.Value.Day == date.Day select x).Count()
+ (from x in Funs.DB.Meeting_MonthMeeting where x.MonthMeetingDate.Value.Year == date.Year && x.MonthMeetingDate.Value.Month == date.Month && x.MonthMeetingDate.Value.Day == date.Day select x).Count()).ToString(); + (from x in Funs.DB.Meeting_MonthMeeting where x.MonthMeetingDate.Value.Year == date.Year && x.MonthMeetingDate.Value.Month == date.Month && x.MonthMeetingDate.Value.Day == date.Day select x).Count()).ToString();
} }
else { else
{
//项目安全领导小组 //项目安全领导小组
div_xmaqldxz.InnerHtml = Funs.DB.Meeting_SafetyLeaderGroupMeeting.Where(x => x.CompileDate > Const.DtmarkTime div_xmaqldxz.InnerHtml = Funs.DB.Meeting_SafetyLeaderGroupMeeting.Where(x => x.CompileDate > Const.DtmarkTime
&& pids.Contains(x.ProjectId) ).Count().ToString(); && pids.Contains(x.ProjectId)).Count().ToString();
//项目安全例会 //项目安全例会
DateTime date = DateTime.Now; DateTime date = DateTime.Now;
div_xmalh.InnerHtml = ((from x in Funs.DB.Meeting_WeekMeeting where x.WeekMeetingDate.Value.Year == date.Year && x.WeekMeetingDate.Value.Month == date.Month && x.WeekMeetingDate.Value.Day == date.Day div_xmalh.InnerHtml = ((from x in Funs.DB.Meeting_WeekMeeting
where x.WeekMeetingDate.Value.Year == date.Year && x.WeekMeetingDate.Value.Month == date.Month && x.WeekMeetingDate.Value.Day == date.Day
&& pids.Contains(x.ProjectId) && pids.Contains(x.ProjectId)
select x).Count() select x).Count()
+ (from x in Funs.DB.Meeting_MonthMeeting where x.MonthMeetingDate.Value.Year == date.Year && x.MonthMeetingDate.Value.Month == date.Month && x.MonthMeetingDate.Value.Day == date.Day + (from x in Funs.DB.Meeting_MonthMeeting
where x.MonthMeetingDate.Value.Year == date.Year && x.MonthMeetingDate.Value.Month == date.Month && x.MonthMeetingDate.Value.Day == date.Day
&& pids.Contains(x.ProjectId) && pids.Contains(x.ProjectId)
select x).Count()).ToString(); select x).Count()).ToString();
@ -389,9 +396,9 @@ namespace FineUIPro.Web.common
/// 获取费用使用(万元) /// 获取费用使用(万元)
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetCostUse() public int GetCostUse()
{ {
if (pids==null) if (pids == null)
{ {
var result = 0; var result = 0;
var costs = (from x in Funs.DB.CostGoods_CostSmallDetailItem var costs = (from x in Funs.DB.CostGoods_CostSmallDetailItem
@ -419,7 +426,7 @@ namespace FineUIPro.Web.common
/// 获取施工机具在用数 /// 获取施工机具在用数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetUseEquipmentNum() public int GetUseEquipmentNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -453,7 +460,7 @@ namespace FineUIPro.Web.common
/// 获取施工机具特种设备数 /// 获取施工机具特种设备数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetSpecialEquipmentNum() public int GetSpecialEquipmentNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -477,7 +484,7 @@ namespace FineUIPro.Web.common
/// 获取作业许可项数 /// 获取作业许可项数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetLicensesNum() public int GetLicensesNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -500,7 +507,7 @@ namespace FineUIPro.Web.common
/// 获取作业许可关闭项数 /// 获取作业许可关闭项数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetLicensesCloseNum() public int GetLicensesCloseNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -525,9 +532,9 @@ namespace FineUIPro.Web.common
/// 获取一般隐患整改闭环项 /// 获取一般隐患整改闭环项
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetGeneralClosedNum() public int GetGeneralClosedNum()
{ {
if (pids==null) if (pids == null)
{ {
var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
where x.Risk_Level == "一般" && x.States == "3" && where x.Risk_Level == "一般" && x.States == "3" &&
@ -550,7 +557,7 @@ namespace FineUIPro.Web.common
/// 获取一般隐患未整改完成项 /// 获取一般隐患未整改完成项
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetGeneralNotClosedNum() public int GetGeneralNotClosedNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -574,7 +581,7 @@ namespace FineUIPro.Web.common
/// 一般整改率 /// 一般整改率
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public string GetGeneralZgl() public string GetGeneralZgl()
{ {
var num1 = Math.Round(100.0 * GetGeneralClosedNum() / (GetGeneralClosedNum() + GetGeneralNotClosedNum()), 0).ToString(); var num1 = Math.Round(100.0 * GetGeneralClosedNum() / (GetGeneralClosedNum() + GetGeneralNotClosedNum()), 0).ToString();
return num1; return num1;
@ -584,7 +591,7 @@ namespace FineUIPro.Web.common
/// 获取重大隐患整改闭环项 /// 获取重大隐患整改闭环项
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetMajorClosedNum() public int GetMajorClosedNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -608,7 +615,7 @@ namespace FineUIPro.Web.common
/// 获取重大隐患未整改完成项 /// 获取重大隐患未整改完成项
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetMajorNotClosedNum() public int GetMajorNotClosedNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -632,7 +639,7 @@ namespace FineUIPro.Web.common
/// 重大整改率 /// 重大整改率
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public string GetMajorZgl() public string GetMajorZgl()
{ {
var num1 = Math.Round(100.0 * GetMajorClosedNum() / (GetMajorClosedNum() + GetMajorNotClosedNum()), 0).ToString(); var num1 = Math.Round(100.0 * GetMajorClosedNum() / (GetMajorClosedNum() + GetMajorNotClosedNum()), 0).ToString();
if (num1 == "NaN") num1 = "0"; if (num1 == "NaN") num1 = "0";
@ -646,13 +653,14 @@ namespace FineUIPro.Web.common
/// 获取企业负责人带班检查次数 /// 获取企业负责人带班检查次数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetCompanyLeadShiftCheckNum() public int GetCompanyLeadShiftCheckNum()
{ {
if (pids == null) if (pids == null)
{ {
return HSSEData_HSSEService.GetCompanyLeadShiftCheckNum(); return HSSEData_HSSEService.GetCompanyLeadShiftCheckNum();
} }
else { else
{
return HSSEData_HSSEService.GetCompanyLeadShiftCheckNum(pids); return HSSEData_HSSEService.GetCompanyLeadShiftCheckNum(pids);
} }
@ -664,7 +672,7 @@ namespace FineUIPro.Web.common
/// 获取企业综合检查次数 /// 获取企业综合检查次数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetCompanyComprehensiveCheckNum() public int GetCompanyComprehensiveCheckNum()
{ {
if (pids == null) if (pids == null)
return HSSEData_HSSEService.GetCompanyComprehensiveCheckNum(); return HSSEData_HSSEService.GetCompanyComprehensiveCheckNum();
@ -676,7 +684,7 @@ namespace FineUIPro.Web.common
/// 获取企业专项检查次数 /// 获取企业专项检查次数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetCompanySpecialCheckNum() public int GetCompanySpecialCheckNum()
{ {
if (pids == null) if (pids == null)
return HSSEData_HSSEService.GetCompanySpecialCheckNum(); return HSSEData_HSSEService.GetCompanySpecialCheckNum();
@ -688,7 +696,7 @@ namespace FineUIPro.Web.common
/// 获取项目负责人带班检查次数 /// 获取项目负责人带班检查次数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetProjectLeadShiftCheckNum() public int GetProjectLeadShiftCheckNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -697,7 +705,8 @@ namespace FineUIPro.Web.common
select x).Count(); select x).Count();
return result; return result;
} }
else { else
{
var result = (from x in Funs.DB.Check_ProjectLeaderCheck var result = (from x in Funs.DB.Check_ProjectLeaderCheck
where x.CompileDate > Const.DtmarkTime where x.CompileDate > Const.DtmarkTime
&& pids.Contains(x.ProjectId) && pids.Contains(x.ProjectId)
@ -711,7 +720,7 @@ namespace FineUIPro.Web.common
/// 获取项目专项检查次数 /// 获取项目专项检查次数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetProjectSpecialCheckNum() public int GetProjectSpecialCheckNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -720,7 +729,8 @@ namespace FineUIPro.Web.common
select x).Count(); select x).Count();
return result; return result;
} }
else { else
{
var result = (from x in Funs.DB.Check_CheckSpecial var result = (from x in Funs.DB.Check_CheckSpecial
where x.CheckTime > Const.DtmarkTime where x.CheckTime > Const.DtmarkTime
&& pids.Contains(x.ProjectId) && pids.Contains(x.ProjectId)
@ -734,7 +744,7 @@ namespace FineUIPro.Web.common
/// 获取项目专业检查次数 /// 获取项目专业检查次数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetProjectMajorCheckNum() public int GetProjectMajorCheckNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -743,7 +753,8 @@ namespace FineUIPro.Web.common
select x).Count(); select x).Count();
return result; return result;
} }
else { else
{
var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
where x.CheckTime > Const.DtmarkTime where x.CheckTime > Const.DtmarkTime
&& pids.Contains(x.ProjectId) && pids.Contains(x.ProjectId)
@ -758,7 +769,7 @@ namespace FineUIPro.Web.common
/// 获取未遂事件数 /// 获取未遂事件数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetNearMissNum() public int GetNearMissNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -768,7 +779,8 @@ namespace FineUIPro.Web.common
select x).Count(); select x).Count();
return result; return result;
} }
else { else
{
var result = (from x in Funs.DB.Accident_AccidentPersonRecord var result = (from x in Funs.DB.Accident_AccidentPersonRecord
join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId
where x.IsAttempt == "1" && x.CompileDate > Const.DtmarkTime && pids.Contains(x.ProjectId) where x.IsAttempt == "1" && x.CompileDate > Const.DtmarkTime && pids.Contains(x.ProjectId)
@ -782,7 +794,7 @@ namespace FineUIPro.Web.common
/// 获取可记录事件数 /// 获取可记录事件数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetRecordableEventNum() public int GetRecordableEventNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -792,7 +804,8 @@ namespace FineUIPro.Web.common
select x).Count(); select x).Count();
return result; return result;
} }
else { else
{
var result = (from x in Funs.DB.Accident_AccidentPersonRecord var result = (from x in Funs.DB.Accident_AccidentPersonRecord
join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId
where x.CompileDate > Const.DtmarkTime && pids.Contains(x.ProjectId) where x.CompileDate > Const.DtmarkTime && pids.Contains(x.ProjectId)
@ -806,7 +819,7 @@ namespace FineUIPro.Web.common
/// 获取一般事故数 /// 获取一般事故数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetGeneralAccidentNum() public int GetGeneralAccidentNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -828,7 +841,7 @@ namespace FineUIPro.Web.common
/// 获取较大事故数 /// 获取较大事故数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetMajorAccidentNum() public int GetMajorAccidentNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -850,7 +863,7 @@ namespace FineUIPro.Web.common
/// 获取重大事故数 /// 获取重大事故数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetSeriousAccidentNum() public int GetSeriousAccidentNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -872,13 +885,14 @@ namespace FineUIPro.Web.common
/// 获取特别重大事故数 /// 获取特别重大事故数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetSpecialSeriousAccidentNum() public int GetSpecialSeriousAccidentNum()
{ {
if (pids == null) { if (pids == null)
{
var result = (from x in Funs.DB.Accident_AccidentReport var result = (from x in Funs.DB.Accident_AccidentReport
where x.AccidentDegree == "4" where x.AccidentDegree == "4"
select x).Count(); select x).Count();
return result; return result;
} }
else else
{ {
@ -895,7 +909,7 @@ namespace FineUIPro.Web.common
/// 获取企业级综合预案数 /// 获取企业级综合预案数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetCompanyComprehensivePlanNum() public int GetCompanyComprehensivePlanNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -928,7 +942,7 @@ namespace FineUIPro.Web.common
/// 获取企业级专项预案数 /// 获取企业级专项预案数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetCompanySpecialPlanNum() public int GetCompanySpecialPlanNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -960,7 +974,7 @@ namespace FineUIPro.Web.common
/// 获取企业级现场处置预案 /// 获取企业级现场处置预案
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetCompanyOnSiteDisposalPlan() public int GetCompanyOnSiteDisposalPlan()
{ {
if (pids == null) if (pids == null)
{ {
@ -992,7 +1006,7 @@ namespace FineUIPro.Web.common
/// 获取企业级演练次数 /// 获取企业级演练次数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetCompanyDrillNum() public int GetCompanyDrillNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1022,7 +1036,7 @@ namespace FineUIPro.Web.common
/// 获取三级安全教育培训数 /// 获取三级安全教育培训数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetSafeTrainNum() public int GetSafeTrainNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1049,7 +1063,7 @@ namespace FineUIPro.Web.common
/// 获取专项培训数 /// 获取专项培训数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetSpecialTrainNum() public int GetSpecialTrainNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1075,7 +1089,7 @@ namespace FineUIPro.Web.common
/// 获取特种作业培训数 /// 获取特种作业培训数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetSpecialOperationTrainNum() public int GetSpecialOperationTrainNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1103,7 +1117,7 @@ namespace FineUIPro.Web.common
/// 获取一般风险数 /// 获取一般风险数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetGeneralRiskNum() public int GetGeneralRiskNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1128,7 +1142,7 @@ namespace FineUIPro.Web.common
/// 获取低风险数 /// 获取低风险数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetLowRiskNum() public int GetLowRiskNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1153,7 +1167,7 @@ namespace FineUIPro.Web.common
/// 获取中风险数 /// 获取中风险数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetMediumRiskNum() public int GetMediumRiskNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1178,7 +1192,7 @@ namespace FineUIPro.Web.common
/// 获取高风险数 /// 获取高风险数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetHighRiskNum() public int GetHighRiskNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1188,7 +1202,8 @@ namespace FineUIPro.Web.common
select x).Count(); select x).Count();
return result; return result;
} }
else { else
{
var result = (from x in Funs.DB.Hazard_HazardSelectedItem var result = (from x in Funs.DB.Hazard_HazardSelectedItem
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
where y.RiskLevel == 4 && (x.IsStart == true || x.State == "1") where y.RiskLevel == 4 && (x.IsStart == true || x.State == "1")
@ -1204,7 +1219,7 @@ namespace FineUIPro.Web.common
/// 获取危大工程审批完成数 /// 获取危大工程审批完成数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetCompletedNum() public int GetCompletedNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1228,7 +1243,7 @@ namespace FineUIPro.Web.common
/// 获取危大工程培训人次数 /// 获取危大工程培训人次数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetTrainPersonNum() public int GetTrainPersonNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1250,7 +1265,7 @@ namespace FineUIPro.Web.common
/// 获取危大工程施工个数 /// 获取危大工程施工个数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetConstructionNum() public int GetConstructionNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1274,7 +1289,7 @@ namespace FineUIPro.Web.common
/// 获取危大工程完工个数 /// 获取危大工程完工个数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetFinishedNum() public int GetFinishedNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1298,7 +1313,7 @@ namespace FineUIPro.Web.common
/// 获取超危大工程审批完成数 /// 获取超危大工程审批完成数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetSuperCompletedNum() public int GetSuperCompletedNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1322,13 +1337,13 @@ namespace FineUIPro.Web.common
/// 获取超危大工程培训人次数 /// 获取超危大工程培训人次数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetSuperTrainPersonNum() public int GetSuperTrainPersonNum()
{ {
if (pids == null) if (pids == null)
{ {
var result = var result =
(from x in Funs.DB.Solution_LargerHazard (from x in Funs.DB.Solution_LargerHazard
where x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime where x.IsSuperLargerHazard == true && x.TrainPersonNum != null && x.RecordTime > Const.DtmarkTime
select x.TrainPersonNum).ToList().Sum(x => x.Value); select x.TrainPersonNum).ToList().Sum(x => x.Value);
return result; return result;
} }
@ -1336,7 +1351,7 @@ namespace FineUIPro.Web.common
{ {
var result = var result =
(from x in Funs.DB.Solution_LargerHazard (from x in Funs.DB.Solution_LargerHazard
where x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime && pids.Contains(x.ProjectId) where x.IsSuperLargerHazard == true && x.TrainPersonNum != null && x.RecordTime > Const.DtmarkTime && pids.Contains(x.ProjectId)
select x.TrainPersonNum).ToList().Sum(x => x.Value); select x.TrainPersonNum).ToList().Sum(x => x.Value);
return result; return result;
} }
@ -1346,7 +1361,7 @@ namespace FineUIPro.Web.common
/// 获取超危大工程施工个数 /// 获取超危大工程施工个数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetSuperConstructionNum() public int GetSuperConstructionNum()
{ {
if (pids == null) if (pids == null)
{ {
@ -1370,7 +1385,7 @@ namespace FineUIPro.Web.common
/// 获取超危大工程完工个数 /// 获取超危大工程完工个数
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public int GetSuperFinishedNum() public int GetSuperFinishedNum()
{ {
if (pids == null) if (pids == null)
{ {