提交代码
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
<div class="y_aq y_row">
|
||||
<div class="y_aq_box y_image_default y_row">
|
||||
<div class="y_aq_label js-hover" data-type="QualityProblem">安全管理人员</div>
|
||||
<div class="y_aq_label js-hover" data-type="SafePerson">安全管理人员</div>
|
||||
<div class="y_aq_value" id="divSafeManagePersonNum" runat="server">0</div>
|
||||
</div>
|
||||
<div class="y_aq_box y_image_default y_row js-hover" data-type="AccidentEventData">
|
||||
@@ -63,8 +63,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="y_zg">
|
||||
<div class="y_zg_title">整改数据</div>
|
||||
<div class="y_zg_main y_row">
|
||||
<div class="y_zg_title js-hover" data-type="HiddenRectification">整改数据</div>
|
||||
<div class="y_zg_main y_row js-hover" data-type="HiddenRectification">
|
||||
<div class="y_zg_box">
|
||||
<div class="y_zg_value" style="background-color: #00b8de54;color: #00b8de;" runat="server" id="div_zgsj">154564
|
||||
</div>
|
||||
@@ -161,23 +161,23 @@
|
||||
</div>
|
||||
<div class="site y_column">
|
||||
<!-- 人员信息 -->
|
||||
<div class="y_box js-hover" data-type="ProjectPersonData">
|
||||
<div class="y_box js-hover" >
|
||||
<div class="y_box_label y_image_default">人员信息 </div>
|
||||
<div class="y_rys y_row">
|
||||
<div class="y_ry y_row y_image_default">
|
||||
<div class="y_ry y_row y_image_default js-hover" data-type="Person1">
|
||||
<div class="y_ry_label">当前现场人数</div>
|
||||
<div class="y_ry_value" id="div_xcrs" runat="server">0</div>
|
||||
</div>
|
||||
<div class="y_ry y_row y_image_default">
|
||||
<div class="y_ry y_row y_image_default js-hover" data-type="Person2">
|
||||
<div class="y_ry_label">作业人员总数</div>
|
||||
<div class="y_ry_value" style="color: #00FFFF;" id="div_zyxcrs" runat="server">0</div>
|
||||
</div>
|
||||
<div class="y_ry y_row y_image_default">
|
||||
<div class="y_ry y_row y_image_default js-hover" data-type="Person3">
|
||||
<div class="y_ry_label">管理人员总数</div>
|
||||
<div class="y_ry_value" style="color: #63CAFF;" id="div_glxcrs" runat="server">0</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="y_rymap" id="rymap"></div>
|
||||
</div>
|
||||
<div class="y_box">
|
||||
@@ -394,6 +394,8 @@
|
||||
$('iframe').attr('src', '../DataShow/HiddenRectification.aspx') //隐患排查-一般隐患
|
||||
window.open("../DataShow/HiddenRectification.aspx")
|
||||
|
||||
}else if (type == 'HiddenRectification') {
|
||||
window.open("../DataShow/HiddenRectification.aspx") //整改数据
|
||||
}
|
||||
else if (type == 'yhpc' && tabType == "zd") {
|
||||
$('iframe').attr('src', '../DataShow/HiddenRectification.aspx')//隐患排查-重大隐患
|
||||
@@ -407,6 +409,22 @@
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/QualityProblem.aspx') //质量共检数据
|
||||
window.open("../DataShow/InspectionManagement.aspx")
|
||||
|
||||
}else if (type == 'SafePerson') {
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/QualityProblem.aspx') //安全管理人员数据
|
||||
window.open("../DataShow/SafePerson.aspx")
|
||||
|
||||
}else if (type == 'Person1') {
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/QualityProblem.aspx') //当前现场人员数据
|
||||
window.open("../DataShow/Person1.aspx")
|
||||
|
||||
}else if (type == 'Person2') {
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/QualityProblem.aspx') //作业人员总数数据
|
||||
window.open("../DataShow/Person2.aspx")
|
||||
|
||||
}else if (type == 'Person3') {
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/QualityProblem.aspx') //管理人员总数数据
|
||||
window.open("../DataShow/Person3.aspx")
|
||||
|
||||
}else if (type == 'WeldOneOK') {
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/QualityProblem.aspx') //焊接一次合格数据
|
||||
window.open("../DataShow/WeldOneOK.aspx")
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace FineUIPro.Web.common
|
||||
|
||||
//安全管理人员
|
||||
var allSum = from x in Funs.DB.SitePerson_Person
|
||||
where x.IsUsed == true
|
||||
where x.IsUsed == true && x.InTime < DateTime.Now && (x.OutTime == null || x.OutTime > DateTime.Now)
|
||||
select x;
|
||||
var glAllPerson = from x in allSum
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
</div>
|
||||
|
||||
<div class="y_rs_row y_row" style="margin-top: .125rem;">
|
||||
<div class="y_rs_item y_column js-hover" style="width: 100%;">
|
||||
<div class="y_rs_item y_column js-hover js-hover" style="width: 100%;" data-type="ProjectNum">
|
||||
<div class="y_rs_item_label">项目人数</div>
|
||||
<div class="y_rs_item_value img2 y_row">
|
||||
<div class="y_rs_box y_column">
|
||||
@@ -150,7 +150,7 @@
|
||||
<div class="y_top_box_value" style="color: #00FFFF;" runat="server" id="div_safeworktime">0</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="y_video">
|
||||
<div class="y_video js-hover" data-type="Video">
|
||||
<div class="video" style="padding-right: .125rem;padding-bottom: .125rem;">
|
||||
<div class="videos">
|
||||
<div class="video_title">安全云监控</div>
|
||||
@@ -217,7 +217,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="y_box " style="width: 6rem;height: 5.0875rem;">
|
||||
<div class="y_box js-hover" data-type="yhpc" style="width: 6rem;height: 5.0875rem;">
|
||||
<div class="y_box_label y_image_default tab-wrap">隐患排查治理数据
|
||||
<div class="y_tabs y_row">
|
||||
<span class="y_image_default y_tab-action active" data-type="yb" style="cursor:pointer" onclick="yjClick(0)" id="ybyh_span">一般隐患</span>
|
||||
@@ -225,7 +225,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="y_box_main">
|
||||
<div class="pc_box y_row js-hover" data-type="yhpc" data-tabType="yhpc" style="padding-top: .25rem;">
|
||||
<div class="pc_box y_row " style="padding-top: .25rem;">
|
||||
<div class="pc-item">
|
||||
<div class="pc-item-card y_column y_image_default">
|
||||
<div class="pc-item-card_label">整改闭环项</div>
|
||||
@@ -253,7 +253,7 @@
|
||||
<div class="card1-body" id="jcsjmap"></div>
|
||||
</div>
|
||||
<div class="card1 js-hover" data-type="AccidentEventData">
|
||||
<div class="card1_title y_image_default js-hover" data-type="AccidentEventData">事故事件数据
|
||||
<div class="card1_title y_image_default">事故事件数据
|
||||
<%-- <div class="y_tabs y_row">
|
||||
<span class="y_image_default y_tab-action">企业级</span>
|
||||
<span class="y_image_default">项目级</span>
|
||||
@@ -273,9 +273,9 @@
|
||||
<div class="sjmap" id="sjmap"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card1 ">
|
||||
<div class="card1 js-hover" data-type="yjglsj">
|
||||
<div class="card1_title y_image_default">应急管理数据</div>
|
||||
<div class="card1-body yj-body y_image_default js-hover" data-type="yjglsj" >
|
||||
<div class="card1-body yj-body y_image_default">
|
||||
<div class="y_column">
|
||||
<div class="yj-number"><%=GetCompanyComprehensivePlanNum() %></div>
|
||||
<div class="yj-label">综合预案</div>
|
||||
@@ -294,9 +294,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card1 ">
|
||||
<div class="card1 js-hover" data-type="SafeTrainData">
|
||||
<div class="card1_title y_image_default">安全教育培训人次数数据</div>
|
||||
<div class="card1-body y_column aqjy js-hover" data-type="SafeTrainData">
|
||||
<div class="card1-body y_column aqjy " >
|
||||
<div class="y_column">
|
||||
<div class="aqjy-label">三级安全教育培训</div>
|
||||
<div class="aqjy-value"><%=GetSafeTrainNum() %></div>
|
||||
@@ -311,11 +311,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card1 ">
|
||||
<div class="card1_title y_image_default">安全数据分析</div>
|
||||
<div class="card1 js-hover" data-type="SafeRiskData">
|
||||
<div class="card1_title y_image_default">风险数据分析</div>
|
||||
<div class="card1-body" id="sjfxmap"></div>
|
||||
</div>
|
||||
<div class="card1 ">
|
||||
<div class="card1 js-hover" data-type="wdgcsj">
|
||||
<div class="card1_title y_image_default">应急管理数据
|
||||
<div class="y_tabs y_row ">
|
||||
<span class="y_image_default y_tab-action" id="span_wdgc" onclick="yjglOnclick(0)" style="cursor:pointer" >危大工程</span>
|
||||
@@ -323,7 +323,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card1-body" style=" padding: .25rem .125rem;">
|
||||
<div class="yj-box y_image_default js-hover" data-type="wdgcsj" >
|
||||
<div class="yj-box y_image_default " >
|
||||
<div style="padding: .1875rem 0 0 .1875rem;">
|
||||
<div class="yj-box_label">审批完成</div>
|
||||
<div class="yj-box_number" id="div_spwc"><%=GetCompletedNum() %></div>
|
||||
@@ -450,6 +450,11 @@
|
||||
window.open("../DataShow/ConstructionEquipment.aspx")
|
||||
|
||||
|
||||
} else if (type == 'Video') {
|
||||
var videoURL ='<%=VideoURL %>'
|
||||
window.open(videoURL + "#/screen", '_blank'); //视频监控
|
||||
|
||||
|
||||
}
|
||||
else if (type == 'HighRiskWorkPermit') {
|
||||
$('iframe').attr('src', '../DataShow/License.aspx') //高风险作业许可
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
@@ -21,8 +22,68 @@ namespace FineUIPro.Web.common
|
||||
if (!IsPostBack)
|
||||
{
|
||||
//安监人员数据
|
||||
getPersonNum();
|
||||
//企业总部总监人数
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var unitId = string.Empty;
|
||||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
if (thisUnit != null) unitId = thisUnit.UnitId;
|
||||
div_qyzbzjrs.InnerHtml = (from x in db.Person_CompanyBranchPerson
|
||||
where x.IsOnJob == true && x.WorkPostId == Const.WorkPost_HSSEDirector && x.UnitId == unitId
|
||||
select x).Count().ToString();
|
||||
div_qyzbrs1.InnerHtml = (from x in db.SitePerson_Person
|
||||
where x.IsUsed == true && x.WorkPostId == Const.WorkPost_HSSEDirector
|
||||
select x).Count().ToString();
|
||||
//企业总部专职人数
|
||||
div_qyzbzzrs.InnerHtml = (from x in db.Person_CompanyBranchPerson
|
||||
join y in db.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where x.IsOnJob == true && y.IsHsse == true && x.UnitId == unitId
|
||||
select x).Count().ToString();
|
||||
div_qyzbzzrs1.InnerHtml = (from x in db.SitePerson_Person
|
||||
join y in db.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where x.IsUsed == true && y.IsHsse == true
|
||||
select x).Count().ToString();
|
||||
//分支机构总监人数
|
||||
div_fzjgzjrs.InnerHtml = (from x in db.Person_CompanyBranchPerson
|
||||
where x.IsOnJob == true && x.WorkPostId == Const.WorkPost_HSSEDirector && x.UnitId != unitId
|
||||
select x).Count().ToString();
|
||||
//分支机构专职人数
|
||||
div_fzjgzzrs.InnerHtml = (from x in db.Person_CompanyBranchPerson
|
||||
join y in db.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where x.IsOnJob == true && y.IsHsse == true && x.UnitId != unitId
|
||||
select x).Count().ToString();
|
||||
//企业总部参建人数
|
||||
div_qyzbcjrs.InnerHtml = (from x in db.SitePerson_Person where x.IsUsed == true select x).Count().ToString();
|
||||
|
||||
//项目总监
|
||||
div_xmrs.InnerHtml = (from x in db.SitePerson_Person
|
||||
where x.WorkPostId == Const.WorkPost_HSSEDirector && x.IsUsed == true
|
||||
select x).Count().ToString();
|
||||
//项目专职
|
||||
div_xmzzrs.InnerHtml = (from x in db.SitePerson_Person
|
||||
join y in db.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where y.IsHsse == true && x.IsUsed == true
|
||||
select x).Count().ToString();
|
||||
//项目参建
|
||||
div_xmcjrs.InnerHtml = (from x in db.SitePerson_Person
|
||||
where x.IsUsed == true
|
||||
select x).Count().ToString();
|
||||
|
||||
//注安师
|
||||
var ZasSql = @"SELECT Person.ProjectId,Project.ProjectCode,Project.ProjectName,Unit.UnitId,Unit.UnitId,Unit.UnitName,
|
||||
Person.PersonName,Person.PersonId,Person.IdentityCard,Person.Sex,Person.WorkPostId,WorkPost.WorkPostName,Person.Telephone
|
||||
,(CASE WHEN Sex=2 THEN '女' WHEN Sex=1 THEN '男' ELSE '' END) AS SexStr
|
||||
FROM SitePerson_Person AS Person
|
||||
LEFT JOIN Base_Project AS Project ON Person.ProjectId =Project.ProjectId
|
||||
LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId
|
||||
WHERE IsUsed=1 AND InTime <=GETDATE() AND (OutTime IS NULL OR OutTime > GETDATE())
|
||||
AND (SELECT COUNT(*) FROM QualityAudit_PersonQuality AS Q LEFT JOIN Base_Certificate AS Cer ON Q.CertificateId
|
||||
=Cer.CertificateId WHERE Q.PersonId = Person.PersonId AND IsRegisterHSSE =1) > 0";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(ZasSql, parameter);
|
||||
|
||||
div_zasrs.InnerHtml = tb.Rows.Count.ToString();
|
||||
//项目信息
|
||||
getProjectInfo();
|
||||
|
||||
@@ -34,65 +95,25 @@ namespace FineUIPro.Web.common
|
||||
}
|
||||
}
|
||||
|
||||
#region 加载人数
|
||||
protected void getPersonNum()
|
||||
protected string VideoURL
|
||||
{
|
||||
//企业总部总监人数
|
||||
div_qyzbzjrs.InnerHtml = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralNum().ToString();
|
||||
div_qyzbrs1.InnerHtml = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralNum().ToString();
|
||||
//企业总部专职人数
|
||||
div_qyzbzzrs.InnerHtml = HSSEData_HSSEService.GetHeadOfficeFullTimeNum().ToString();
|
||||
div_qyzbzzrs1.InnerHtml = HSSEData_HSSEService.GetHeadOfficeFullTimeNum().ToString();
|
||||
//分支机构总监人数
|
||||
div_fzjgzjrs.InnerHtml = HSSEData_HSSEService.GetBranchInspectorGeneralNum().ToString();
|
||||
//分支机构专职人数
|
||||
div_fzjgzzrs.InnerHtml = HSSEData_HSSEService.GetBranchFullTimeNum().ToString();
|
||||
//企业总部参建人数
|
||||
div_qyzbcjrs.InnerHtml = (from x in Funs.DB.SitePerson_Person where x.IsUsed == true select x).Count().ToString();
|
||||
|
||||
//项目总监
|
||||
div_xmrs.InnerHtml = (from x in Funs.DB.SitePerson_Person
|
||||
where x.WorkPostId == Const.WorkPost_ProjectHSSEDirector && x.IsUsed == true
|
||||
select x).Count().ToString();
|
||||
//项目专职
|
||||
div_xmzzrs.InnerHtml = (from x in Funs.DB.SitePerson_Person
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where y.IsHsse == true && x.IsUsed == true
|
||||
select x).Count().ToString();
|
||||
//项目参建
|
||||
div_xmcjrs.InnerHtml = (from x in Funs.DB.SitePerson_Person
|
||||
where x.IsUsed == true
|
||||
select x).Count().ToString();
|
||||
|
||||
//注安师
|
||||
var ZasSql = @"SELECT Person.ProjectId,Project.ProjectCode,Project.ProjectName,Unit.UnitId,Unit.UnitId,Unit.UnitName,
|
||||
Person.PersonName,Person.PersonId,Person.IdentityCard,Person.Sex,Person.WorkPostId,WorkPost.WorkPostName,Person.Telephone
|
||||
,(CASE WHEN Sex=2 THEN '女' WHEN Sex=1 THEN '男' ELSE '' END) AS SexStr
|
||||
FROM SitePerson_Person AS Person
|
||||
LEFT JOIN Base_Project AS Project ON Person.ProjectId =Project.ProjectId
|
||||
LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId
|
||||
WHERE IsUsed=1 AND InTime <=GETDATE() AND (OutTime IS NULL OR OutTime > GETDATE())
|
||||
AND (SELECT COUNT(*) FROM QualityAudit_PersonQuality AS Q LEFT JOIN Base_Certificate AS Cer ON Q.CertificateId
|
||||
=Cer.CertificateId WHERE Q.PersonId = Person.PersonId AND IsRegisterHSSE =1) > 0";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(ZasSql, parameter);
|
||||
|
||||
div_zasrs.InnerHtml = tb.Rows.Count.ToString();
|
||||
get
|
||||
{
|
||||
return ConfigurationManager.AppSettings["Video_URL"] + "#/screen";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载项目信息
|
||||
protected void getProjectInfo()
|
||||
{
|
||||
var list = Funs.DB.Base_Project;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var list = db.Base_Project;
|
||||
//在建项目
|
||||
div_zjxm.InnerHtml = list.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).Count().ToString();
|
||||
//停工项目
|
||||
div_tgxm.InnerHtml = list.Where(x => (x.ProjectState == Const.ProjectState_2 || x.ProjectState == null)).Count().ToString();
|
||||
//在施危大工程
|
||||
div_wdxm.InnerHtml = Funs.DB.Solution_LargerHazard.Where(x => x.States == Const.State_2).Count().ToString();
|
||||
div_wdxm.InnerHtml = db.Solution_LargerHazard.Where(x => x.States == Const.State_2).Count().ToString();
|
||||
//安全工时数
|
||||
//int wHours = Funs.DB.SitePerson_PersonInOutNumber.Max(x => x.WorkHours) ?? 0;
|
||||
this.div_safeworktime.InnerHtml = Count3().ToString().Split('.')[0];
|
||||
@@ -106,37 +127,38 @@ namespace FineUIPro.Web.common
|
||||
/// <returns></returns>
|
||||
protected decimal Count3()
|
||||
{
|
||||
decimal cout1 = 0;
|
||||
var getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
|
||||
select x;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
decimal cout1 = 0;
|
||||
var getAllPersonInOutList = from x in db.SitePerson_PersonInOutNumber
|
||||
select x;
|
||||
if (getAllPersonInOutList.Count() > 0)
|
||||
{
|
||||
if (getAllPersonInOutList.Count() > 0)
|
||||
{
|
||||
if (getAllPersonInOutList.Count() > 0)
|
||||
{
|
||||
cout1 = getAllPersonInOutList.Sum(x => (long)x.WorkHours);
|
||||
}
|
||||
cout1 = getAllPersonInOutList.Sum(x => (long)x.WorkHours);
|
||||
}
|
||||
}
|
||||
|
||||
var getD1 = from x in Funs.DB.Accident_AccidentHandle
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
var getD2 = from x in Funs.DB.Accident_AccidentReport
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
|
||||
|
||||
var getD1 = from x in db.Accident_AccidentHandle
|
||||
join y in db.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
var getD2 = from x in db.Accident_AccidentReport
|
||||
join y in db.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
|
||||
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
cout1 = cout1 - getD1.Sum(x => x.WorkHoursLoss ?? 0);
|
||||
}
|
||||
if (getD2.Count() > 0)
|
||||
{
|
||||
cout1 = cout1 - getD2.Sum(x => x.WorkingHoursLoss ?? 0);
|
||||
}
|
||||
|
||||
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
cout1 = cout1 - getD1.Sum(x => x.WorkHoursLoss ?? 0);
|
||||
}
|
||||
if (getD2.Count() > 0)
|
||||
{
|
||||
cout1 = cout1 - getD2.Sum(x => x.WorkingHoursLoss ?? 0);
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
@@ -155,7 +177,9 @@ namespace FineUIPro.Web.common
|
||||
/// <param name="type"></param>
|
||||
protected void getProjectYh()
|
||||
{
|
||||
var list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList();
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var list = db.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList();
|
||||
var hazardRegisters = from x in db.HSSE_Hazard_HazardRegister select x;
|
||||
if (list.Count > 0)
|
||||
{
|
||||
foreach (var item in list)
|
||||
@@ -164,17 +188,34 @@ namespace FineUIPro.Web.common
|
||||
|
||||
//一般
|
||||
allYhYb += "'" +
|
||||
(Project_HSSEData_HSSEService.GetGeneralClosedNum(item.ProjectId) +
|
||||
Project_HSSEData_HSSEService.GetGeneralNotClosedNum(item.ProjectId)) +
|
||||
"',";
|
||||
dzgYhYb += "'" + Project_HSSEData_HSSEService.GetGeneralNotClosedNum(item.ProjectId) + "',";
|
||||
((from x in hazardRegisters
|
||||
where x.ProjectId == item.ProjectId && x.Risk_Level == "一般" && x.States == "3" &&
|
||||
x.CheckTime > Const.DtmarkTime
|
||||
select x).Count() +
|
||||
(from x in hazardRegisters
|
||||
where x.ProjectId == item.ProjectId && x.Risk_Level == "一般" && x.States != "3" &&
|
||||
x.CheckTime > Const.DtmarkTime
|
||||
select x).Count()) + "',";
|
||||
dzgYhYb += "'" + (from x in hazardRegisters
|
||||
where x.ProjectId == item.ProjectId && x.Risk_Level == "一般" && x.States != "3" &&
|
||||
x.CheckTime > Const.DtmarkTime
|
||||
select x).Count() + "',";
|
||||
|
||||
//重大
|
||||
allYhZd += "'" +
|
||||
(Project_HSSEData_HSSEService.GetMajorClosedNum(item.ProjectId) +
|
||||
Project_HSSEData_HSSEService.GetMajorNotClosedNum(item.ProjectId)) +
|
||||
((from x in hazardRegisters
|
||||
where x.ProjectId == item.ProjectId && x.Risk_Level == "重大" && x.States == "3" &&
|
||||
x.CheckTime > Const.DtmarkTime
|
||||
select x).Count() +
|
||||
(from x in hazardRegisters
|
||||
where x.ProjectId == item.ProjectId && x.Risk_Level == "重大" && x.States != "3" &&
|
||||
x.CheckTime > Const.DtmarkTime
|
||||
select x).Count()) +
|
||||
"',";
|
||||
dzgYhZd += "'" + Project_HSSEData_HSSEService.GetMajorNotClosedNum(item.ProjectId) + "',";
|
||||
dzgYhZd += "'" + (from x in hazardRegisters
|
||||
where x.ProjectId == item.ProjectId && x.Risk_Level == "重大" && x.States != "3" &&
|
||||
x.CheckTime > Const.DtmarkTime
|
||||
select x).Count() + "',";
|
||||
|
||||
}
|
||||
yhXmmc = yhXmmc.TrimEnd(',');
|
||||
@@ -194,7 +235,7 @@ namespace FineUIPro.Web.common
|
||||
//企业专题
|
||||
div_qyzt.InnerHtml = HSSEData_HSSEService.GetEnterpriseTopicsMeetingNum().ToString();
|
||||
//项目安全领导小组
|
||||
div_xmaqldxz.InnerHtml = Funs.DB.Meeting_SafetyLeaderGroupMeeting.Where(x=> x.CompileDate > Const.DtmarkTime).Count().ToString();
|
||||
div_xmaqldxz.InnerHtml = Funs.DB.Meeting_SafetyLeaderGroupMeeting.Where(x => x.CompileDate > Const.DtmarkTime).Count().ToString();
|
||||
//项目安全例会
|
||||
DateTime date = DateTime.Now;
|
||||
div_xmalh.InnerHtml = ((from x in Funs.DB.Meeting_WeekMeeting where x.WeekMeetingDate.Value.Year == date.Year && x.WeekMeetingDate.Value.Month == date.Month && x.WeekMeetingDate.Value.Day == date.Day select x).Count()
|
||||
@@ -362,7 +403,7 @@ namespace FineUIPro.Web.common
|
||||
return HSSEData_HSSEService.GetCompanyLeadShiftCheckNum();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取企业综合检查次数
|
||||
@@ -583,7 +624,7 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
var result = (from x in Funs.DB.EduTrain_TrainRecord
|
||||
join y in Funs.DB.Base_TrainType on x.TrainTypeId equals y.TrainTypeId
|
||||
where y.TrainType == "3" && x.TrainStartDate > Const.DtmarkTime
|
||||
where y.TrainType == "3" && x.TrainStartDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -598,7 +639,7 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
var result = (from x in Funs.DB.Hazard_HazardSelectedItem
|
||||
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
|
||||
where y.RiskLevel == 2 && (x.IsStart == true || x.State == "1")
|
||||
where y.RiskLevel == 2 && (x.IsStart == true || x.State == "1")
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -611,7 +652,7 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
var result = (from x in Funs.DB.Hazard_HazardSelectedItem
|
||||
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
|
||||
where y.RiskLevel == 1 && (x.IsStart == true || x.State == "1")
|
||||
where y.RiskLevel == 1 && (x.IsStart == true || x.State == "1")
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -651,7 +692,7 @@ namespace FineUIPro.Web.common
|
||||
public static int GetCompletedNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.Solution_LargerHazard
|
||||
where x.States != "0" && x.IsSuperLargerHazard == false &&
|
||||
where x.States != "0" && x.IsSuperLargerHazard == false &&
|
||||
x.RecordTime > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user