20231016月报安全工时、累计工时优化

This commit is contained in:
2023-10-16 11:24:26 +08:00
parent 5a9ebc9ade
commit 87a19f7dfe
6 changed files with 51 additions and 5 deletions
@@ -189,7 +189,22 @@ namespace BLL
{
newItem.YearWorkTime = 0;
}
var getMaxMonthReport = (from x in Funs.DB.SeDin_MonthReport
where x.ProjectId == projectId && x.ReporMonth < monthD
orderby x.ReporMonth descending
select x).FirstOrDefault();
if (getMaxMonthReport != null)
{
var getMonthReport2 = Funs.DB.SeDin_MonthReport2.FirstOrDefault(x => x.MonthReportId == getMaxMonthReport.MonthReportId);
if (getMonthReport2 != null)
{
newItem.YearWorkTime = getMonthReport2.YearWorkTime ?? 0;
newItem.SafeWorkTime = getMonthReport2.SafeWorkTime ?? 0;
}
}
}
return newItem;
}
}