增加hse安全月报,功能尚未完善

This commit is contained in:
2024-08-21 16:47:57 +08:00
parent cb544cb297
commit 2c7ad19fb1
16 changed files with 2829 additions and 168 deletions
+5
View File
@@ -6061,5 +6061,10 @@ namespace BLL
/// 检查表尾项管理
/// </summary>
public const string InspectTailTerm = "B6A6EA7D-EDAB-40C8-920D-A106731D0E08";
/// <summary>
/// HSSE管理月报新
/// </summary>
public const string ManagerMonthCNewMenuId = "9E4B28DF-8C8E-49F8-AB15-270BBDC73449";
}
}
@@ -159,5 +159,15 @@ namespace BLL
{
return (from x in Funs.DB.EduTrain_TrainRecord where x.TrainStartDate >= startTime && x.TrainStartDate <= endTime && x.ProjectId == projectId select x.TrainPersonNum).Sum();
}
public static List<Model.EduTrain_TrainRecord> GetTrainingsByTrainDate(DateTime endTime, string projectId)
{
return (from x in Funs.DB.EduTrain_TrainRecord where x.TrainStartDate <= endTime && x.ProjectId == projectId select x).ToList();
}
public static int? GetTrainPersonCount(DateTime endTime, string projectId)
{
return (from x in Funs.DB.EduTrain_TrainRecord where x.TrainStartDate <= endTime && x.ProjectId == projectId select x.TrainPersonNum).Sum();
}
}
}
@@ -227,6 +227,10 @@ namespace BLL
Question = monthReport.Question,
SubcontractManHours = monthReport.SubcontractManHours,
AccidentDef = monthReport.AccidentDef,
StartDate=monthReport.StartDate,
EndDate=monthReport.EndDate,
TotalHseManhoursYear = monthReport.TotalHseManhoursYear
};
db.Manager_MonthReportC.InsertOnSubmit(newMonthReport);
@@ -245,7 +249,7 @@ namespace BLL
Model.Manager_MonthReportC newMonthReport = db.Manager_MonthReportC.First(e => e.MonthReportId == monthReport.MonthReportId);
newMonthReport.MonthReportCode = monthReport.MonthReportCode;
newMonthReport.ProjectId = monthReport.ProjectId;
newMonthReport.Months = monthReport.Months;
//newMonthReport.Months = monthReport.Months;
newMonthReport.MonthReportDate = monthReport.MonthReportDate;
newMonthReport.ReportMan = monthReport.ReportMan;
newMonthReport.HseManhours = monthReport.HseManhours;
@@ -298,6 +302,9 @@ namespace BLL
newMonthReport.SubcontractManHours = monthReport.SubcontractManHours;
newMonthReport.AccidentDef = monthReport.AccidentDef;
newMonthReport.StartDate = monthReport.StartDate;
newMonthReport.EndDate = monthReport.EndDate;
newMonthReport.TotalHseManhoursYear = monthReport.TotalHseManhoursYear;
db.SubmitChanges();
}