2023-03-30 报表升级

This commit is contained in:
2023-03-30 18:17:53 +08:00
parent 70bde21f2a
commit e7295249ff
185 changed files with 62531 additions and 1061 deletions
@@ -112,6 +112,70 @@ namespace FineUIPro.Web.ZHGL.Information
{
txtAccidentMortality.Text = report.AccidentMortality.ToString();
}
if (report.InputCosts != null)
{
this.txtInputCosts.Text = Convert.ToString(report.InputCosts);
}
if (report.TrainNum != null)
{
this.txtTrainNum.Text = Convert.ToString(report.TrainNum);
}
if (report.GeneralHazardNum != null)
{
this.txtGeneralHazardNum.Text = Convert.ToString(report.GeneralHazardNum);
}
if (report.MajorHazardNum != null)
{
this.txtMajorHazardNum.Text = Convert.ToString(report.MajorHazardNum);
}
if (report.NotProofLargeProjectNum != null)
{
this.txtNotProofLargeProjectNum.Text = Convert.ToString(report.NotProofLargeProjectNum);
}
if (report.ProofLargeProjectNum != null)
{
this.txtProofLargeProjectNum.Text = Convert.ToString(report.ProofLargeProjectNum);
}
if (report.FireLicenseNum != null)
{
this.txtFireLicenseNum.Text = Convert.ToString(report.FireLicenseNum);
}
if (report.LimitLicenseNum != null)
{
this.txtLimitLicenseNum.Text = Convert.ToString(report.LimitLicenseNum);
}
if (report.HighLicenseNum != null)
{
this.txtHighLicenseNum.Text = Convert.ToString(report.HighLicenseNum);
}
if (report.HoistingLicenseNum != null)
{
this.txtHoistingLicenseNum.Text = Convert.ToString(report.HoistingLicenseNum);
}
if (report.BreakGroundLicenseNum != null)
{
this.txtBreakGroundLicenseNum.Text = Convert.ToString(report.BreakGroundLicenseNum);
}
if (report.ElectricityLicenseNum != null)
{
this.txtElectricityLicenseNum.Text = Convert.ToString(report.ElectricityLicenseNum);
}
if (report.RTLicenseNum != null)
{
this.txtRTLicenseNum.Text = Convert.ToString(report.RTLicenseNum);
}
if (report.NightLicenseNum != null)
{
this.txtNightLicenseNum.Text = Convert.ToString(report.NightLicenseNum);
}
if (report.CommissionerNum != null)
{
this.txtCommissionerNum.Text = Convert.ToString(report.CommissionerNum);
}
if (report.SoleDutyNum != null)
{
this.txtSoleDutyNum.Text = Convert.ToString(report.SoleDutyNum);
}
}
}
else
@@ -196,7 +260,22 @@ namespace FineUIPro.Web.ZHGL.Information
{
report.AccidentMortality = Convert.ToDecimal(txtAccidentMortality.Text.Trim());
}
report.InputCosts = Funs.GetNewDecimalOrZero(this.txtInputCosts.Text.Trim());
report.TrainNum = Funs.GetNewInt(this.txtTrainNum.Text.Trim());
report.GeneralHazardNum = Funs.GetNewInt(this.txtGeneralHazardNum.Text.Trim());
report.MajorHazardNum = Funs.GetNewInt(this.txtMajorHazardNum.Text.Trim());
report.NotProofLargeProjectNum = Funs.GetNewInt(this.txtNotProofLargeProjectNum.Text.Trim());
report.ProofLargeProjectNum = Funs.GetNewInt(this.txtProofLargeProjectNum.Text.Trim());
report.FireLicenseNum = Funs.GetNewInt(this.txtFireLicenseNum.Text.Trim());
report.LimitLicenseNum = Funs.GetNewInt(this.txtLimitLicenseNum.Text.Trim());
report.HighLicenseNum = Funs.GetNewInt(this.txtHighLicenseNum.Text.Trim());
report.HoistingLicenseNum = Funs.GetNewInt(this.txtHoistingLicenseNum.Text.Trim());
report.BreakGroundLicenseNum = Funs.GetNewInt(this.txtBreakGroundLicenseNum.Text.Trim());
report.ElectricityLicenseNum = Funs.GetNewInt(this.txtElectricityLicenseNum.Text.Trim());
report.RTLicenseNum = Funs.GetNewInt(this.txtRTLicenseNum.Text.Trim());
report.NightLicenseNum = Funs.GetNewInt(this.txtNightLicenseNum.Text.Trim());
report.CommissionerNum = Funs.GetNewInt(this.txtCommissionerNum.Text.Trim());
report.SoleDutyNum = Funs.GetNewInt(this.txtSoleDutyNum.Text.Trim());
if (String.IsNullOrEmpty(MillionsMonthlyReportId))
{
Information_MillionsMonthlyReport old = MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
@@ -286,14 +365,14 @@ namespace FineUIPro.Web.ZHGL.Information
Save("submit");
}
#endregion
#region
private void GetItems(string millionsMonthlyReportId)
{
decimal TotalWorkNumSum = 0;
int PostPersonNumSum = 0, SnapPersonNumSum = 0, ContractorNumSum = 0, SumPersonNumSum = 0, SeriousInjuriesNumSum = 0, SeriousInjuriesPersonNumSum = 0, SeriousInjuriesLossHourSum = 0, MinorAccidentNumSum = 0,
MinorAccidentPersonNumSum = 0, MinorAccidentLossHourSum = 0, OtherAccidentNumSum = 0, OtherAccidentPersonNumSum = 0, OtherAccidentLossHourSum = 0, RestrictedWorkPersonNumSum = 0, RestrictedWorkLossHourSum = 0, MedicalTreatmentPersonNumSum = 0, MedicalTreatmentLossHourSum = 0,
FireNumSum = 0, ExplosionNumSum = 0, TrafficNumSum = 0, EquipmentNumSum = 0, QualityNumSum = 0, OtherNumSum = 0, FirstAidDressingsNumSum = 0, AttemptedEventNumSum = 0, LossDayNumSum = 0;
MinorAccidentPersonNumSum = 0, MinorAccidentLossHourSum = 0, DeathAccidentNumSum = 0, DeathAccidentPersonNumSum = 0, DeathAccidentLossHourSum = 0, RestrictedWorkPersonNumSum = 0, RestrictedWorkLossHourSum = 0, MedicalTreatmentPersonNumSum = 0, MedicalTreatmentLossHourSum = 0,
FireNumSum = 0, EnvironmenNumSum = 0, TrafficNumSum = 0, EquipmentNumSum = 0, QualityNumSum = 0, OtherNumSum = 0, FirstAidDressingsNumSum = 0, AttemptedEventNumSum = 0, LossDayNumSum = 0;
items.Clear();
int i = 10;
foreach (JObject mergedRow in Grid1.GetMergedData())
@@ -411,28 +490,28 @@ namespace FineUIPro.Web.ZHGL.Information
{
item.MinorAccidentLossHour = 0;
}
if (values["OtherAccidentNum"].ToString() != "")
if (values["DeathAccidentNum"].ToString() != "")
{
item.OtherAccidentNum = values.Value<int>("OtherAccidentNum");
OtherAccidentNumSum += values.Value<int>("OtherAccidentNum");
item.DeathAccidentNum = values.Value<int>("DeathAccidentNum");
DeathAccidentNumSum += values.Value<int>("DeathAccidentNum");
}
if (values["OtherAccidentPersonNum"].ToString() != "")
if (values["DeathAccidentPersonNum"].ToString() != "")
{
item.OtherAccidentPersonNum = values.Value<int>("OtherAccidentPersonNum");
OtherAccidentPersonNumSum += values.Value<int>("OtherAccidentPersonNum");
item.DeathAccidentPersonNum = values.Value<int>("DeathAccidentPersonNum");
DeathAccidentPersonNumSum += values.Value<int>("DeathAccidentPersonNum");
}
else
{
item.OtherAccidentPersonNum = 0;
item.DeathAccidentPersonNum = 0;
}
if (values["OtherAccidentLossHour"].ToString() != "")
if (values["DeathAccidentLossHour"].ToString() != "")
{
item.OtherAccidentLossHour = values.Value<int>("OtherAccidentLossHour");
OtherAccidentLossHourSum += values.Value<int>("OtherAccidentLossHour");
item.DeathAccidentLossHour = values.Value<int>("DeathAccidentLossHour");
DeathAccidentLossHourSum += values.Value<int>("DeathAccidentLossHour");
}
else
{
item.OtherAccidentLossHour = 0;
item.DeathAccidentLossHour = 0;
}
if (values["RestrictedWorkPersonNum"].ToString() != "")
{
@@ -479,14 +558,14 @@ namespace FineUIPro.Web.ZHGL.Information
{
item.FireNum = 0;
}
if (values["ExplosionNum"].ToString() != "")
if (values["EnvironmenNum"].ToString() != "")
{
item.ExplosionNum = values.Value<int>("ExplosionNum");
ExplosionNumSum += values.Value<int>("ExplosionNum");
item.EnvironmenNum = values.Value<int>("EnvironmenNum");
EnvironmenNumSum += values.Value<int>("EnvironmenNum");
}
else
{
item.ExplosionNum = 0;
item.EnvironmenNum = 0;
}
if (values["TrafficNum"].ToString() != "")
{
@@ -573,15 +652,15 @@ namespace FineUIPro.Web.ZHGL.Information
MinorAccidentNum = MinorAccidentNumSum,
MinorAccidentPersonNum = MinorAccidentPersonNumSum,
MinorAccidentLossHour = MinorAccidentLossHourSum,
OtherAccidentNum = OtherAccidentNumSum,
OtherAccidentPersonNum = OtherAccidentPersonNumSum,
OtherAccidentLossHour = OtherAccidentLossHourSum,
DeathAccidentNum = DeathAccidentNumSum,
DeathAccidentPersonNum = DeathAccidentPersonNumSum,
DeathAccidentLossHour = DeathAccidentLossHourSum,
RestrictedWorkPersonNum = RestrictedWorkPersonNumSum,
RestrictedWorkLossHour = RestrictedWorkLossHourSum,
MedicalTreatmentPersonNum = MedicalTreatmentPersonNumSum,
MedicalTreatmentLossHour = MedicalTreatmentLossHourSum,
FireNum = FireNumSum,
ExplosionNum = ExplosionNumSum,
EnvironmenNum = EnvironmenNumSum,
TrafficNum = TrafficNumSum,
EquipmentNum = EquipmentNumSum,
QualityNum = QualityNumSum,
@@ -644,6 +723,22 @@ namespace FineUIPro.Web.ZHGL.Information
{
//获取项目集合
List<Model.InformationProject_MillionsMonthlyReport> millionsMonthlyReports = (from x in Funs.DB.InformationProject_MillionsMonthlyReport where x.Year.ToString() == year && x.Month.ToString() == months && x.States == BLL.Const.State_2 select x).ToList();
this.txtInputCosts.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.InputCosts ?? 0));
this.txtTrainNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.TrainNum ?? 0));
this.txtGeneralHazardNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.GeneralHazardNum ?? 0));
this.txtMajorHazardNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.MajorHazardNum ?? 0));
this.txtNotProofLargeProjectNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.NotProofLargeProjectNum ?? 0));
this.txtProofLargeProjectNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.ProofLargeProjectNum ?? 0));
this.txtFireLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.FireLicenseNum ?? 0));
this.txtLimitLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.LimitLicenseNum ?? 0));
this.txtHighLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.HighLicenseNum ?? 0));
this.txtHoistingLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.HoistingLicenseNum ?? 0));
this.txtBreakGroundLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.BreakGroundLicenseNum ?? 0));
this.txtElectricityLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.ElectricityLicenseNum ?? 0));
this.txtRTLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.RTLicenseNum ?? 0));
this.txtNightLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.NightLicenseNum ?? 0));
this.txtCommissionerNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.CommissionerNum ?? 0));
this.txtSoleDutyNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.SoleDutyNum ?? 0));
List<string> projectIds = millionsMonthlyReports.Select(x => x.ProjectId).ToList();
//增加明细集合
Model.Information_MillionsMonthlyReportItem item1 = new Information_MillionsMonthlyReportItem
@@ -663,15 +758,15 @@ namespace FineUIPro.Web.ZHGL.Information
MinorAccidentNum = 0,
MinorAccidentPersonNum = 0,
MinorAccidentLossHour = 0,
OtherAccidentNum = 0,
OtherAccidentPersonNum = 0,
OtherAccidentLossHour = 0,
DeathAccidentNum = 0,
DeathAccidentPersonNum = 0,
DeathAccidentLossHour = 0,
RestrictedWorkPersonNum = 0,
RestrictedWorkLossHour = 0,
MedicalTreatmentPersonNum = 0,
MedicalTreatmentLossHour = 0,
FireNum = 0,
ExplosionNum = 0,
EnvironmenNum = 0,
TrafficNum = 0,
EquipmentNum = 0,
QualityNum = 0,
@@ -699,15 +794,15 @@ namespace FineUIPro.Web.ZHGL.Information
MinorAccidentNum = 0,
MinorAccidentPersonNum = 0,
MinorAccidentLossHour = 0,
OtherAccidentNum = 0,
OtherAccidentPersonNum = 0,
OtherAccidentLossHour = 0,
DeathAccidentNum = 0,
DeathAccidentPersonNum = 0,
DeathAccidentLossHour = 0,
RestrictedWorkPersonNum = 0,
RestrictedWorkLossHour = 0,
MedicalTreatmentPersonNum = 0,
MedicalTreatmentLossHour = 0,
FireNum = 0,
ExplosionNum = 0,
EnvironmenNum = 0,
TrafficNum = 0,
EquipmentNum = 0,
QualityNum = 0,
@@ -721,7 +816,7 @@ namespace FineUIPro.Web.ZHGL.Information
where projectIds.Contains(x.ProjectId)
select x).ToList();
if (this.CurrUser.UnitId == BLL.Const.UnitId_SEDIN)
if (this.CurrUser.UnitId == Const.UnitId_SEDIN)
{
projects = BLL.ProjectService.GetProjectWorkList();
}
@@ -761,15 +856,15 @@ namespace FineUIPro.Web.ZHGL.Information
item.MinorAccidentNum = report.MinorAccidentNum;
item.MinorAccidentPersonNum = report.MinorAccidentPersonNum;
item.MinorAccidentLossHour = report.MinorAccidentLossHour;
item.OtherAccidentNum = report.OtherAccidentNum;
item.OtherAccidentPersonNum = report.OtherAccidentPersonNum;
item.OtherAccidentLossHour = report.OtherAccidentLossHour;
item.DeathAccidentNum = report.DeathAccidentNum;
item.DeathAccidentPersonNum = report.DeathAccidentPersonNum;
item.DeathAccidentLossHour = report.DeathAccidentLossHour;
item.RestrictedWorkPersonNum = report.RestrictedWorkPersonNum;
item.RestrictedWorkLossHour = report.RestrictedWorkLossHour;
item.MedicalTreatmentPersonNum = report.MedicalTreatmentPersonNum;
item.MedicalTreatmentLossHour = report.MedicalTreatmentLossHour;
item.FireNum = report.FireNum;
item.ExplosionNum = report.ExplosionNum;
item.EnvironmenNum = report.EnvironmenNum;
item.TrafficNum = report.TrafficNum;
item.EquipmentNum = report.EquipmentNum;
item.QualityNum = report.QualityNum;
@@ -791,15 +886,15 @@ namespace FineUIPro.Web.ZHGL.Information
item.MinorAccidentNum = 0;
item.MinorAccidentPersonNum = 0;
item.MinorAccidentLossHour = 0;
item.OtherAccidentNum = 0;
item.OtherAccidentPersonNum = 0;
item.OtherAccidentLossHour = 0;
item.DeathAccidentNum = 0;
item.DeathAccidentPersonNum = 0;
item.DeathAccidentLossHour = 0;
item.RestrictedWorkPersonNum = 0;
item.RestrictedWorkLossHour = 0;
item.MedicalTreatmentPersonNum = 0;
item.MedicalTreatmentLossHour = 0;
item.FireNum = 0;
item.ExplosionNum = 0;
item.EnvironmenNum = 0;
item.TrafficNum = 0;
item.EquipmentNum = 0;
item.QualityNum = 0;
@@ -893,6 +988,22 @@ namespace FineUIPro.Web.ZHGL.Information
newMillionsMonthlyReport.UpState = BLL.Const.UpState_2;
newMillionsMonthlyReport.HandleState = BLL.Const.HandleState_1;
newMillionsMonthlyReport.HandleMan = this.CurrUser.PersonId;
newMillionsMonthlyReport.InputCosts = millionsMonthlyReport.InputCosts;
newMillionsMonthlyReport.TrainNum = millionsMonthlyReport.TrainNum;
newMillionsMonthlyReport.GeneralHazardNum = millionsMonthlyReport.GeneralHazardNum;
newMillionsMonthlyReport.MajorHazardNum = millionsMonthlyReport.MajorHazardNum;
newMillionsMonthlyReport.NotProofLargeProjectNum = millionsMonthlyReport.NotProofLargeProjectNum;
newMillionsMonthlyReport.ProofLargeProjectNum = millionsMonthlyReport.ProofLargeProjectNum;
newMillionsMonthlyReport.FireLicenseNum = millionsMonthlyReport.FireLicenseNum;
newMillionsMonthlyReport.LimitLicenseNum = millionsMonthlyReport.LimitLicenseNum;
newMillionsMonthlyReport.HighLicenseNum = millionsMonthlyReport.HighLicenseNum;
newMillionsMonthlyReport.HoistingLicenseNum = millionsMonthlyReport.HoistingLicenseNum;
newMillionsMonthlyReport.BreakGroundLicenseNum = millionsMonthlyReport.BreakGroundLicenseNum;
newMillionsMonthlyReport.ElectricityLicenseNum = millionsMonthlyReport.ElectricityLicenseNum;
newMillionsMonthlyReport.RTLicenseNum = millionsMonthlyReport.RTLicenseNum;
newMillionsMonthlyReport.NightLicenseNum = millionsMonthlyReport.NightLicenseNum;
newMillionsMonthlyReport.CommissionerNum = millionsMonthlyReport.CommissionerNum;
newMillionsMonthlyReport.SoleDutyNum = millionsMonthlyReport.SoleDutyNum;
BLL.MillionsMonthlyReportService.AddMillionsMonthlyReport(newMillionsMonthlyReport);
items = BLL.MillionsMonthlyReportItemService.GetItems(millionsMonthlyReport.MillionsMonthlyReportId);
@@ -920,15 +1031,15 @@ namespace FineUIPro.Web.ZHGL.Information
MinorAccidentNum = item.MinorAccidentNum,
MinorAccidentPersonNum = item.MinorAccidentPersonNum,
MinorAccidentLossHour = item.MinorAccidentLossHour,
OtherAccidentNum = item.OtherAccidentNum,
OtherAccidentPersonNum = item.OtherAccidentPersonNum,
OtherAccidentLossHour = item.OtherAccidentLossHour,
DeathAccidentNum = item.DeathAccidentNum,
DeathAccidentPersonNum = item.DeathAccidentPersonNum,
DeathAccidentLossHour = item.DeathAccidentLossHour,
RestrictedWorkPersonNum = item.RestrictedWorkPersonNum,
RestrictedWorkLossHour = item.RestrictedWorkLossHour,
MedicalTreatmentPersonNum = item.MedicalTreatmentPersonNum,
MedicalTreatmentLossHour = item.MedicalTreatmentLossHour,
FireNum = item.FireNum,
ExplosionNum = item.ExplosionNum,
EnvironmenNum = item.EnvironmenNum,
TrafficNum = item.TrafficNum,
EquipmentNum = item.EquipmentNum,
QualityNum = item.QualityNum,
@@ -983,6 +1094,70 @@ namespace FineUIPro.Web.ZHGL.Information
{
txtAccidentMortality.Text = report.AccidentMortality.ToString();
}
if (report.InputCosts != null)
{
this.txtInputCosts.Text = Convert.ToString(report.InputCosts);
}
if (report.TrainNum != null)
{
this.txtTrainNum.Text = Convert.ToString(report.TrainNum);
}
if (report.GeneralHazardNum != null)
{
this.txtGeneralHazardNum.Text = Convert.ToString(report.GeneralHazardNum);
}
if (report.MajorHazardNum != null)
{
this.txtMajorHazardNum.Text = Convert.ToString(report.MajorHazardNum);
}
if (report.NotProofLargeProjectNum != null)
{
this.txtNotProofLargeProjectNum.Text = Convert.ToString(report.NotProofLargeProjectNum);
}
if (report.ProofLargeProjectNum != null)
{
this.txtProofLargeProjectNum.Text = Convert.ToString(report.ProofLargeProjectNum);
}
if (report.FireLicenseNum != null)
{
this.txtFireLicenseNum.Text = Convert.ToString(report.FireLicenseNum);
}
if (report.LimitLicenseNum != null)
{
this.txtLimitLicenseNum.Text = Convert.ToString(report.LimitLicenseNum);
}
if (report.HighLicenseNum != null)
{
this.txtHighLicenseNum.Text = Convert.ToString(report.HighLicenseNum);
}
if (report.HoistingLicenseNum != null)
{
this.txtHoistingLicenseNum.Text = Convert.ToString(report.HoistingLicenseNum);
}
if (report.BreakGroundLicenseNum != null)
{
this.txtBreakGroundLicenseNum.Text = Convert.ToString(report.BreakGroundLicenseNum);
}
if (report.ElectricityLicenseNum != null)
{
this.txtElectricityLicenseNum.Text = Convert.ToString(report.ElectricityLicenseNum);
}
if (report.RTLicenseNum != null)
{
this.txtRTLicenseNum.Text = Convert.ToString(report.RTLicenseNum);
}
if (report.NightLicenseNum != null)
{
this.txtNightLicenseNum.Text = Convert.ToString(report.NightLicenseNum);
}
if (report.CommissionerNum != null)
{
this.txtCommissionerNum.Text = Convert.ToString(report.CommissionerNum);
}
if (report.SoleDutyNum != null)
{
this.txtSoleDutyNum.Text = Convert.ToString(report.SoleDutyNum);
}
items = BLL.MillionsMonthlyReportItemService.GetItems(millionsMonthlyReportId);
this.Grid1.DataSource = items;
this.Grid1.DataBind();