2023-03-31 报表升级

This commit is contained in:
2023-03-31 10:21:00 +08:00
parent 5acee68633
commit 5ee3b089b7
175 changed files with 68864 additions and 2056 deletions
@@ -59,26 +59,9 @@ namespace FineUIPro.Web.ZHGL.Information
if (!String.IsNullOrEmpty(MillionsMonthlyReportId))
{
items = BLL.MillionsMonthlyReportItemService.GetItemsNoSum(MillionsMonthlyReportId);
//int i = items.Count * 10;
//int count = items.Count;
//if (items.Count < 10)
//{
// for (int j = 0; j < (10 - count); j++)
// {
// i += 10;
// Model.Information_MillionsMonthlyReportItem newItem = new Information_MillionsMonthlyReportItem
// {
// MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)),
// Affiliation = string.Empty,
// Name = string.Empty,
// SortIndex = i
// };
// items.Add(newItem);
// }
//}
this.Grid1.DataSource = items;
this.Grid1.DataBind();
Model.Information_MillionsMonthlyReport report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(MillionsMonthlyReportId);
var report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(MillionsMonthlyReportId);
if (report != null)
{
this.btnSave.Hidden = true;
@@ -129,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
@@ -213,10 +260,25 @@ 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))
{
Model.Information_MillionsMonthlyReport old = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
Information_MillionsMonthlyReport old = MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (old == null)
{
report.MillionsMonthlyReportId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReport));
@@ -248,6 +310,7 @@ namespace FineUIPro.Web.ZHGL.Information
}
MillionsMonthlyReportId = report.MillionsMonthlyReportId;
BLL.MillionsMonthlyReportItemService.DeleteMillionsMonthlyReportItemByMillionsMonthlyReportId(report.MillionsMonthlyReportId);
List<Model.Information_MillionsMonthlyReportItem> mReportItemList = new List<Information_MillionsMonthlyReportItem>();
GetItems(report.MillionsMonthlyReportId);
foreach (var item in items)
{
@@ -255,12 +318,12 @@ namespace FineUIPro.Web.ZHGL.Information
{
item.Affiliation = System.Web.HttpUtility.HtmlDecode(item.Affiliation);
item.Name = System.Web.HttpUtility.HtmlDecode(item.Name);
BLL.MillionsMonthlyReportItemService.AddMillionsMonthlyReportItem(item);
MillionsMonthlyReportItemService.AddMillionsMonthlyReportItem(item);
mReportItemList.Add(item);
}
}
if (type == "updata") //保存并上报
if (type == "updata") //数据同步
{
// Update(report.MillionsMonthlyReportId);
if (report.UpState == BLL.Const.UpState_2)
{
string code = CNCECHSSEWebService.UpMillionsMonthlyReport(report.MillionsMonthlyReportId, this.CurrUser);
@@ -285,14 +348,6 @@ namespace FineUIPro.Web.ZHGL.Information
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReportSubmit.aspx?Type=MillionsMonthlyReport&Id={0}", report.MillionsMonthlyReportId, "编辑 - ")));
}
// 2. 关闭本窗体,然后刷新父窗体
// PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
// 2. 关闭本窗体,然后回发父窗体
//if (type != "submit")
//{
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
//}
//PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(wedId) + ActiveWindow.GetHideReference());
}
protected void btnSave_Click(object sender, EventArgs e)
@@ -311,126 +366,13 @@ namespace FineUIPro.Web.ZHGL.Information
}
#endregion
#region
/// <summary>
/// 同步数据
/// </summary>
/// <param name="millionsMonthlyReportId"></param>
private void Update(string millionsMonthlyReportId)
{
/////创建客户端服务
//var poxy = Web.ServiceProxy.CreateServiceClient();
//poxy.DataInsertInformation_MillionsMonthlyReportTableCompleted += new EventHandler<HSSEService.DataInsertInformation_MillionsMonthlyReportTableCompletedEventArgs>(poxy_DataInsertInformation_MillionsMonthlyReportTableCompleted);
//var report = from x in Funs.DB.Information_MillionsMonthlyReport
// where x.MillionsMonthlyReportId == millionsMonthlyReportId && x.UpState == BLL.Const.UpState_2
// select new HSSEService.Information_MillionsMonthlyReport
// {
// MillionsMonthlyReportId = x.MillionsMonthlyReportId,
// UnitId = x.UnitId,
// Year = x.Year,
// Month = x.Month,
// FillingMan = x.FillingMan,
// FillingDate = x.FillingDate,
// DutyPerson = x.DutyPerson,
// RecordableIncidentRate = x.RecordableIncidentRate,
// LostTimeRate = x.LostTimeRate,
// LostTimeInjuryRate = x.LostTimeInjuryRate,
// DeathAccidentFrequency = x.DeathAccidentFrequency,
// AccidentMortality = x.AccidentMortality,
// };
//var reportItem = from x in Funs.DB.Information_MillionsMonthlyReportItem
// where x.MillionsMonthlyReportId == millionsMonthlyReportId
// select new HSSEService.Information_MillionsMonthlyReportItem
// {
// MillionsMonthlyReportItemId = x.MillionsMonthlyReportItemId,
// MillionsMonthlyReportId = x.MillionsMonthlyReportId,
// SortIndex = x.SortIndex,
// Affiliation = x.Affiliation,
// Name = x.Name,
// PostPersonNum = x.PostPersonNum,
// SnapPersonNum = x.SnapPersonNum,
// ContractorNum = x.ContractorNum,
// SumPersonNum = x.SumPersonNum,
// TotalWorkNum = x.TotalWorkNum,
// SeriousInjuriesNum = x.SeriousInjuriesNum,
// SeriousInjuriesPersonNum = x.SeriousInjuriesPersonNum,
// SeriousInjuriesLossHour = x.SeriousInjuriesLossHour,
// MinorAccidentNum = x.MinorAccidentNum,
// MinorAccidentPersonNum = x.MinorAccidentPersonNum,
// MinorAccidentLossHour = x.MinorAccidentLossHour,
// OtherAccidentNum = x.OtherAccidentNum,
// OtherAccidentPersonNum = x.OtherAccidentPersonNum,
// OtherAccidentLossHour = x.OtherAccidentLossHour,
// RestrictedWorkPersonNum = x.RestrictedWorkPersonNum,
// RestrictedWorkLossHour = x.RestrictedWorkLossHour,
// MedicalTreatmentPersonNum = x.MedicalTreatmentPersonNum,
// MedicalTreatmentLossHour = x.MedicalTreatmentLossHour,
// FireNum = x.FireNum,
// ExplosionNum = x.ExplosionNum,
// TrafficNum = x.TrafficNum,
// EquipmentNum = x.EquipmentNum,
// QualityNum = x.QualityNum,
// OtherNum = x.OtherNum,
// FirstAidDressingsNum = x.FirstAidDressingsNum,
// AttemptedEventNum = x.AttemptedEventNum,
// LossDayNum = x.LossDayNum,
// };
//poxy.DataInsertInformation_MillionsMonthlyReportTableAsync(report.ToList(), reportItem.ToList());
}
#region
/// <summary>
/// 百万工时安全统计月报表
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
//private void poxy_DataInsertInformation_MillionsMonthlyReportTableCompleted(object sender, HSSEService.DataInsertInformation_MillionsMonthlyReportTableCompletedEventArgs e)
//{
// if (e.Error == null)
// {
// var idList = e.Result;
// foreach (var item in idList)
// {
// var report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(item);
// if (report != null)
// {
// report.UpState = BLL.Const.UpState_3;
// BLL.MillionsMonthlyReportService.UpdateMillionsMonthlyReport(report);
// ////更新 当前人要处理的意见
// Model.ProjectData_FlowOperate updateUnFlowOperate = BLL.ProjectDataFlowSetService.GetFlowOperateOpinion(BLL.Const.MillionsMonthlyReportMenuId, item);
// if (updateUnFlowOperate != null)
// {
// updateUnFlowOperate.OperaterTime = System.DateTime.Now;
// updateUnFlowOperate.IsClosed = true;
// BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate);
// }
// ////更新催报信息
// var urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == report.UnitId && x.ReprotType == BLL.Const.ReportType_1 && x.YearId == report.Year.ToString() && x.MonthId == report.Month.ToString());
// if (urgeReport != null)
// {
// urgeReport.IsComplete = true;
// Funs.DB.SubmitChanges();
// }
// }
// }
// BLL.LogService.AddSys_Log(this.CurrUser, "【百万工时安全统计月报表】上传到服务器" + idList.Count.ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
// }
// else
// {
// BLL.LogService.AddSys_Log(this.CurrUser, "【百万工时安全统计月报表】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
// }
//}
#endregion
#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())
@@ -548,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() != "")
{
@@ -616,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() != "")
{
@@ -692,7 +634,7 @@ namespace FineUIPro.Web.ZHGL.Information
i += 10;
}
Model.Information_MillionsMonthlyReportItem totalItem = new Information_MillionsMonthlyReportItem
Information_MillionsMonthlyReportItem totalItem = new Information_MillionsMonthlyReportItem
{
MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)),
MillionsMonthlyReportId = millionsMonthlyReportId,
@@ -710,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,
@@ -781,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
@@ -800,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,
@@ -836,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,
@@ -858,7 +816,7 @@ namespace FineUIPro.Web.ZHGL.Information
where projectIds.Contains(x.ProjectId)
select x).ToList();
if (this.CurrUser.UnitId == BLL.Const.UnitId_CD)
if (this.CurrUser.UnitId == Const.UnitId_CD)
{
projects = BLL.ProjectService.GetProjectWorkList();
}
@@ -898,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;
@@ -928,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;
@@ -1030,6 +988,22 @@ namespace FineUIPro.Web.ZHGL.Information
newMillionsMonthlyReport.UpState = BLL.Const.UpState_2;
newMillionsMonthlyReport.HandleState = BLL.Const.HandleState_1;
newMillionsMonthlyReport.HandleMan = this.CurrUser.UserId;
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);
@@ -1057,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,
@@ -1120,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();