1
This commit is contained in:
@@ -6,6 +6,12 @@
|
||||
<head runat="server">
|
||||
<title>企业安全数据统计月报</title>
|
||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
.f-grid-colheader-text {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -67,6 +73,9 @@
|
||||
<f:RenderField Width="120px" ColumnID="TotalWorkNum" DataField="TotalWorkNum" FieldType="String"
|
||||
HeaderText="总工时数(万)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="OutSideUnitWorkNum" DataField="OutSideUnitWorkNum" FieldType="String"
|
||||
HeaderText="去除系统内单位的总工时数(万)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:GroupField EnableLock="true" HeaderText="损失工时伤害事故" TextAlign="Center">
|
||||
<Columns>
|
||||
<f:GroupField EnableLock="true" HeaderText="死亡事故" TextAlign="Center">
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace FineUIPro.Web.InformationProject
|
||||
+ @"MillionsMonthlyReport.ContractorNum,"
|
||||
+ @"MillionsMonthlyReport.SumPersonNum,"
|
||||
+ @"MillionsMonthlyReport.TotalWorkNum,"
|
||||
+ @"MillionsMonthlyReport.OutSideUnitWorkNum,"
|
||||
+ @"MillionsMonthlyReport.DeathAccidentNum,"
|
||||
+ @"MillionsMonthlyReport.DeathAccidentPersonNum,"
|
||||
+ @"MillionsMonthlyReport.DeathAccidentLossHour,"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<f:FormRow ColumnWidths="20% 20% 25% 35%">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpYear" runat="server" Label="年度" EnableEdit="true" LabelAlign="Right"
|
||||
Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpYear_SelectedIndexChanged">
|
||||
@@ -37,6 +37,8 @@
|
||||
</f:NumberBox>--%>
|
||||
<f:TextBox ID="txtTotalWorkNum" runat="server" Label="总工时数(万)" LabelWidth="140px" LabelAlign="Right" EmptyText="0">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtOutSideUnitWorkNum" runat="server" Label="去除系统内单位的总工时数(万)" LabelWidth="240px" LabelAlign="Right" EmptyText="0">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<%-- <f:FormRow>
|
||||
|
||||
@@ -84,6 +84,10 @@ namespace FineUIPro.Web.InformationProject
|
||||
{
|
||||
this.txtTotalWorkNum.Text = Convert.ToString(millionsMonthlyReport.TotalWorkNum);
|
||||
}
|
||||
if (millionsMonthlyReport.OutSideUnitWorkNum != null)
|
||||
{
|
||||
this.txtOutSideUnitWorkNum.Text = Convert.ToString(millionsMonthlyReport.OutSideUnitWorkNum);
|
||||
}
|
||||
if (millionsMonthlyReport.PostPersonNum != null)
|
||||
{
|
||||
this.txtPostPersonNum.Text = Convert.ToString(millionsMonthlyReport.PostPersonNum);
|
||||
@@ -363,6 +367,7 @@ namespace FineUIPro.Web.InformationProject
|
||||
millionsMonthlyReport.ContractorNum = Funs.GetNewIntOrZero(this.txtContractorNum.Text.Trim());
|
||||
millionsMonthlyReport.SumPersonNum = millionsMonthlyReport.PostPersonNum + millionsMonthlyReport.SnapPersonNum + millionsMonthlyReport.ContractorNum;
|
||||
millionsMonthlyReport.TotalWorkNum = Funs.GetNewDecimalOrZero(this.txtTotalWorkNum.Text.Trim());
|
||||
millionsMonthlyReport.OutSideUnitWorkNum = Funs.GetNewDecimalOrZero(this.txtOutSideUnitWorkNum.Text.Trim());
|
||||
millionsMonthlyReport.SeriousInjuriesNum = Funs.GetNewInt(this.txtSeriousInjuriesNum.Text.Trim());
|
||||
millionsMonthlyReport.SeriousInjuriesPersonNum = Funs.GetNewInt(this.txtSeriousInjuriesPersonNum.Text.Trim());
|
||||
millionsMonthlyReport.SeriousInjuriesLossHour = Funs.GetNewInt(this.txtSeriousInjuriesLossHour.Text.Trim());
|
||||
@@ -471,7 +476,18 @@ namespace FineUIPro.Web.InformationProject
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
int? sumTotalPanhours = 0;
|
||||
|
||||
int? sumOutSideTotalPanhours = 0;
|
||||
List<string> outSideUnitIds = new List<string>();
|
||||
var projectUnits = from x in db.Project_ProjectUnit
|
||||
where x.ProjectId == this.ProjectId
|
||||
select x;
|
||||
foreach (var projectUnit in projectUnits)
|
||||
{
|
||||
if (projectUnit.UnitType == BLL.Const.ProjectUnitType_1 || projectUnit.IsOutSideUnit == true)
|
||||
{
|
||||
outSideUnitIds.Add(projectUnit.UnitId);
|
||||
}
|
||||
}
|
||||
//获取当期人工时日报
|
||||
List<Model.SitePerson_DayReport> dayReports = BLL.SitePerson_DayReportService.GetDayReportsByCompileDate(startTime, endTime, this.ProjectId);
|
||||
if (dayReports.Count > 0)
|
||||
@@ -479,10 +495,15 @@ namespace FineUIPro.Web.InformationProject
|
||||
foreach (var dayReport in dayReports)
|
||||
{
|
||||
sumTotalPanhours += Convert.ToInt32((from y in db.SitePerson_DayReportDetail where y.DayReportId == dayReport.DayReportId select y.PersonWorkTime as decimal?).Sum());
|
||||
sumOutSideTotalPanhours += Convert.ToInt32((from y in db.SitePerson_DayReportDetail
|
||||
where y.DayReportId == dayReport.DayReportId && outSideUnitIds.Contains(y.UnitId)
|
||||
select y.PersonWorkTime as decimal?).Sum());
|
||||
}
|
||||
|
||||
//总工时数(万)
|
||||
this.txtTotalWorkNum.Text = decimal.Round(decimal.Round(Convert.ToDecimal(sumTotalPanhours), 4) / 10000, 4).ToString();
|
||||
//去除系统内单位的总工时数(万)
|
||||
this.txtOutSideUnitWorkNum.Text = decimal.Round(decimal.Round(Convert.ToDecimal(sumOutSideTotalPanhours), 4) / 10000, 4).ToString();
|
||||
//在岗员工
|
||||
//获取单位集合
|
||||
var unitIds = (from x in dayReports
|
||||
|
||||
+9
@@ -84,6 +84,15 @@ namespace FineUIPro.Web.InformationProject {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTotalWorkNum;
|
||||
|
||||
/// <summary>
|
||||
/// txtOutSideUnitWorkNum 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtOutSideUnitWorkNum;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<f:FormRow ColumnWidths="20% 20% 25% 35%">
|
||||
<Items>
|
||||
<f:TextBox ID="txtYear" runat="server" Label="年度" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
@@ -32,6 +32,8 @@
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtTotalWorkNum" runat="server" Label="总工时数(万)" Readonly="true" LabelWidth="140px" LabelAlign="Right" EmptyText="0">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtOutSideUnitWorkNum" runat="server" Label="去除系统内单位的总工时数(万)" LabelWidth="240px" Readonly="true" LabelAlign="Right" EmptyText="0">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<%-- <f:FormRow>
|
||||
|
||||
@@ -82,6 +82,10 @@ namespace FineUIPro.Web.InformationProject
|
||||
{
|
||||
this.txtTotalWorkNum.Text = Convert.ToString(millionsMonthlyReport.TotalWorkNum);
|
||||
}
|
||||
if (millionsMonthlyReport.OutSideUnitWorkNum != null)
|
||||
{
|
||||
this.txtOutSideUnitWorkNum.Text = Convert.ToString(millionsMonthlyReport.OutSideUnitWorkNum);
|
||||
}
|
||||
if (millionsMonthlyReport.PostPersonNum != null)
|
||||
{
|
||||
this.txtPostPersonNum.Text = Convert.ToString(millionsMonthlyReport.PostPersonNum);
|
||||
|
||||
+9
@@ -84,6 +84,15 @@ namespace FineUIPro.Web.InformationProject {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTotalWorkNum;
|
||||
|
||||
/// <summary>
|
||||
/// txtOutSideUnitWorkNum 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtOutSideUnitWorkNum;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel1 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user