提交代码

This commit is contained in:
高飞 2024-01-02 16:23:42 +08:00
parent 10e9c1399a
commit c9f8e00d24
1 changed files with 10 additions and 8 deletions

View File

@ -629,10 +629,11 @@ namespace BLL
/// <returns></returns>
public static int GetTotalWorkingHour(string projectid)
{
var result = (from x in Funs.DB.SitePerson_DayReportDetail
join y in Funs.DB.SitePerson_DayReport on x.DayReportId equals y.DayReportId
where y.ProjectId == projectid && y.CompileDate > Const.DtmarkTime
select x.PersonWorkTime ?? 0).ToList().Sum();
var result = (from x in Funs.DB.SeDin_MonthReport2
join y in Funs.DB.SeDin_MonthReport on x.MonthReportId equals y.MonthReportId
where y.ProjectId == projectid
orderby y.ReporMonth descending
select x.ProjectWorkTime ?? 0).FirstOrDefault();
var q = Funs.GetNewIntOrZero(result.ToString().Split('.')[0]);
return q;
@ -664,10 +665,11 @@ namespace BLL
/// <returns></returns>
public static int GetSafeWorkingHour(string projectid)
{
var result1 = (from x in Funs.DB.SitePerson_DayReportDetail
join y in Funs.DB.SitePerson_DayReport on x.DayReportId equals y.DayReportId
where y.ProjectId == projectid && y.CompileDate > Const.DtmarkTime
select x.PersonWorkTime ?? 0).ToList().Sum();
var result1 = (from x in Funs.DB.SeDin_MonthReport2
join y in Funs.DB.SeDin_MonthReport on x.MonthReportId equals y.MonthReportId
where y.ProjectId == projectid
orderby y.ReporMonth descending
select x.ProjectWorkTime ?? 0).FirstOrDefault();
var result2 =
(from x in Funs.DB.Accident_AccidentHandle
where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime