This commit is contained in:
2025-07-18 14:18:43 +08:00
parent 3b9e01f8a3
commit 4a8dc99d1f
10 changed files with 519 additions and 175 deletions
@@ -110,6 +110,20 @@
</f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Label ID="txtKeyWorkNum" runat="server" Label="重点工作任务数" LabelWidth="130px">
</f:Label>
<f:Label ID="txtKeyWorkOKNum" runat="server" Label="重点工作完成数" LabelWidth="130px">
</f:Label>
<f:Label ID="txtKeyWorkOKRate" runat="server" Label="综合完成率">
</f:Label>
<f:Label runat="server" ID="Label1">
</f:Label>
<f:Label runat="server" ID="Label2">
</f:Label>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
@@ -357,7 +371,7 @@
</f:RegionPanel>
<f:Window ID="Window1" runat="server" Hidden="true"
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
Title="编辑企业安全数据统计月报" CloseAction="HidePostBack" EnableIFrame="true" Height="650px" Maximized="true"
Title="编辑企业安全数据统计月报" CloseAction="HidePostBack" EnableIFrame="true" Height="650px"
Width="1200px">
</f:Window>
<f:Window ID="Window2" runat="server" Hidden="true"
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using BLL;
@@ -14,6 +15,11 @@ namespace FineUIPro.Web.ZHGL.Information
{
if (!IsPostBack)
{
string loginform = ConfigurationManager.AppSettings["LoginForm"];
if (!string.IsNullOrWhiteSpace(loginform) &&loginform == "Login_ZJ.aspx")
{//判断是否是重机客户,如果是重定向页面
Response.Redirect("MillionsMonthlyReportZJ.aspx");
}
BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, false);
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
@@ -65,7 +71,7 @@ namespace FineUIPro.Web.ZHGL.Information
{
upState = "(未上报)";
}
this.SimpleForm1.Title = "企业企业安全数据统计月报" + report.MonthStr + report.YearStr + upState;
this.SimpleForm1.Title = "企业安全数据统计月报" + report.MonthStr + report.YearStr + upState;
lbUnitName.Text = "填报企业:" + report.UnitName;
if (report.FillingDate != null)
{
@@ -85,6 +91,18 @@ namespace FineUIPro.Web.ZHGL.Information
this.lbHandleMan.Hidden = false;
lbHandleMan.Text = "下一步办理人:" + report.UserName;
}
if (report.KeyWorkNum != null)
{
txtKeyWorkNum.Text = report.KeyWorkNum.ToString();
}
if (report.KeyWorkOKNum != null)
{
txtKeyWorkOKNum.Text = report.KeyWorkOKNum.ToString();
}
if (!string.IsNullOrEmpty(report.KeyWorkOKRate))
{
txtKeyWorkOKRate.Text = report.KeyWorkOKRate;
}
lbRecordableIncidentRate.Text = "百万工时总可记录事件率:" + (report.RecordableIncidentRate ?? 0).ToString();
lbLostTimeRate.Text = "百万工时损失工时率:" + (report.LostTimeRate ?? 0).ToString();
lbLostTimeInjuryRate.Text = "百万工时损失工时伤害事故率:" + (report.LostTimeInjuryRate ?? 0).ToString();
@@ -109,7 +127,7 @@ namespace FineUIPro.Web.ZHGL.Information
yearTotalItem.SeriousInjuriesPersonNum = yearSumItems.Sum(x => x.SeriousInjuriesPersonNum ?? 0);
yearTotalItem.SeriousInjuriesLossHour = yearSumItems.Sum(x => x.SeriousInjuriesLossHour ?? 0);
yearTotalItem.MinorAccidentNum = yearSumItems.Sum(x => x.MinorAccidentNum ?? 0);
yearTotalItem.MinorAccidentPersonNum = yearSumItems.Sum(x => x.MinorAccidentPersonNum ?? 0);
yearTotalItem.MinorAccidentPersonNum = yearSumItems.Sum(x => x.MinorAccidentPersonNum ?? 0);
yearTotalItem.MinorAccidentLossHour = yearSumItems.Sum(x => x.MinorAccidentLossHour ?? 0);
yearTotalItem.DeathAccidentNum = yearSumItems.Sum(x => x.DeathAccidentNum ?? 0);
yearTotalItem.DeathAccidentPersonNum = yearSumItems.Sum(x => x.DeathAccidentPersonNum ?? 0);
@@ -140,7 +158,7 @@ namespace FineUIPro.Web.ZHGL.Information
Grid1.Rows[Grid1.Rows.Count - 1].Values[0] = "";
Grid1.Rows[Grid1.Rows.Count - 1].Values[1] = "";
}
var report2 = from x in Funs.DB.Information_MillionsMonthlyReport where x.MillionsMonthlyReportId== report.MillionsMonthlyReportId select x;
var report2 = from x in Funs.DB.Information_MillionsMonthlyReport where x.MillionsMonthlyReportId == report.MillionsMonthlyReportId select x;
Grid2.DataSource = report2;
Grid2.DataBind();
}
@@ -220,10 +238,10 @@ namespace FineUIPro.Web.ZHGL.Information
{
this.btnDelete.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnIn))
{
this.btnImport.Hidden = false;
}
//if (buttonList.Contains(BLL.Const.BtnIn))
//{
// this.btnImport.Hidden = false;
//}
if (buttonList.Contains(BLL.Const.BtnPrint))
{
this.btnPrint.Hidden = false;
@@ -733,13 +751,13 @@ namespace FineUIPro.Web.ZHGL.Information
var millionsMonthlyReport = Funs.DB.InformationProject_MillionsMonthlyReport.FirstOrDefault(x => x.ProjectId == item.ProjectId && x.Year == date.Year && x.Month == date.Month);
if (millionsMonthlyReport == null)
{
info += item.ProjectCode + ":" + item.ProjectName + ",未填写报表;</br>";
info += /*item.ProjectCode + ":" +*/ item.ProjectName + ",未填写报表;</br>";
}
else
{
if (millionsMonthlyReport.States != BLL.Const.State_2)
{
info += item.ProjectCode + ":" + item.ProjectName + "报表未报;";
info += /*item.ProjectCode + ":" +*/ item.ProjectName + "报表未报;";
var flows = (from x in Funs.DB.Sys_FlowOperate
join y in Funs.DB.Person_Persons on x.OperaterId equals y.PersonId
where x.DataId == millionsMonthlyReport.MillionsMonthlyReportId && x.IsClosed != false
@@ -300,6 +300,51 @@ namespace FineUIPro.Web.ZHGL.Information {
/// </remarks>
protected global::FineUIPro.Label lbAccidentMortality;
/// <summary>
/// txtKeyWorkNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtKeyWorkNum;
/// <summary>
/// txtKeyWorkOKNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtKeyWorkOKNum;
/// <summary>
/// txtKeyWorkOKRate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtKeyWorkOKRate;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label2;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -23,11 +23,11 @@
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpYear" AutoPostBack="false" EnableSimulateTree="true" Required="true"
ShowRedStar="true" runat="server" Label="年度">
<f:DropDownList ID="drpYear" AutoPostBack="true" EnableSimulateTree="true" Required="true"
ShowRedStar="true" runat="server" Label="年度" OnSelectedIndexChanged="drpDate_SelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpMonth" AutoPostBack="false" EnableSimulateTree="true" Required="true"
ShowRedStar="true" runat="server" Label="月份">
<f:DropDownList ID="drpMonth" AutoPostBack="true" EnableSimulateTree="true" Required="true"
ShowRedStar="true" runat="server" Label="月份" OnSelectedIndexChanged="drpDate_SelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpUnit" AutoPostBack="true" EnableSimulateTree="true" runat="server"
Label="填报企业" FocusOnPageLoad="true" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
@@ -172,6 +172,7 @@
<Rows>
<f:FormRow>
<Items>
<f:NumberBox ID="txtCommissionerNum" runat="server" Label="总监(人)" LabelAlign="Right" NoDecimal="true"
NoNegative="true" EmptyText="0">
</f:NumberBox>
@@ -184,6 +185,23 @@
</f:Form>
</Items>
</f:GroupPanel>
<f:GroupPanel runat="server" Title="治本攻坚三年行动" BodyPadding="5px" ID="GroupPanel1" EnableCollapse="True"
Collapsed="false">
<Items>
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" runat="server">
<Rows>
<f:FormRow>
<Items>
<f:NumberBox runat="server" ID="txtKeyWorkNum" Label="重点工作任务数" NoDecimal="true" LabelWidth="130px" NoNegative="true" Required="true" ShowRedStar="true" AutoPostBack="true" OnTextChanged="txtKeyWorkNum_TextChanged"></f:NumberBox>
<f:NumberBox runat="server" ID="txtKeyWorkOKNum" Label="重点工作完成数" NoDecimal="true" LabelWidth="130px" NoNegative="true" Required="true" ShowRedStar="true" AutoPostBack="true" OnTextChanged="txtKeyWorkNum_TextChanged"></f:NumberBox>
<f:TextBox ID="txtKeyWorkOKRate" runat="server" Label="综合完成率" Readonly="true">
</f:TextBox>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:GroupPanel>
</Items>
</f:Panel>
</Items>
@@ -176,6 +176,18 @@ namespace FineUIPro.Web.ZHGL.Information
{
this.txtSoleDutyNum.Text = Convert.ToString(report.SoleDutyNum);
}
if (report.KeyWorkNum != null)
{
this.txtKeyWorkNum.Text = report.KeyWorkNum.ToString();
}
if (report.KeyWorkOKNum != null)
{
this.txtKeyWorkOKNum.Text = report.KeyWorkOKNum.ToString();
}
if (!string.IsNullOrEmpty(report.KeyWorkOKRate))
{
this.txtKeyWorkOKRate.Text = report.KeyWorkOKRate;
}
}
}
else
@@ -276,6 +288,9 @@ namespace FineUIPro.Web.ZHGL.Information
report.NightLicenseNum = Funs.GetNewInt(this.txtNightLicenseNum.Text.Trim());
report.CommissionerNum = Funs.GetNewInt(this.txtCommissionerNum.Text.Trim());
report.SoleDutyNum = Funs.GetNewInt(this.txtSoleDutyNum.Text.Trim());
report.KeyWorkNum = Funs.GetNewIntOrZero(this.txtKeyWorkNum.Text.Trim());
report.KeyWorkOKNum = Funs.GetNewIntOrZero(this.txtKeyWorkOKNum.Text.Trim());
report.KeyWorkOKRate = this.txtKeyWorkOKRate.Text.Trim();
if (String.IsNullOrEmpty(MillionsMonthlyReportId))
{
Information_MillionsMonthlyReport old = MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
@@ -329,6 +344,7 @@ namespace FineUIPro.Web.ZHGL.Information
string code = CNCECHSSEWebService.UpMillionsMonthlyReport(report.MillionsMonthlyReportId, this.CurrUser);
if (code == "1")
{
//WorkflowTodoitemsService.DoneWorkflow_TodoItems(report.MillionsMonthlyReportId, this.CurrUser.UserId);//完成当前人待办
ShowNotify("同步成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
return;
@@ -892,7 +908,7 @@ namespace FineUIPro.Web.ZHGL.Information
};
items.Add(item2);
var projects = (from x in Funs.DB.Base_Project
where projectIds.Contains(x.ProjectId)
where projectIds.Contains(x.ProjectId)
select x).ToList();
if (this.CurrUser.UnitId == BLL.Const.UnitId_SEDIN)
@@ -1253,5 +1269,17 @@ namespace FineUIPro.Web.ZHGL.Information
}
}
#endregion
protected void txtKeyWorkNum_TextChanged(object sender, EventArgs e)
{
decimal keyWorkNum = Funs.GetNewDecimalOrZero(this.txtKeyWorkNum.Text.Trim());
decimal keyWorkOKNum = Funs.GetNewDecimalOrZero(this.txtKeyWorkOKNum.Text.Trim());
string rate = string.Empty;
if (keyWorkNum > 0)
{
rate = (decimal.Round(keyWorkOKNum / keyWorkNum, 4) * 100).ToString("0.##") + "%";
}
this.txtKeyWorkOKRate.Text = rate;
}
}
}
@@ -381,6 +381,51 @@ namespace FineUIPro.Web.ZHGL.Information {
/// </remarks>
protected global::FineUIPro.NumberBox txtSoleDutyNum;
/// <summary>
/// GroupPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupPanel GroupPanel1;
/// <summary>
/// Form2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// txtKeyWorkNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtKeyWorkNum;
/// <summary>
/// txtKeyWorkOKNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtKeyWorkOKNum;
/// <summary>
/// txtKeyWorkOKRate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtKeyWorkOKRate;
/// <summary>
/// Grid1 控件。
/// </summary>