定制版企业安全报表增加内容

This commit is contained in:
geh 2025-07-18 18:18:12 +08:00
parent ee4e3fae13
commit 97157b6145
10 changed files with 341 additions and 1 deletions

View File

@ -0,0 +1,42 @@
alter table Information_MillionsMonthlyReport add KeyWorkNum int null
alter table Information_MillionsMonthlyReport add KeyWorkOKNum int null
alter table Information_MillionsMonthlyReport add KeyWorkOKRate nvarchar(20) null
GO
/*************企业百万工时安全统计月报表**************/
ALTER VIEW [dbo].[View_Information_MillionsMonthlyReport]
AS
SELECT
Report.MillionsMonthlyReportId,
Report.UnitId,
Report.FillingDate,
Report.UpState,
(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0009.ConstText,'-')) AS ReportDate,
Group_0008.ConstText as YearStr,
Group_0009.ConstText as MonthStr,
U.UnitName,
Report.Year,
Report.Month,
Report.DutyPerson,
Report.RecordableIncidentRate,
Report.LostTimeRate,
Report.LostTimeInjuryRate,
Report.DeathAccidentFrequency,
Report.AccidentMortality,
Report.HandleState,
Report.HandleMan,
Report.KeyWorkNum,
Report.KeyWorkOKNum,
Report.KeyWorkOKRate,
US.UserName
FROM dbo.Information_MillionsMonthlyReport AS Report
LEFT JOIN Base_Unit AS U ON U.UnitId=Report.UnitId
LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.[Year]
LEFT JOIN Sys_Const AS Group_0009 ON Group_0009.GroupId='0009' AND Group_0009.ConstValue =Report.[Month]
LEFT JOIN Sys_User AS US ON US.UserId=Report.HandleMan
GO

View File

@ -93,7 +93,7 @@
UnitId = x.UnitId,
Year = x.Year,
Month = x.Month,
FillingMan = x.FillingMan,
FillingMan = x.FillingMan+"|"+(x.KeyWorkNum??0).ToString() + "|" + (x.KeyWorkOKNum ?? 0).ToString() + "|" + (x.KeyWorkOKRate ?? ""),
FillingDate = x.FillingDate,
DutyPerson = x.DutyPerson,
RecordableIncidentRate = x.RecordableIncidentRate,

View File

@ -73,6 +73,9 @@ namespace BLL
BreakGroundLicenseNum = MillionsMonthlyReport.BreakGroundLicenseNum,
ElectricityLicenseNum = MillionsMonthlyReport.ElectricityLicenseNum,
RTLicenseNum = MillionsMonthlyReport.RTLicenseNum,
KeyWorkNum = MillionsMonthlyReport.KeyWorkNum,
KeyWorkOKNum = MillionsMonthlyReport.KeyWorkOKNum,
KeyWorkOKRate = MillionsMonthlyReport.KeyWorkOKRate,
NightLicenseNum = MillionsMonthlyReport.NightLicenseNum,
CommissionerNum = MillionsMonthlyReport.CommissionerNum,
SoleDutyNum = MillionsMonthlyReport.SoleDutyNum,
@ -120,6 +123,9 @@ namespace BLL
newMillionsMonthlyReport.NightLicenseNum = MillionsMonthlyReport.NightLicenseNum;
newMillionsMonthlyReport.CommissionerNum = MillionsMonthlyReport.CommissionerNum;
newMillionsMonthlyReport.SoleDutyNum = MillionsMonthlyReport.SoleDutyNum;
newMillionsMonthlyReport.KeyWorkNum = MillionsMonthlyReport.KeyWorkNum;
newMillionsMonthlyReport.KeyWorkOKNum = MillionsMonthlyReport.KeyWorkOKNum;
newMillionsMonthlyReport.KeyWorkOKRate = MillionsMonthlyReport.KeyWorkOKRate;
Funs.DB.SubmitChanges();
}

View File

@ -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"

View File

@ -15,6 +15,12 @@ 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);
@ -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();

View File

@ -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>

View File

@ -185,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>

View File

@ -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));
@ -1254,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;
}
}
}

View File

@ -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>

View File

@ -218653,6 +218653,12 @@ namespace Model
private System.Nullable<int> _SoleDutyNum;
private System.Nullable<int> _KeyWorkNum;
private System.Nullable<int> _KeyWorkOKNum;
private string _KeyWorkOKRate;
private EntityRef<Base_Unit> _Base_Unit;
private EntitySet<Information_MillionsMonthlyReportItem> _Information_MillionsMonthlyReportItem;
@ -218723,6 +218729,12 @@ namespace Model
partial void OnCommissionerNumChanged();
partial void OnSoleDutyNumChanging(System.Nullable<int> value);
partial void OnSoleDutyNumChanged();
partial void OnKeyWorkNumChanging(System.Nullable<int> value);
partial void OnKeyWorkNumChanged();
partial void OnKeyWorkOKNumChanging(System.Nullable<int> value);
partial void OnKeyWorkOKNumChanged();
partial void OnKeyWorkOKRateChanging(string value);
partial void OnKeyWorkOKRateChanged();
#endregion
public Information_MillionsMonthlyReport()
@ -219356,6 +219368,66 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyWorkNum", DbType="Int")]
public System.Nullable<int> KeyWorkNum
{
get
{
return this._KeyWorkNum;
}
set
{
if ((this._KeyWorkNum != value))
{
this.OnKeyWorkNumChanging(value);
this.SendPropertyChanging();
this._KeyWorkNum = value;
this.SendPropertyChanged("KeyWorkNum");
this.OnKeyWorkNumChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyWorkOKNum", DbType="Int")]
public System.Nullable<int> KeyWorkOKNum
{
get
{
return this._KeyWorkOKNum;
}
set
{
if ((this._KeyWorkOKNum != value))
{
this.OnKeyWorkOKNumChanging(value);
this.SendPropertyChanging();
this._KeyWorkOKNum = value;
this.SendPropertyChanged("KeyWorkOKNum");
this.OnKeyWorkOKNumChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyWorkOKRate", DbType="NVarChar(20)")]
public string KeyWorkOKRate
{
get
{
return this._KeyWorkOKRate;
}
set
{
if ((this._KeyWorkOKRate != value))
{
this.OnKeyWorkOKRateChanging(value);
this.SendPropertyChanging();
this._KeyWorkOKRate = value;
this.SendPropertyChanged("KeyWorkOKRate");
this.OnKeyWorkOKRateChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_MillionsMonthlyReport_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)]
public Base_Unit Base_Unit
{
@ -478823,6 +478895,12 @@ namespace Model
private string _HandleMan;
private System.Nullable<int> _KeyWorkNum;
private System.Nullable<int> _KeyWorkOKNum;
private string _KeyWorkOKRate;
private string _UserName;
public View_Information_MillionsMonthlyReport()
@ -479117,6 +479195,54 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyWorkNum", DbType="Int")]
public System.Nullable<int> KeyWorkNum
{
get
{
return this._KeyWorkNum;
}
set
{
if ((this._KeyWorkNum != value))
{
this._KeyWorkNum = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyWorkOKNum", DbType="Int")]
public System.Nullable<int> KeyWorkOKNum
{
get
{
return this._KeyWorkOKNum;
}
set
{
if ((this._KeyWorkOKNum != value))
{
this._KeyWorkOKNum = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyWorkOKRate", DbType="NVarChar(20)")]
public string KeyWorkOKRate
{
get
{
return this._KeyWorkOKRate;
}
set
{
if ((this._KeyWorkOKRate != value))
{
this._KeyWorkOKRate = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(50)")]
public string UserName
{