HSE巡检统计图表,补充按隐患类型统计
This commit is contained in:
parent
d516b8290c
commit
f867e15978
|
@ -49,7 +49,8 @@
|
||||||
<f:RadioButtonList ID="rblState" runat="server" Label="分析类型" LabelWidth="80px" Width="250px"
|
<f:RadioButtonList ID="rblState" runat="server" Label="分析类型" LabelWidth="80px" Width="250px"
|
||||||
AutoPostBack="true" OnSelectedIndexChanged="drpChartType_SelectedIndexChanged">
|
AutoPostBack="true" OnSelectedIndexChanged="drpChartType_SelectedIndexChanged">
|
||||||
<f:RadioItem Value="0" Selected="true" Text="按责任单位" />
|
<f:RadioItem Value="0" Selected="true" Text="按责任单位" />
|
||||||
<f:RadioItem Value="1" Text="按检查项" />
|
<f:RadioItem Value="1" Text="按隐患类型" />
|
||||||
|
<%--<f:RadioItem Value="1" Text="按检查项" />--%>
|
||||||
</f:RadioButtonList>
|
</f:RadioButtonList>
|
||||||
<f:Label ID="aa" runat="server">
|
<f:Label ID="aa" runat="server">
|
||||||
</f:Label>
|
</f:Label>
|
||||||
|
@ -65,8 +66,8 @@
|
||||||
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" Height="360px" ShowBorder="true"
|
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" Height="360px" ShowBorder="true"
|
||||||
TabPosition="Top" MarginBottom="5px" EnableTabCloseMenu="false" runat="server">
|
TabPosition="Top" MarginBottom="5px" EnableTabCloseMenu="false" runat="server">
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<f:Tab ID="Tab2" Title="按类别" BodyPadding="5px" Layout="Fit" IconFont="Bookmark" runat="server"
|
<f:Tab ID="Tab2" Title="统计结果" BodyPadding="5px" Layout="Fit" IconFont="Bookmark" runat="server"
|
||||||
TitleToolTip="按类别统计">
|
TitleToolTip="统计结果">
|
||||||
<Items>
|
<Items>
|
||||||
<f:ContentPanel ShowHeader="false" runat="server" ID="cpAccidentTime" Margin="0 0 0 0">
|
<f:ContentPanel ShowHeader="false" runat="server" ID="cpAccidentTime" Margin="0 0 0 0">
|
||||||
<div id="divAccidentTime">
|
<div id="divAccidentTime">
|
||||||
|
|
|
@ -98,23 +98,24 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#region 按检查项
|
#region 按隐患类型
|
||||||
|
|
||||||
|
var types = from x in Funs.DB.Sys_Const where x.GroupId == "Hiddendangertype" orderby x.SortIndex select x;
|
||||||
if (this.drpChartType.SelectedValue != "Pie") //非饼形图
|
if (this.drpChartType.SelectedValue != "Pie") //非饼形图
|
||||||
{
|
{
|
||||||
///按检查项
|
///按隐患类型
|
||||||
DataTable dtTime = new DataTable();
|
DataTable dtTime = new DataTable();
|
||||||
dtTime.Columns.Add("检查项", typeof(string));
|
dtTime.Columns.Add("隐患类型", typeof(string));
|
||||||
dtTime.Columns.Add("总数量", typeof(string));
|
dtTime.Columns.Add("总数量", typeof(string));
|
||||||
dtTime.Columns.Add("待整改", typeof(string));
|
dtTime.Columns.Add("待整改", typeof(string));
|
||||||
dtTime.Columns.Add("已整改", typeof(string));
|
dtTime.Columns.Add("已整改", typeof(string));
|
||||||
|
|
||||||
var types = from x in Funs.DB.HSSE_Hazard_HazardRegisterTypes where x.HazardRegisterType == "1" orderby x.TypeCode select x;
|
|
||||||
foreach (var item in types)
|
foreach (var item in types)
|
||||||
{
|
{
|
||||||
DataRow rowTime = dtTime.NewRow();
|
DataRow rowTime = dtTime.NewRow();
|
||||||
Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
|
Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
|
||||||
rowTime["检查项"] = item.RegisterTypesName;
|
rowTime["隐患类型"] = item.ConstValue;
|
||||||
var typeHazad = hazardRegisters.Where(x => x.RegisterTypesId == item.RegisterTypesId);
|
var typeHazad = hazardRegisters.Where(x => x.HiddenType == item.ConstValue);
|
||||||
rowTime["总数量"] = typeHazad.Count();
|
rowTime["总数量"] = typeHazad.Count();
|
||||||
rowTime["待整改"] = typeHazad.Where(x => x.States == "1" || x.States == null).Count();
|
rowTime["待整改"] = typeHazad.Where(x => x.States == "1" || x.States == null).Count();
|
||||||
rowTime["已整改"] = typeHazad.Where(x => x.States == "3" || x.States == "2").Count();
|
rowTime["已整改"] = typeHazad.Where(x => x.States == "3" || x.States == "2").Count();
|
||||||
|
@ -127,22 +128,70 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||||
{
|
{
|
||||||
///按问题类型
|
///按问题类型
|
||||||
DataTable dtTime = new DataTable();
|
DataTable dtTime = new DataTable();
|
||||||
dtTime.Columns.Add("检查项", typeof(string));
|
dtTime.Columns.Add("隐患类型", typeof(string));
|
||||||
dtTime.Columns.Add("总数量", typeof(string));
|
dtTime.Columns.Add("总数量", typeof(string));
|
||||||
|
|
||||||
var types = from x in Funs.DB.HSSE_Hazard_HazardRegisterTypes where x.HazardRegisterType == "1" orderby x.TypeCode select x;
|
|
||||||
foreach (var item in types)
|
foreach (var item in types)
|
||||||
{
|
{
|
||||||
DataRow rowTime = dtTime.NewRow();
|
DataRow rowTime = dtTime.NewRow();
|
||||||
Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
|
Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
|
||||||
rowTime["检查项"] = item.RegisterTypesName;
|
rowTime["隐患类型"] = item.ConstValue;
|
||||||
var typeHazad = hazardRegisters.Where(x => x.RegisterTypesId == item.RegisterTypesId);
|
var typeHazad = hazardRegisters.Where(x => x.HiddenType == item.ConstValue);
|
||||||
rowTime["总数量"] = typeHazad.Count();
|
rowTime["总数量"] = typeHazad.Count();
|
||||||
dtTime.Rows.Add(rowTime);
|
dtTime.Rows.Add(rowTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "巡检问题分析", this.drpChartType.SelectedValue, 1100, 330, this.ckbShow.Checked));
|
this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "巡检问题分析", this.drpChartType.SelectedValue, 1100, 330, this.ckbShow.Checked));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 按检查项
|
||||||
|
//if (this.drpChartType.SelectedValue != "Pie") //非饼形图
|
||||||
|
//{
|
||||||
|
// ///按检查项
|
||||||
|
// DataTable dtTime = new DataTable();
|
||||||
|
// dtTime.Columns.Add("检查项", typeof(string));
|
||||||
|
// dtTime.Columns.Add("总数量", typeof(string));
|
||||||
|
// dtTime.Columns.Add("待整改", typeof(string));
|
||||||
|
// dtTime.Columns.Add("已整改", typeof(string));
|
||||||
|
|
||||||
|
// var types = from x in Funs.DB.HSSE_Hazard_HazardRegisterTypes where x.HazardRegisterType == "1" orderby x.TypeCode select x;
|
||||||
|
// foreach (var item in types)
|
||||||
|
// {
|
||||||
|
// DataRow rowTime = dtTime.NewRow();
|
||||||
|
// Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
|
||||||
|
// rowTime["检查项"] = item.RegisterTypesName;
|
||||||
|
// var typeHazad = hazardRegisters.Where(x => x.RegisterTypesId == item.RegisterTypesId);
|
||||||
|
// rowTime["总数量"] = typeHazad.Count();
|
||||||
|
// rowTime["待整改"] = typeHazad.Where(x => x.States == "1" || x.States == null).Count();
|
||||||
|
// rowTime["已整改"] = typeHazad.Where(x => x.States == "3" || x.States == "2").Count();
|
||||||
|
// dtTime.Rows.Add(rowTime);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "巡检问题分析", this.drpChartType.SelectedValue, 1100, 330, this.ckbShow.Checked));
|
||||||
|
//}
|
||||||
|
//else //饼形图
|
||||||
|
//{
|
||||||
|
// ///按问题类型
|
||||||
|
// DataTable dtTime = new DataTable();
|
||||||
|
// dtTime.Columns.Add("检查项", typeof(string));
|
||||||
|
// dtTime.Columns.Add("总数量", typeof(string));
|
||||||
|
|
||||||
|
// var types = from x in Funs.DB.HSSE_Hazard_HazardRegisterTypes where x.HazardRegisterType == "1" orderby x.TypeCode select x;
|
||||||
|
// foreach (var item in types)
|
||||||
|
// {
|
||||||
|
// DataRow rowTime = dtTime.NewRow();
|
||||||
|
// Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
|
||||||
|
// rowTime["检查项"] = item.RegisterTypesName;
|
||||||
|
// var typeHazad = hazardRegisters.Where(x => x.RegisterTypesId == item.RegisterTypesId);
|
||||||
|
// rowTime["总数量"] = typeHazad.Count();
|
||||||
|
// dtTime.Rows.Add(rowTime);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "巡检问题分析", this.drpChartType.SelectedValue, 1100, 330, this.ckbShow.Checked));
|
||||||
|
//}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue