This commit is contained in:
2024-07-02 11:43:20 +08:00
parent a15b0e8871
commit 6cdb62ab88
+3 -2
View File
@@ -112,8 +112,9 @@ namespace BLL
select x).FirstOrDefault(); select x).FirstOrDefault();
if (ProjectTotal3 !=null) if (ProjectTotal3 !=null)
{ {
ProjectTotal3Value = int.Parse((ProjectTotal3.GetType().GetProperty("Month" + currentMonth)?.GetValue(ProjectTotal3, null).ToString() ?? "0") ); ProjectTotal3Value = int.Parse((ProjectTotal3.GetType().GetProperty("Month" + currentMonth)?.GetValue(ProjectTotal3, null)?.ToString() ?? "0") );
projectDataItem.onsiteperson = ProjectTotal3Value.ToString() ?? ""; // 本月现场人数 projectDataItem.onsiteperson = ProjectTotal3Value.ToString() ?? ""; // 本月现场人数
} }
var ProjectTotal4 = (from x in Funs.DB.HSSE_MonthReportItem var ProjectTotal4 = (from x in Funs.DB.HSSE_MonthReportItem
@@ -122,7 +123,7 @@ namespace BLL
select x).FirstOrDefault(); select x).FirstOrDefault();
if (ProjectTotal4 != null) if (ProjectTotal4 != null)
{ {
ProjectTotal4Value = int.Parse((ProjectTotal4.GetType().GetProperty("Month" + currentMonth)?.GetValue(ProjectTotal4, null).ToString() ?? "0")); ProjectTotal4Value = int.Parse((ProjectTotal4.GetType().GetProperty("Month" + currentMonth)?.GetValue(ProjectTotal4, null)?.ToString() ?? "0"));
projectDataItem.maxperson = (ProjectTotal4Value + ProjectTotal3Value).ToString() ?? ""; //现场高峰人数 projectDataItem.maxperson = (ProjectTotal4Value + ProjectTotal3Value).ToString() ?? ""; //现场高峰人数
} }