首页数据只显示本年份修改
This commit is contained in:
parent
e8877811ef
commit
f590c95d94
|
@ -35,7 +35,9 @@
|
||||||
<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="2" Text="检查人" />
|
||||||
<f:RadioItem Value="1" Text="按检查项" />
|
<f:RadioItem Value="1" Text="按检查项" />
|
||||||
|
|
||||||
</f:RadioButtonList>
|
</f:RadioButtonList>
|
||||||
<f:Button ID="BtnAnalyse" Text="统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click">
|
<f:Button ID="BtnAnalyse" Text="统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
@ -115,22 +117,22 @@
|
||||||
series: series
|
series: series
|
||||||
};
|
};
|
||||||
|
|
||||||
if (xAxis.length > 5) {
|
//if (xAxis.length > 5) {
|
||||||
option.dataZoom = [{
|
// option.dataZoom = [{
|
||||||
type: 'slider',
|
// type: 'slider',
|
||||||
show: true,
|
// show: true,
|
||||||
startValue: 0,
|
// startValue: 0,
|
||||||
endValue: 4,
|
// endValue: 4,
|
||||||
height: '10',
|
// height: '10',
|
||||||
backgroundColor: '#aed0ea',
|
// backgroundColor: '#aed0ea',
|
||||||
fillerColor: '#107f8b',
|
// fillerColor: '#107f8b',
|
||||||
bottom: '10%',
|
// bottom: '10%',
|
||||||
zoomLock: true,
|
// zoomLock: true,
|
||||||
moveOnMouseWheel: true,
|
// moveOnMouseWheel: true,
|
||||||
brushSelect: true,
|
// brushSelect: true,
|
||||||
showDetail: false,
|
// showDetail: false,
|
||||||
}]
|
// }]
|
||||||
}
|
//}
|
||||||
|
|
||||||
var myChart = echarts.init(document.getElementById("divAccidentTime"));
|
var myChart = echarts.init(document.getElementById("divAccidentTime"));
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
|
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
|
||||||
{
|
{
|
||||||
strSql += " and CheckTime <'" + DateTime.Parse( this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
|
strSql += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drpUnit.SelectedValue != BLL.Const._Null)
|
if (drpUnit.SelectedValue != BLL.Const._Null)
|
||||||
|
@ -156,56 +156,205 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||||
},
|
},
|
||||||
data: " + series3 + @"
|
data: " + series3 + @"
|
||||||
}]";
|
}]";
|
||||||
|
|
||||||
|
|
||||||
string strSql1 = @" select r.RegisterTypesId,t.RegisterTypesName,
|
|
||||||
|
string strSql1 = @" select r.RegisterTypesId,t.RegisterTypesName,
|
||||||
count(*) as allnum,
|
count(*) as allnum,
|
||||||
Sum(case when States= 1 or States is null then 1 else 0 end) as todo,
|
Sum(case when States= 1 or States is null then 1 else 0 end) as todo,
|
||||||
Sum(case when States= 3 or States =2 then 1 else 0 end) as finish
|
Sum(case when States= 3 or States =2 then 1 else 0 end) as finish
|
||||||
from HSSE_Hazard_HazardRegister r left join HSSE_Hazard_HazardRegisterTypes t on r.RegisterTypesId=t.RegisterTypesId
|
from HSSE_Hazard_HazardRegister r left join HSSE_Hazard_HazardRegisterTypes t on r.RegisterTypesId=t.RegisterTypesId
|
||||||
where ProjectId=@ProjectId and States != '4' and ProblemTypes = '1'
|
where ProjectId=@ProjectId and States != '4' and ProblemTypes = '1'
|
||||||
";
|
";
|
||||||
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
|
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
|
||||||
{
|
{
|
||||||
strSql1 += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
|
strSql1 += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
|
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
|
||||||
{
|
{
|
||||||
strSql1 += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
|
strSql1 += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drpUnit.SelectedValue != BLL.Const._Null)
|
if (drpUnit.SelectedValue != BLL.Const._Null)
|
||||||
{
|
{
|
||||||
strSql1 += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
|
strSql1 += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
|
||||||
}
|
}
|
||||||
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
|
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
|
||||||
{
|
{
|
||||||
strSql1 += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
|
strSql1 += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
|
||||||
}
|
}
|
||||||
strSql1 += " group by r.RegisterTypesId,t.RegisterTypesName ";
|
strSql1 += " group by r.RegisterTypesId,t.RegisterTypesName ";
|
||||||
List<SqlParameter> listStr1 = new List<SqlParameter>();
|
List<SqlParameter> listStr1 = new List<SqlParameter>();
|
||||||
listStr1.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
listStr1.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||||
|
|
||||||
SqlParameter[] parameter1 = listStr1.ToArray();
|
SqlParameter[] parameter1 = listStr1.ToArray();
|
||||||
DataTable tb1 = SQLHelper.GetDataTableRunText(strSql1, parameter1);
|
DataTable tb1 = SQLHelper.GetDataTableRunText(strSql1, parameter1);
|
||||||
if (tb1 != null)
|
if (tb1 != null)
|
||||||
{
|
{
|
||||||
xPieAxis = "[";
|
xPieAxis = "[";
|
||||||
seriesPie = "[";
|
seriesPie = "[";
|
||||||
|
|
||||||
foreach (DataRow dr in tb1.Rows)
|
|
||||||
{
|
|
||||||
xPieAxis += " '" + dr["RegisterTypesName"].ToString() + "' ,";
|
|
||||||
seriesPie += " { name:'" + dr["RegisterTypesName"].ToString() + "', value:" + dr["allnum"].ToString() + "} ,";
|
|
||||||
|
|
||||||
}
|
foreach (DataRow dr in tb1.Rows)
|
||||||
xPieAxis=xPieAxis.TrimEnd(',');
|
{
|
||||||
seriesPie=seriesPie.TrimEnd(',');
|
xPieAxis += " '" + dr["RegisterTypesName"].ToString() + "' ,";
|
||||||
xPieAxis += "]";
|
seriesPie += " { name:'" + dr["RegisterTypesName"].ToString() + "', value:" + dr["allnum"].ToString() + "} ,";
|
||||||
seriesPie += "]";
|
|
||||||
}
|
}
|
||||||
}
|
xPieAxis = xPieAxis.TrimEnd(',');
|
||||||
else
|
seriesPie = seriesPie.TrimEnd(',');
|
||||||
|
xPieAxis += "]";
|
||||||
|
seriesPie += "]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.rblState.SelectedValue == "2")
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
string strSql = @" select a.CheckManId,b.UserName,
|
||||||
|
count(*) as allnum,
|
||||||
|
Sum(case when States= 1 or States is null then 1 else 0 end) as todo,
|
||||||
|
Sum(case when States= 3 or States =2 then 1 else 0 end) as finish
|
||||||
|
from HSSE_Hazard_HazardRegister a left join Sys_User b on a.CheckManId = b.UserId
|
||||||
|
where a.ProjectId=@ProjectId and States != '4' and ProblemTypes = '1'
|
||||||
|
";
|
||||||
|
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
|
||||||
|
{
|
||||||
|
strSql += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
|
||||||
|
{
|
||||||
|
strSql += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (drpUnit.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
strSql += " and a.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
|
||||||
|
}
|
||||||
|
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
strSql += " and a.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
|
||||||
|
}
|
||||||
|
strSql += " group by a.CheckManId,b.UserName ";
|
||||||
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
|
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||||
|
|
||||||
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
|
legend = "[\"全部\", \"待整改\", \"已整改\"]";
|
||||||
|
xAxis = "[";
|
||||||
|
|
||||||
|
string series1 = "[";
|
||||||
|
string series2 = "[";
|
||||||
|
string series3 = "[";
|
||||||
|
foreach (DataRow dr in tb.Rows)
|
||||||
|
{
|
||||||
|
xAxis += "\"" + dr["UserName"].ToString() + "\",";
|
||||||
|
series1 += "" + dr["allnum"].ToString() + ",";
|
||||||
|
series2 += "" + dr["todo"].ToString() + ",";
|
||||||
|
series3 += "" + dr["finish"].ToString() + ",";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
xAxis = xAxis.TrimEnd(',');
|
||||||
|
xAxis += "]";
|
||||||
|
series1 = series1.TrimEnd(',');
|
||||||
|
series1 += "]";
|
||||||
|
series2 = series2.TrimEnd(',');
|
||||||
|
series2 += "]";
|
||||||
|
series3 = series3.TrimEnd(',');
|
||||||
|
series3 += "]";
|
||||||
|
|
||||||
|
series = @"[{
|
||||||
|
name: '全部',
|
||||||
|
type: 'bar',
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top'
|
||||||
|
},
|
||||||
|
barWidth: 20,
|
||||||
|
barGap:'5%',
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
},
|
||||||
|
data: " + series1 + @"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '待整改',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: 20,
|
||||||
|
barGap:'5%',
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top'
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
},
|
||||||
|
data: " + series2 + @"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '已整改',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: 20,
|
||||||
|
barGap:'5%',
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top'
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
},
|
||||||
|
data: " + series3 + @"
|
||||||
|
}]";
|
||||||
|
|
||||||
|
|
||||||
|
string strSql1 = @" select r.RegisterTypesId,t.RegisterTypesName,
|
||||||
|
count(*) as allnum,
|
||||||
|
Sum(case when States= 1 or States is null then 1 else 0 end) as todo,
|
||||||
|
Sum(case when States= 3 or States =2 then 1 else 0 end) as finish
|
||||||
|
from HSSE_Hazard_HazardRegister r left join HSSE_Hazard_HazardRegisterTypes t on r.RegisterTypesId=t.RegisterTypesId
|
||||||
|
where ProjectId=@ProjectId and States != '4' and ProblemTypes = '1'
|
||||||
|
";
|
||||||
|
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
|
||||||
|
{
|
||||||
|
strSql1 += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
|
||||||
|
{
|
||||||
|
strSql1 += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (drpUnit.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
strSql1 += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
|
||||||
|
}
|
||||||
|
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
|
||||||
|
{
|
||||||
|
strSql1 += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
|
||||||
|
}
|
||||||
|
strSql1 += " group by r.RegisterTypesId,t.RegisterTypesName ";
|
||||||
|
List<SqlParameter> listStr1 = new List<SqlParameter>();
|
||||||
|
listStr1.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||||
|
|
||||||
|
SqlParameter[] parameter1 = listStr1.ToArray();
|
||||||
|
DataTable tb1 = SQLHelper.GetDataTableRunText(strSql1, parameter1);
|
||||||
|
if (tb1 != null)
|
||||||
|
{
|
||||||
|
xPieAxis = "[";
|
||||||
|
seriesPie = "[";
|
||||||
|
|
||||||
|
foreach (DataRow dr in tb1.Rows)
|
||||||
|
{
|
||||||
|
xPieAxis += " '" + dr["RegisterTypesName"].ToString() + "' ,";
|
||||||
|
seriesPie += " { name:'" + dr["RegisterTypesName"].ToString() + "', value:" + dr["allnum"].ToString() + "} ,";
|
||||||
|
|
||||||
|
}
|
||||||
|
xPieAxis = xPieAxis.TrimEnd(',');
|
||||||
|
seriesPie = seriesPie.TrimEnd(',');
|
||||||
|
xPieAxis += "]";
|
||||||
|
seriesPie += "]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
string strSql = @" select u.UnitId,u.unitName,r.RegisterTypesId,t.RegisterTypesName,
|
string strSql = @" select u.UnitId,u.unitName,r.RegisterTypesId,t.RegisterTypesName,
|
||||||
count(*) as allnum,
|
count(*) as allnum,
|
||||||
|
@ -254,14 +403,14 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||||
Dictionary<string, string> temp = null;
|
Dictionary<string, string> temp = null;
|
||||||
if (!data.ContainsKey(dr["unitName"].ToString()))
|
if (!data.ContainsKey(dr["unitName"].ToString()))
|
||||||
{
|
{
|
||||||
data.Add(dr["unitName"].ToString(), new Dictionary<string,string>());
|
data.Add(dr["unitName"].ToString(), new Dictionary<string, string>());
|
||||||
}
|
}
|
||||||
temp = data[dr["unitName"].ToString()];
|
temp = data[dr["unitName"].ToString()];
|
||||||
if (!temp.ContainsKey(dr["RegisterTypesName"].ToString()))
|
if (!temp.ContainsKey(dr["RegisterTypesName"].ToString()))
|
||||||
{
|
{
|
||||||
temp.Add(dr["RegisterTypesName"].ToString(),"0");
|
temp.Add(dr["RegisterTypesName"].ToString(), "0");
|
||||||
}
|
}
|
||||||
temp[dr["RegisterTypesName"].ToString()]=dr["allnum"].ToString();
|
temp[dr["RegisterTypesName"].ToString()] = dr["allnum"].ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (string types in xdic)
|
foreach (string types in xdic)
|
||||||
|
@ -295,7 +444,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||||
}
|
}
|
||||||
|
|
||||||
series += @"{
|
series += @"{
|
||||||
name: '"+ unit + @"[全部]',
|
name: '" + unit + @"[全部]',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
stack: '全部',
|
stack: '全部',
|
||||||
barWidth: 10,
|
barWidth: 10,
|
||||||
|
@ -309,11 +458,11 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||||
data: [" + tempseries.TrimEnd(',') + @"]
|
data: [" + tempseries.TrimEnd(',') + @"]
|
||||||
},";
|
},";
|
||||||
}
|
}
|
||||||
data = new Dictionary<string, Dictionary<string, string>>();
|
data = new Dictionary<string, Dictionary<string, string>>();
|
||||||
foreach (DataRow dr in tb.Rows)
|
foreach (DataRow dr in tb.Rows)
|
||||||
{
|
{
|
||||||
xdic.Add(dr["RegisterTypesName"].ToString());
|
xdic.Add(dr["RegisterTypesName"].ToString());
|
||||||
Dictionary<string,string> temp = null;
|
Dictionary<string, string> temp = null;
|
||||||
if (!data.ContainsKey(dr["unitName"].ToString()))
|
if (!data.ContainsKey(dr["unitName"].ToString()))
|
||||||
{
|
{
|
||||||
data.Add(dr["unitName"].ToString(), new Dictionary<string, string>());
|
data.Add(dr["unitName"].ToString(), new Dictionary<string, string>());
|
||||||
|
@ -323,7 +472,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||||
{
|
{
|
||||||
temp.Add(dr["RegisterTypesName"].ToString(), "0");
|
temp.Add(dr["RegisterTypesName"].ToString(), "0");
|
||||||
}
|
}
|
||||||
temp[dr["RegisterTypesName"].ToString()]=dr["todo"].ToString();
|
temp[dr["RegisterTypesName"].ToString()] = dr["todo"].ToString();
|
||||||
}
|
}
|
||||||
foreach (string unit in data.Keys)
|
foreach (string unit in data.Keys)
|
||||||
{
|
{
|
||||||
|
@ -369,7 +518,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||||
{
|
{
|
||||||
temp.Add(dr["RegisterTypesName"].ToString(), "0");
|
temp.Add(dr["RegisterTypesName"].ToString(), "0");
|
||||||
}
|
}
|
||||||
temp[dr["RegisterTypesName"].ToString()]=dr["finish"].ToString();
|
temp[dr["RegisterTypesName"].ToString()] = dr["finish"].ToString();
|
||||||
}
|
}
|
||||||
foreach (string unit in data.Keys)
|
foreach (string unit in data.Keys)
|
||||||
{
|
{
|
||||||
|
@ -407,56 +556,56 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
string strSql1 = @" select r.RegisterTypesId,t.RegisterTypesName,
|
string strSql1 = @" select r.RegisterTypesId,t.RegisterTypesName,
|
||||||
count(*) as allnum,
|
count(*) as allnum,
|
||||||
Sum(case when States= 1 or States is null then 1 else 0 end) as todo,
|
Sum(case when States= 1 or States is null then 1 else 0 end) as todo,
|
||||||
Sum(case when States= 3 or States =2 then 1 else 0 end) as finish
|
Sum(case when States= 3 or States =2 then 1 else 0 end) as finish
|
||||||
from HSSE_Hazard_HazardRegister r left join HSSE_Hazard_HazardRegisterTypes t on r.RegisterTypesId=t.RegisterTypesId
|
from HSSE_Hazard_HazardRegister r left join HSSE_Hazard_HazardRegisterTypes t on r.RegisterTypesId=t.RegisterTypesId
|
||||||
where ProjectId=@ProjectId and States != '4' and ProblemTypes = '1'
|
where ProjectId=@ProjectId and States != '4' and ProblemTypes = '1'
|
||||||
";
|
";
|
||||||
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
|
if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()))
|
||||||
{
|
{
|
||||||
strSql1 += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
|
strSql1 += " and CheckTime >='" + this.txtStartRectificationTime.Text.Trim() + "' ";
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
|
if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim()))
|
||||||
{
|
{
|
||||||
strSql1 += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
|
strSql1 += " and CheckTime <'" + DateTime.Parse(this.txtEndRectificationTime.Text.Trim()).AddDays(1).ToString("yyyy-MM-dd") + "' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drpUnit.SelectedValue != BLL.Const._Null)
|
if (drpUnit.SelectedValue != BLL.Const._Null)
|
||||||
{
|
{
|
||||||
strSql1 += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
|
strSql1 += " and r.ResponsibleUnit='" + drpUnit.SelectedValue + "' ";
|
||||||
}
|
}
|
||||||
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
|
if (drpRegisterTypes.SelectedValue != BLL.Const._Null)
|
||||||
{
|
{
|
||||||
strSql1 += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
|
strSql1 += " and r.RegisterTypesId='" + drpRegisterTypes.SelectedValue + "' ";
|
||||||
}
|
}
|
||||||
strSql1 += " group by r.RegisterTypesId,t.RegisterTypesName ";
|
strSql1 += " group by r.RegisterTypesId,t.RegisterTypesName ";
|
||||||
List<SqlParameter> listStr1 = new List<SqlParameter>();
|
List<SqlParameter> listStr1 = new List<SqlParameter>();
|
||||||
listStr1.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
listStr1.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||||
|
|
||||||
SqlParameter[] parameter1 = listStr1.ToArray();
|
SqlParameter[] parameter1 = listStr1.ToArray();
|
||||||
DataTable tb1 = SQLHelper.GetDataTableRunText(strSql1, parameter1);
|
DataTable tb1 = SQLHelper.GetDataTableRunText(strSql1, parameter1);
|
||||||
if (tb1 != null)
|
if (tb1 != null)
|
||||||
{
|
{
|
||||||
xPieAxis = "[";
|
xPieAxis = "[";
|
||||||
seriesPie = "[";
|
seriesPie = "[";
|
||||||
|
|
||||||
foreach (DataRow dr in tb1.Rows)
|
foreach (DataRow dr in tb1.Rows)
|
||||||
{
|
{
|
||||||
xPieAxis += " '" + dr["RegisterTypesName"].ToString() + "' ,";
|
xPieAxis += " '" + dr["RegisterTypesName"].ToString() + "' ,";
|
||||||
seriesPie += " { name:'" + dr["RegisterTypesName"].ToString() + "', value:" + dr["allnum"].ToString() + "} ,";
|
seriesPie += " { name:'" + dr["RegisterTypesName"].ToString() + "', value:" + dr["allnum"].ToString() + "} ,";
|
||||||
|
|
||||||
}
|
}
|
||||||
xPieAxis = xPieAxis.TrimEnd(',');
|
xPieAxis = xPieAxis.TrimEnd(',');
|
||||||
seriesPie = seriesPie.TrimEnd(',');
|
seriesPie = seriesPie.TrimEnd(',');
|
||||||
xPieAxis += "]";
|
xPieAxis += "]";
|
||||||
seriesPie += "]";
|
seriesPie += "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
// this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "单位巡检分析", this.drpChartType.SelectedValue, 1130, 450, this.ckbShow.Checked));
|
// this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "单位巡检分析", this.drpChartType.SelectedValue, 1130, 450, this.ckbShow.Checked));
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
|
@ -123,8 +123,9 @@ namespace FineUIPro.Web.common
|
||||||
|
|
||||||
var ProjectTotal1 = (from x in Funs.DB.HSSE_MonthReportItem
|
var ProjectTotal1 = (from x in Funs.DB.HSSE_MonthReportItem
|
||||||
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
|
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
|
||||||
where ("成达公司HSE管理人数" == x.ReportItem || "分包商HSE管理人数" == x.ReportItem) && y.Years == DateTime.Now.Year
|
//where ("成达公司HSE管理人数" == x.ReportItem || "分包商HSE管理人数" == x.ReportItem) && y.Years == DateTime.Now.Year
|
||||||
select x.YearTotal).Sum();
|
where ("成达公司现场人数" == x.ReportItem ) && y.Years == DateTime.Now.Year
|
||||||
|
select x.YearTotal).Sum();
|
||||||
|
|
||||||
if (ProjectTotal1.HasValue)
|
if (ProjectTotal1.HasValue)
|
||||||
{
|
{
|
||||||
|
@ -133,14 +134,16 @@ namespace FineUIPro.Web.common
|
||||||
|
|
||||||
var ProjectTotal2 = (from x in Funs.DB.HSSE_MonthReportItem
|
var ProjectTotal2 = (from x in Funs.DB.HSSE_MonthReportItem
|
||||||
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
|
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
|
||||||
where ("成达公司现场人数" == x.ReportItem || "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year
|
//where ("成达公司现场人数" == x.ReportItem || "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year
|
||||||
select x.YearTotal).Sum();
|
where ( "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year
|
||||||
|
select x.YearTotal).Sum();
|
||||||
|
|
||||||
if (ProjectTotal2.HasValue && ProjectTotal1.HasValue)
|
//if (ProjectTotal2.HasValue && ProjectTotal1.HasValue)
|
||||||
{
|
//{
|
||||||
this.divZYPerson.InnerHtml = (ProjectTotal2.Value - ProjectTotal1.Value).ToString();
|
// this.divZYPerson.InnerHtml = (ProjectTotal2.Value - ProjectTotal1.Value).ToString();
|
||||||
}
|
//}
|
||||||
else if (ProjectTotal2.HasValue)
|
//else
|
||||||
|
if (ProjectTotal2.HasValue)
|
||||||
{
|
{
|
||||||
this.divZYPerson.InnerHtml = ProjectTotal2.Value.ToString();
|
this.divZYPerson.InnerHtml = ProjectTotal2.Value.ToString();
|
||||||
}
|
}
|
||||||
|
@ -202,9 +205,9 @@ namespace FineUIPro.Web.common
|
||||||
// this.divRectifyRate.InnerHtml = Math.Round(ccount * 1.0 / allcout * 100, 1).ToString();
|
// this.divRectifyRate.InnerHtml = Math.Round(ccount * 1.0 / allcout * 100, 1).ToString();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
DateTime time = DateTime.Parse(DateTime.Now.ToString("yyyy-01-01"));
|
||||||
var getRectify = from x in Funs.DB.View_Hazard_HazardRegister
|
var getRectify = from x in Funs.DB.View_Hazard_HazardRegister
|
||||||
where x.States != Const.State_0 && x.States != Const.State_R && x.States != null
|
where x.States != Const.State_0 && x.States != Const.State_R && x.States != null && x.RegisterDate>= time
|
||||||
group x by x.States into g
|
group x by x.States into g
|
||||||
select new { g.Key, Count = g.Count() };
|
select new { g.Key, Count = g.Count() };
|
||||||
var allcout = getRectify.ToList();
|
var allcout = getRectify.ToList();
|
||||||
|
@ -269,13 +272,17 @@ namespace FineUIPro.Web.common
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void getCQMSProblem()
|
private void getCQMSProblem()
|
||||||
{
|
{
|
||||||
|
DateTime time = DateTime.Parse(DateTime.Now.ToString("yyyy-01-01"));
|
||||||
///整改率
|
///整改率
|
||||||
CRectificationRate = 0;
|
CRectificationRate = 0;
|
||||||
///合格率
|
///合格率
|
||||||
CQualifiedRate = 0;
|
CQualifiedRate = 0;
|
||||||
var getJointCheckDetail = from x in Funs.DB.Check_JointCheckDetail
|
var getJointCheckDetail = from x in Funs.DB.Check_JointCheckDetail
|
||||||
|
where x.CreateDate >= time
|
||||||
select x;
|
select x;
|
||||||
var getCheckControl = from x in Funs.DB.Check_CheckControl select x;
|
var getCheckControl = from x in Funs.DB.Check_CheckControl
|
||||||
|
where x.CheckDate >= time
|
||||||
|
select x;
|
||||||
///问题总数
|
///问题总数
|
||||||
int AllCount = getJointCheckDetail.Count() + getCheckControl.Count();
|
int AllCount = getJointCheckDetail.Count() + getCheckControl.Count();
|
||||||
this.divCQMSAllNum.InnerHtml = AllCount.ToString();
|
this.divCQMSAllNum.InnerHtml = AllCount.ToString();
|
||||||
|
@ -293,7 +300,7 @@ namespace FineUIPro.Web.common
|
||||||
CRectificationRate = Math.Round(CCount * 1.0 / AllCount * 100, 1);
|
CRectificationRate = Math.Round(CCount * 1.0 / AllCount * 100, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var inspectionManagements = from x in Funs.DB.View_CQMS_InspectionManagementDetail select x;
|
var inspectionManagements = from x in Funs.DB.View_CQMS_InspectionManagementDetail where x.CheckDate>=time select x;
|
||||||
if (inspectionManagements.Count() > 0)
|
if (inspectionManagements.Count() > 0)
|
||||||
{
|
{
|
||||||
int okInspectionManagements = inspectionManagements.Where(x => x.IsOnceQualified == true).Count();
|
int okInspectionManagements = inspectionManagements.Where(x => x.IsOnceQualified == true).Count();
|
||||||
|
|
|
@ -280,7 +280,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="sd-body2-right">
|
<div class="sd-body2-right">
|
||||||
<div class="sd-section">
|
<div class="sd-section">
|
||||||
<div class="sd-section-title ellipsis">劳务数据</div>
|
<div class="sd-section-title ellipsis">劳务数据(累计)</div>
|
||||||
<div class="sd-section-content">
|
<div class="sd-section-content">
|
||||||
<div class="sd-section7-inner">
|
<div class="sd-section7-inner">
|
||||||
<div class="sd-labor-data-list">
|
<div class="sd-labor-data-list">
|
||||||
|
|
|
@ -184,7 +184,8 @@ namespace FineUIPro.Web.common
|
||||||
//}
|
//}
|
||||||
var ProjectTotal1 = (from x in Funs.DB.HSSE_MonthReportItem
|
var ProjectTotal1 = (from x in Funs.DB.HSSE_MonthReportItem
|
||||||
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
|
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
|
||||||
where ("成达公司HSE管理人数" == x.ReportItem || "分包商HSE管理人数" == x.ReportItem) && y.Years == DateTime.Now.Year && y.ProjectId==CurrUser.LoginProjectId
|
// where ("成达公司HSE管理人数" == x.ReportItem || "分包商HSE管理人数" == x.ReportItem) && y.Years == DateTime.Now.Year && y.ProjectId==CurrUser.LoginProjectId
|
||||||
|
where ("成达公司现场人数" == x.ReportItem ) && y.Years == DateTime.Now.Year && y.ProjectId==CurrUser.LoginProjectId
|
||||||
select x.YearTotal).Sum();
|
select x.YearTotal).Sum();
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,24 +195,26 @@ namespace FineUIPro.Web.common
|
||||||
|
|
||||||
var ProjectTotal2 = (from x in Funs.DB.HSSE_MonthReportItem
|
var ProjectTotal2 = (from x in Funs.DB.HSSE_MonthReportItem
|
||||||
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
|
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
|
||||||
where ("成达公司现场人数" == x.ReportItem || "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year && y.ProjectId == CurrUser.LoginProjectId
|
// where ("成达公司现场人数" == x.ReportItem || "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year && y.ProjectId == CurrUser.LoginProjectId
|
||||||
|
where ( "分包商现场人数" == x.ReportItem) && y.Years == DateTime.Now.Year && y.ProjectId == CurrUser.LoginProjectId
|
||||||
select x.YearTotal).Sum();
|
select x.YearTotal).Sum();
|
||||||
|
|
||||||
if (ProjectTotal1.HasValue)
|
if (ProjectTotal1.HasValue)
|
||||||
{
|
{
|
||||||
this.divGLPerson.InnerHtml = ProjectTotal1.Value.ToString();
|
this.divGLPerson.InnerHtml = ProjectTotal1.Value.ToString() + "人月";
|
||||||
}
|
}
|
||||||
if (ProjectTotal2.HasValue)
|
if (ProjectTotal2.HasValue&& ProjectTotal1.HasValue)
|
||||||
{
|
{
|
||||||
this.divALLPerson.InnerHtml = ProjectTotal2.Value.ToString();
|
this.divALLPerson.InnerHtml = (ProjectTotal1.Value + ProjectTotal2.Value).ToString() + "人月";
|
||||||
}
|
}
|
||||||
if (ProjectTotal1.HasValue && ProjectTotal2.HasValue)
|
//if (ProjectTotal1.HasValue && ProjectTotal2.HasValue)
|
||||||
{
|
//{
|
||||||
this.divZYPerson.InnerHtml = (ProjectTotal2.Value - ProjectTotal1.Value).ToString();
|
// this.divZYPerson.InnerHtml = (ProjectTotal2.Value - ProjectTotal1.Value).ToString();
|
||||||
}
|
//}
|
||||||
else if(ProjectTotal2.HasValue)
|
//else
|
||||||
|
if(ProjectTotal2.HasValue)
|
||||||
{
|
{
|
||||||
this.divZYPerson.InnerHtml = ProjectTotal2.Value .ToString();
|
this.divZYPerson.InnerHtml = ProjectTotal2.Value .ToString()+"人月";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@ namespace WebAPI.Common
|
||||||
public static void init(int port)
|
public static void init(int port)
|
||||||
{
|
{
|
||||||
allSockets = new Dictionary<string, IWebSocketConnection>();
|
allSockets = new Dictionary<string, IWebSocketConnection>();
|
||||||
webSocketServer = new WebSocketServer("wss://0.0.0.0:" + port);
|
webSocketServer = new WebSocketServer("wss://127.0.0.1:" + port);
|
||||||
//webSocketServer.Certificate = new X509Certificate2("MyCert.pfx","");
|
webSocketServer.Certificate = new X509Certificate2("D:\\project\\vs\\sggl_cd\\SGGL\\WebAPI\\bin\\wzgl.hfnbd.com.pfx", "1y1fib61");
|
||||||
|
|
||||||
webSocketServer.Start(socket =>
|
webSocketServer.Start(socket =>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue