修改安全月报

This commit is contained in:
潘鸿锋 2024-09-23 17:44:35 +08:00
parent 6522d6df41
commit 757a0d859f
1 changed files with 32 additions and 7 deletions

View File

@ -198,6 +198,15 @@ namespace FineUIPro.Web.HSSE.Manager
{ {
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", model.EndDate); this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", model.EndDate);
} }
startTime = Convert.ToDateTime(txtStartDate.Text);
endTime = Convert.ToDateTime(txtEndDate.Text);
yearStartTime = Convert.ToDateTime(startTime.ToString("yyyy-01-01"));
if (project.StartDate != null)
{
projectStartTime = Convert.ToDateTime(project.StartDate);
}
} }
AddOrUpdate = "update"; AddOrUpdate = "update";
@ -361,6 +370,8 @@ namespace FineUIPro.Web.HSSE.Manager
#endregion #endregion
#region 6.1 #region 6.1
try
{
var attemptedModel = db.Manager_Attempted.FirstOrDefault(x => x.MonthReportId == MonthReportId); var attemptedModel = db.Manager_Attempted.FirstOrDefault(x => x.MonthReportId == MonthReportId);
if (attemptedModel != null) if (attemptedModel != null)
{ {
@ -370,15 +381,29 @@ namespace FineUIPro.Web.HSSE.Manager
nbFbsYearNum.Text = attemptedModel.FbsYearNum.ToString(); nbFbsYearNum.Text = attemptedModel.FbsYearNum.ToString();
nbProNum.Text = attemptedModel.ProNum.ToString(); nbProNum.Text = attemptedModel.ProNum.ToString();
} }
#endregion else {
GetAttempted();
}
#endregion
#region 6.1 2 #region 6.1 2
injuryAccidents = BLL.InjuryAccidentCService.GetInjuryAccidentCByMonthReportId(this.MonthReportId); injuryAccidents = BLL.InjuryAccidentCService.GetInjuryAccidentCByMonthReportId(this.MonthReportId);
if (injuryAccidents.Count > 0) if (injuryAccidents.Count > 0)
{
this.gvInjuryAccident.DataSource = injuryAccidents;
this.gvInjuryAccident.DataBind();
OutputSummaryData();
}
else {
GetInjuryAccident();
//GetAccidentReportsByAccidentTime
}
}
catch (Exception)
{ {
this.gvInjuryAccident.DataSource = injuryAccidents;
this.gvInjuryAccident.DataBind(); throw;
OutputSummaryData();
} }
#endregion #endregion