数据库变更CNPC_XJYJ
This commit is contained in:
@@ -312,7 +312,7 @@ namespace FineUIPro.Web.common
|
||||
List<double> listdata = new List<double>();
|
||||
//List<double> listdata2 = new List<double>();
|
||||
double result = 0;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
foreach (var project in projects)
|
||||
{
|
||||
listCategories.Add(project.ShortName);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
this.divMajorProjectsUnderConstructionNum.InnerHtml = (from x in db.Solution_LargerHazard
|
||||
where x.States == "2" && x.RecordTime > Const.DtmarkTime
|
||||
select x).Count().ToString();
|
||||
@@ -82,7 +82,7 @@ namespace FineUIPro.Web.common
|
||||
/// <summary>
|
||||
/// 项目信息
|
||||
/// </summary>
|
||||
private List<Model.Base_Project> getProjectInfo(Model.SGGLDB db)
|
||||
private List<Model.Base_Project> getProjectInfo(Model.CNPCDB db)
|
||||
{
|
||||
ProjectInfo = "[]";
|
||||
var getProjects = db.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null) && (x.IsDelete == null || x.IsDelete == false));
|
||||
@@ -201,7 +201,7 @@ namespace FineUIPro.Web.common
|
||||
/// <summary>
|
||||
/// 获取安全人工时
|
||||
/// </summary>
|
||||
private void getPersonWorkTime(Model.SGGLDB db)
|
||||
private void getPersonWorkTime(Model.CNPCDB db)
|
||||
{
|
||||
int wHours = 0;
|
||||
var getMax = from x in db.SitePerson_DayReportDetail
|
||||
@@ -221,7 +221,7 @@ namespace FineUIPro.Web.common
|
||||
/// <summary>
|
||||
/// 劳务统计
|
||||
/// </summary>
|
||||
private void getSitePerson(Model.SGGLDB db)
|
||||
private void getSitePerson(Model.CNPCDB db)
|
||||
{
|
||||
int AllCount = 0;
|
||||
int MCount = 0;
|
||||
@@ -261,7 +261,7 @@ namespace FineUIPro.Web.common
|
||||
/// <summary>
|
||||
/// 获取质量问题
|
||||
/// </summary>
|
||||
private void getCQMSProblem(Model.SGGLDB db)
|
||||
private void getCQMSProblem(Model.CNPCDB db)
|
||||
{
|
||||
CQualifiedRate = 0;
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@ namespace FineUIPro.Web.common
|
||||
List<double> listdata = new List<double>();
|
||||
//List<double> listdata2 = new List<double>();
|
||||
double result = 0;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
foreach (var project in projects)
|
||||
{
|
||||
listCategories.Add(project.ProjectCode);
|
||||
|
||||
@@ -596,7 +596,7 @@ namespace FineUIPro.Web.common
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<double> listdata = new List<double>();
|
||||
double result = 0;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
//一次检测合格焊口数
|
||||
int oneCheckJotNum = (from x in db.HJGL_Batch_NDEItem
|
||||
join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
@@ -634,7 +634,7 @@ namespace FineUIPro.Web.common
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<double> listdata = new List<double>();
|
||||
double result = 0;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
//项目焊口数
|
||||
int allJotNum = (from x in db.HJGL_WeldJoint
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace FineUIPro.Web
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
this.divPersonTrainNum.InnerText = (from x in db.Comprehensive_InspectionPerson
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.IsTrain == true
|
||||
select x).Count().ToString();
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace FineUIPro.Web
|
||||
{
|
||||
get
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
@@ -230,7 +230,7 @@ namespace FineUIPro.Web
|
||||
{
|
||||
get
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
@@ -266,7 +266,7 @@ namespace FineUIPro.Web
|
||||
{
|
||||
get
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
|
||||
@@ -0,0 +1,932 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mainMenu_Staff.aspx.cs" Inherits="FineUIPro.Web.mainMenu_Staff" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head id="Head1" runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>首页</title>
|
||||
<link href="../res/index/css/reset.css" rel="stylesheet" />
|
||||
<link href="../res/index/css/home.css" rel="stylesheet" />
|
||||
<link href="../res/index/css/swiper-3.4.2.min.css" rel="stylesheet" />
|
||||
<style type="text/css">
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.flexV {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.wrap {
|
||||
height: 100%;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.bottom-wrap {
|
||||
padding: 0;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.bottom-wrap:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.bw-item-content {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.bw-b-bottom {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.itemlr {
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.bw-b-bottom-up {
|
||||
border-radius: 0;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.yj-info {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: red;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.yj-info .tit {
|
||||
font-weight: 700;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.yj-info .tel {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.tab-wrap {
|
||||
left: auto;
|
||||
right: 15px;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.tab .t-item {
|
||||
width: auto;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.bottom-list {
|
||||
height: 100px;
|
||||
padding: 15px;
|
||||
overflow: hidden;
|
||||
color: #fff;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.bottom-list .bl-left {
|
||||
float: left;
|
||||
margin-right: 30px;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.bottom-list .bl-right {
|
||||
float: right;
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
.tab .t-item {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.content-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 3;
|
||||
}
|
||||
|
||||
.content-body .content-item {
|
||||
}
|
||||
|
||||
.part-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.part-tag {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #107ca2;
|
||||
opacity: 0.8;
|
||||
flex: 1;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.part-tag + .part-tag {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.item-top {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
text-align: right;
|
||||
font-size: 16px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.num {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.unit-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 10px 0px;
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.do-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background-color: #107ca2;
|
||||
opacity: 0.8;
|
||||
flex: 1;
|
||||
border-radius: 10px;
|
||||
padding: 20px 0px;
|
||||
color: #fff;
|
||||
}
|
||||
.base-wrap{
|
||||
padding:15px 10px;
|
||||
height:100%;
|
||||
}
|
||||
.base-wrap .base-tit{
|
||||
font-size:12px;
|
||||
color:#333
|
||||
}
|
||||
.base-wrap .base-txt-wrap{
|
||||
margin-top:5px;
|
||||
background-color:#f2f5f7;
|
||||
border-radius:5px;
|
||||
color:#FFAE72;
|
||||
height:100%;
|
||||
align-items:center;
|
||||
justify-content:space-around;
|
||||
}
|
||||
.base-wrap .base-txt-wrap .num-1{
|
||||
background-color:#2A759C;
|
||||
padding:5px;
|
||||
font-size:40px;
|
||||
}
|
||||
.yj-info-1{
|
||||
height:100%;
|
||||
}
|
||||
.yj-info-1-list{
|
||||
color:#fff;
|
||||
}
|
||||
.yj-info-1 .telbg{
|
||||
height:100%;
|
||||
width:85px;
|
||||
background: url(../res/index/images/tel.png) center center no-repeat;
|
||||
background-size: contain;
|
||||
}
|
||||
.yj-info-1-list-item{
|
||||
padding:0 5px;
|
||||
background-color:#2A759C;
|
||||
margin-bottom:5px;
|
||||
font-size:12px;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
}
|
||||
.yj-info-1-list-item:last-child{
|
||||
margin-bottom:0;
|
||||
}
|
||||
.yj-info-1-list-item .telnum{
|
||||
text-align:center;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
display:flex;
|
||||
}
|
||||
.yj-info-1-info{
|
||||
color:#fff;
|
||||
background-color:#2A759C;
|
||||
text-align:center;
|
||||
font-size:16px;
|
||||
height:40px;
|
||||
line-height:40px;
|
||||
margin-top:5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap flex flexV">
|
||||
<div class="bottom-wrap flex1">
|
||||
<div class="top">
|
||||
<div class="item flex1">
|
||||
<div class="bw-b-bottom">
|
||||
<div class="bw-b-bottom-up">
|
||||
<div class="bw-item-content pd0">
|
||||
<div class="base-wrap flex flexV">
|
||||
<div class="base-tit">当前现场总人数</div>
|
||||
<div class="base-txt-wrap flex flex1">
|
||||
<div class="num-1 specialNum" runat="server" id="divperson">0</div>
|
||||
<div class="num-1 specialNum" runat="server" id="person00">0</div>
|
||||
<div class="num-1 specialNum" runat="server" id="person01">0</div>
|
||||
<div class="num-1 specialNum" runat="server" id="person02">0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item flex3 itemlr">
|
||||
<div class="bw-b-bottom">
|
||||
<div class="bw-b-bottom-up">
|
||||
<div class="bw-item-content">
|
||||
<div id='two' style="width: 100%; height: 100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item flex1">
|
||||
<div class="bw-b-bottom">
|
||||
<div class="bw-b-bottom-up">
|
||||
<div class="bw-item-content">
|
||||
<div class="yj-info-1 flex flexV">
|
||||
<div class="flex flex1">
|
||||
<div style="height:100%;">
|
||||
<div class="telbg"></div>
|
||||
</div>
|
||||
<div class="flex1 flex flexV yj-info-1-list">
|
||||
<div class="flex flex1 yj-info-1-list-item">
|
||||
<div class="flex1 telnum">110</div>
|
||||
<div>报警</div>
|
||||
</div>
|
||||
<div class="flex flex1 yj-info-1-list-item">
|
||||
<div class="flex1 telnum">119</div>
|
||||
<div>消防</div>
|
||||
</div>
|
||||
<div class="flex flex1 yj-info-1-list-item">
|
||||
<div class="flex1 telnum">120</div>
|
||||
<div>急救</div>
|
||||
</div>
|
||||
<div class="flex flex1 yj-info-1-list-item">
|
||||
<div id="xmb" runat="server" class="flex1 telnum"></div>
|
||||
<div>项目部</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="yj-info-1-info">
|
||||
<button type="button" class="yj-info-1-info" onclick="ope();" style="width: 100%;vertical-align: middle;border: none;height: auto;line-height:1;">应 急 流 程</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-wrap flex1">
|
||||
<div class="top">
|
||||
<div class="bw-b-bottom">
|
||||
<div class="bw-b-bottom-up">
|
||||
<div class="tab-wrap">
|
||||
<div class="tab" data-value="4">
|
||||
<div class="t-item active">施工分包商</div>
|
||||
<div class="spline"></div>
|
||||
<div class="t-item">问题类别</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bw-item-content">
|
||||
<div id='four' style="width: 100%; height: 100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-wrap flex1">
|
||||
<div class="top">
|
||||
<div class="item flex1">
|
||||
<div class="bw-b-bottom">
|
||||
<div class="bw-b-bottom-up">
|
||||
<div class="bw-item-content">
|
||||
<div id='three' style="width: 100%; height: 100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item flex2 itemlr">
|
||||
<div class="bw-b-bottom">
|
||||
<div class="bw-b-bottom-up">
|
||||
<div class="bw-item-content">
|
||||
<div id='five' style="width: 100%; height: 100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item flex1">
|
||||
<div class="bw-b-bottom">
|
||||
<div class="bw-b-bottom-up">
|
||||
<div class="bw-item-content">
|
||||
<div id='six' style="width: 100%; height: 100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript" src="../res/index/js/jquery-3.4.1.min.js"></script>
|
||||
<script type="text/javascript" src="../res/index/js/swiper-3.4.2.jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../res/index/js/echarts.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var basePath = '<%= ResolveUrl("~/") %>';
|
||||
function ope() {
|
||||
parent.addExampleTab({
|
||||
id: 'hello_fineui_tab',
|
||||
iframeUrl: basePath + 'HSSE/Emergency/EmergencyProcess.aspx',
|
||||
title: '应急流程',
|
||||
refreshWhenExist: true
|
||||
});
|
||||
}
|
||||
|
||||
function category_Two(id, xArr, data) {
|
||||
// 基于准备好的dom,初始化echarts实例
|
||||
var myChart = echarts.init(document.getElementById(id))
|
||||
// 指定图表的配置项和数据
|
||||
var option = {
|
||||
title: {
|
||||
left: 'center',
|
||||
text: '项目安全人工时',
|
||||
textStyle: {
|
||||
color: '#333',
|
||||
fontSize: 12,
|
||||
fontWeight: '300'
|
||||
},
|
||||
show: true
|
||||
},
|
||||
tooltip: {},
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.3)'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
/*interval: 0,*/
|
||||
textStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.8)'
|
||||
}
|
||||
},
|
||||
type: 'category',
|
||||
data: xArr
|
||||
},
|
||||
yAxis: {
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.3)'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.8)'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: data,
|
||||
grid: {
|
||||
top: '15%',
|
||||
left: '10',
|
||||
right: '10',
|
||||
bottom: '10%',
|
||||
containLabel: true,
|
||||
backgroundColor: 'rgba(0,162,233, 0.01)',
|
||||
// borderColor: 'rgba(0,162,233, 1)'
|
||||
},
|
||||
itemStyle: {
|
||||
color: 'rgba(9,199,113, 1)'
|
||||
},
|
||||
backgroundColor: 'rgba(0,162,233, 0.01)',
|
||||
textStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.3)'
|
||||
}
|
||||
}
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
|
||||
|
||||
if (xArr.length > 5) {
|
||||
option.dataZoom = [{
|
||||
type: 'slider',
|
||||
show: true,
|
||||
startValue: 0,
|
||||
endValue: 4,
|
||||
height: '10',
|
||||
backgroundColor: 'rgba(47,69,84,0)',
|
||||
fillerColor: 'rgba(0,162,233, 1)',
|
||||
bottom: '0%',
|
||||
zoomLock: true,
|
||||
moveOnMouseWheel: true,
|
||||
brushSelect: true,
|
||||
showDetail: false,
|
||||
}]
|
||||
}
|
||||
myChart.setOption(option)
|
||||
}
|
||||
|
||||
var two =<%=Two %>;
|
||||
var xArr = two.categories
|
||||
var data = [{
|
||||
name: '累计人工时',
|
||||
type: 'bar',
|
||||
/*barWidth: 40,*/
|
||||
data: two.series[0].data
|
||||
}]
|
||||
category_Two('two', xArr, data)
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function category_Three(id, xArr, data) {
|
||||
// 基于准备好的dom,初始化echarts实例
|
||||
var myChart = echarts.init(document.getElementById(id))
|
||||
// 指定图表的配置项和数据
|
||||
|
||||
var option = {
|
||||
title: {
|
||||
left: 'center',
|
||||
text: '作业许可数量统计',
|
||||
textStyle: {
|
||||
color: '#333',
|
||||
fontSize: 12,
|
||||
fontWeight: '300'
|
||||
},
|
||||
show: true
|
||||
},
|
||||
tooltip: {},
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
yAxis: {
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.3)'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.8)',
|
||||
fontSize: 10,
|
||||
}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.3)'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.8)'
|
||||
}
|
||||
},
|
||||
type: 'category',
|
||||
data: xArr
|
||||
},
|
||||
series: data,
|
||||
grid: {
|
||||
top: '15%',
|
||||
left: '10',
|
||||
right: '10',
|
||||
bottom: '0%',
|
||||
containLabel: true,
|
||||
backgroundColor: 'rgba(0,162,233, 0.01)',
|
||||
// borderColor: 'rgba(0,162,233, 1)'
|
||||
},
|
||||
itemStyle: {
|
||||
color: 'rgba(200,201,10, 1)'
|
||||
},
|
||||
backgroundColor: 'rgba(0,162,233, 0.01)',
|
||||
textStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.3)'
|
||||
}
|
||||
}
|
||||
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
myChart.setOption(option)
|
||||
}
|
||||
|
||||
var three =<%=Three %>;
|
||||
var xArr = three.categories
|
||||
var data = [{
|
||||
name: '作业许可数量统计',
|
||||
type: 'bar',
|
||||
data: three.series[0].data,
|
||||
itemStyle: { normal: { color: '#7BB259' } }
|
||||
}]
|
||||
category_Three('three', xArr, data)
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function category_Four(id, xArr, series) {
|
||||
// 基于准备好的dom,初始化echarts实例
|
||||
var myChart = echarts.init(document.getElementById(id))
|
||||
// 指定图表的配置项和数据
|
||||
var option = {
|
||||
title: {
|
||||
// left:'center',
|
||||
text: '安全检查问题统计',
|
||||
textStyle: {
|
||||
color: '#333',
|
||||
fontSize: 12,
|
||||
fontWeight: '300',
|
||||
},
|
||||
show: true
|
||||
},
|
||||
tooltip: {},
|
||||
color: ['#88cc00', '#AE4B23'],
|
||||
legend: {
|
||||
left: '15%',
|
||||
show: true,
|
||||
textStyle: {//图例文字的样式
|
||||
color: '#333',
|
||||
fontSize: 10,
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.3)'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
interval: 0,
|
||||
formatter: function (params) {
|
||||
var newParamsName = "";// 最终拼接成的字符串
|
||||
var paramsNameNumber = params.length;// 实际标签的个数
|
||||
var provideNumber = 14;// 每行能显示的字的个数
|
||||
var rowNumber = Math.ceil(paramsNameNumber / provideNumber);// 换行的话,需要显示几行,向上取整
|
||||
/**
|
||||
* 判断标签的个数是否大于规定的个数, 如果大于,则进行换行处理 如果不大于,即等于或小于,就返回原标签
|
||||
*/
|
||||
// 条件等同于rowNumber>1
|
||||
if (paramsNameNumber > provideNumber) {
|
||||
/** 循环每一行,p表示行 */
|
||||
for (var p = 0; p < rowNumber; p++) {
|
||||
var tempStr = "";// 表示每一次截取的字符串
|
||||
var start = p * provideNumber;// 开始截取的位置
|
||||
var end = start + provideNumber;// 结束截取的位置
|
||||
// 此处特殊处理最后一行的索引值
|
||||
if (p == rowNumber - 1) {
|
||||
// 最后一次不换行
|
||||
tempStr = params.substring(start, paramsNameNumber);
|
||||
} else {
|
||||
// 每一次拼接字符串并换行
|
||||
tempStr = params.substring(start, end) + "\n";
|
||||
}
|
||||
newParamsName += tempStr;// 最终拼成的字符串
|
||||
}
|
||||
|
||||
} else {
|
||||
// 将旧标签的值赋给新标签
|
||||
newParamsName = params;
|
||||
}
|
||||
//将最终的字符串返回
|
||||
return newParamsName
|
||||
},
|
||||
textStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.8)'
|
||||
}
|
||||
},
|
||||
type: 'category',
|
||||
data: xArr
|
||||
},
|
||||
yAxis: {
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.3)'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.8)'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: series,
|
||||
grid: {
|
||||
top: '25%',
|
||||
left: '0%',
|
||||
right: '0%',
|
||||
bottom: '0%',
|
||||
containLabel: true,
|
||||
backgroundColor: 'rgba(0,162,233, 0.01)',
|
||||
// borderColor: 'rgba(0,162,233, 1)'
|
||||
},
|
||||
//itemStyle: {
|
||||
// color: 'rgba(200,201,10, 1)'
|
||||
//},
|
||||
backgroundColor: 'rgba(0,162,233, 0.01)',
|
||||
textStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.3)'
|
||||
}
|
||||
}
|
||||
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
myChart.setOption(option)
|
||||
}
|
||||
var four1 =<%=Four1 %>;
|
||||
var xArr = four1.categories
|
||||
var series = [{
|
||||
name: '待整改',
|
||||
type: 'bar',
|
||||
barWidth: 20,
|
||||
barGap:0.05,
|
||||
data: four1.series[0].data,
|
||||
itemStyle: { normal: { color: '#88cc00' } }
|
||||
}, {
|
||||
name: '全部',
|
||||
type: 'bar',
|
||||
barWidth: 20,
|
||||
data: four1.series[0].data2,
|
||||
itemStyle: { normal: { color: '#AE4B23' } }
|
||||
}];
|
||||
category_Four('four', xArr, series)
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function category_Five(id, xArr, data) {
|
||||
// 基于准备好的dom,初始化echarts实例
|
||||
var myChart = echarts.init(document.getElementById(id))
|
||||
// 指定图表的配置项和数据
|
||||
var option = {
|
||||
title: {
|
||||
left: 'center',
|
||||
text: '入场安全培训',
|
||||
textStyle: {
|
||||
color: '#333',
|
||||
fontSize: 12,
|
||||
fontWeight: '300'
|
||||
},
|
||||
show: true
|
||||
},
|
||||
tooltip: {},
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.3)'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
/*interval: 0,*/
|
||||
fontSize:10,
|
||||
rotate: 15,
|
||||
textStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.8)'
|
||||
}
|
||||
},
|
||||
type: 'category',
|
||||
data: xArr
|
||||
},
|
||||
yAxis: {
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.3)'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.8)'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: data,
|
||||
grid: {
|
||||
top: '15%',
|
||||
left: '10',
|
||||
right: '10',
|
||||
bottom: '0%',
|
||||
containLabel: true,
|
||||
backgroundColor: 'rgba(0,162,233, 0.01)',
|
||||
// borderColor: 'rgba(0,162,233, 1)'
|
||||
},
|
||||
itemStyle: {
|
||||
color: 'rgba(200,201,10, 1)'
|
||||
},
|
||||
backgroundColor: 'rgba(0,162,233, 0.01)',
|
||||
textStyle: {
|
||||
color: 'rgba(51, 51, 51, 0.3)'
|
||||
}
|
||||
}
|
||||
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
myChart.setOption(option)
|
||||
}
|
||||
var five =<%=Five %>;
|
||||
var xArr = five.categories
|
||||
var data = [{
|
||||
name: '总数',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
data: five.series[1].data,
|
||||
itemStyle: { normal: { color: 'rgba(0, 255, 0, 1)' } }
|
||||
},{
|
||||
name: '当月',
|
||||
type: 'bar',
|
||||
/*barWidth: 30,*/
|
||||
data: five.series[0].data
|
||||
}]
|
||||
|
||||
category_Five('five', xArr, data)
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function category_six(id, xArr, data,data2) {
|
||||
// 基于准备好的dom,初始化echarts实例
|
||||
var myChart = echarts.init(document.getElementById(id))
|
||||
// 指定图表的配置项和数据
|
||||
var option = {
|
||||
title: [{
|
||||
text: '事故统计',
|
||||
top: '0',
|
||||
left: '30%',
|
||||
textStyle: {
|
||||
color: '#333',
|
||||
fontSize: 12,
|
||||
fontWeight: 300
|
||||
}
|
||||
}],
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b}: {c} ({d}%)'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
right: 20,
|
||||
top: 'center',
|
||||
|
||||
data: ['人身伤害', '未遂事故', '火灾', '机械设备', '环境影响', '其他'],
|
||||
textStyle: {//图例文字的样式
|
||||
color: '#f2f2f2',
|
||||
fontSize: 10,
|
||||
}
|
||||
},
|
||||
graphic: {
|
||||
type: "text",
|
||||
left: "36%",
|
||||
top: "52%",
|
||||
style: {
|
||||
text: data2,
|
||||
textAlign: "center",
|
||||
fill: "#333",
|
||||
fontSize: 18,
|
||||
fontWeight: 600
|
||||
}
|
||||
},
|
||||
color: ['#CFE5B7', '#BBD4A4', '#A3C78A', '#88B53D', '#7CA63B', '#698E30'],
|
||||
series: [
|
||||
{
|
||||
name: '事故统计',
|
||||
type: 'pie',
|
||||
center: ['38%', '55%'],
|
||||
radius: ['40%', '78%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'inside',
|
||||
formatter: function (data) { return data.percent.toFixed(2); }
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: data[0], name: '人身伤害' },
|
||||
{ value: data[1], name: '未遂事故' },
|
||||
{ value: data[2], name: '火灾' },
|
||||
{ value: data[3], name: '机械设备' },
|
||||
{ value: data[4], name: '环境影响' },
|
||||
{ value: data[5], name: '其他' }
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
borderWidth: 3,
|
||||
borderColor: 'rgba(218,235,234, 1)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
myChart.setOption(option)
|
||||
}
|
||||
var six=<%=Six %>;
|
||||
var xArr = ["分包一", "分包二"]
|
||||
var data = six.series[0].data
|
||||
var data2 = data[0]+data[1]+data[2]+data[3]+data[4]+data[5]
|
||||
category_six('six', xArr, data,data2)
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(".tab .t-item").click(function () {
|
||||
var $this = $(this)
|
||||
var index = $this.index()
|
||||
if ($this.hasClass('active') && index == 0) {
|
||||
return
|
||||
}
|
||||
var $tab = $this.closest(".tab")
|
||||
var value = $tab.attr("data-value")
|
||||
$tab.find(".t-item").removeClass('active');
|
||||
$this.addClass('active')
|
||||
|
||||
var four1 =<%=Four1 %>;
|
||||
var four2 =<%=Four2 %>;
|
||||
if (value == 4) {
|
||||
var xArr = four1.categories
|
||||
var data = [{
|
||||
name: '待整改',
|
||||
type: 'bar',
|
||||
data: four1.series[0].data
|
||||
}, {
|
||||
name: '全部',
|
||||
type: 'bar',
|
||||
data: four1.series[0].data2,
|
||||
itemStyle: { normal: { color: 'rgba(174,75,37, 1)' } }
|
||||
}];
|
||||
if (index == 2) {
|
||||
var xArr = four2.categories
|
||||
var data = [{
|
||||
name: '待整改',
|
||||
data: four2.series[0].data
|
||||
}, {
|
||||
name: '全部',
|
||||
data: four2.series[0].data2,
|
||||
itemStyle: { normal: { color: 'rgba(174,75,37, 1)' } }
|
||||
}];
|
||||
}
|
||||
category_Four('four', xArr, data)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,392 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.HSSE.License;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.CodeDom;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web
|
||||
{
|
||||
public partial class mainMenu_Staff : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
getHazardRegisterLists = HSSE_Hazard_HazardRegisterService.GetHazardRegisterListByProjectId(this.CurrUser.LoginProjectId);
|
||||
///当前现场总人数
|
||||
getSitePerson();
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (project != null && project.Telephone != null)
|
||||
{
|
||||
this.xmb.InnerHtml = project.Telephone;
|
||||
}
|
||||
|
||||
getDayReportDetails = (from x in Funs.DB.SitePerson_DayReportDetail
|
||||
join y in Funs.DB.SitePerson_DayReport on x.DayReportId equals y.DayReportId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x).ToList();
|
||||
getProjectUnits = (from x in Funs.DB.Project_ProjectUnit
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
private static List<Model.SitePerson_DayReportDetail> getDayReportDetails;
|
||||
|
||||
private static List<Model.Project_ProjectUnit> getProjectUnits;
|
||||
|
||||
#region 当前现场总人数
|
||||
/// <summary>
|
||||
/// 当前现场总人数
|
||||
/// </summary>
|
||||
private void getSitePerson()
|
||||
{
|
||||
int AllCount = 0;
|
||||
//var getallin = APIPageDataService.getPersonInOutNum(this.ProjectId, DateTime.Now.AddDays(-1));
|
||||
DateTime dateValue = DateTime.Now.AddDays(-1);
|
||||
List<Model.PageDataPersonInOutItem> getallin = new List<Model.PageDataPersonInOutItem>();
|
||||
var getInMaxs = from x in Funs.DB.SitePerson_Person
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.IsUsed == true
|
||||
select new Model.PageDataPersonInOutItem
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
PostType = y.PostType,
|
||||
WorkPostId = x.WorkPostId,
|
||||
};
|
||||
if (getInMaxs.Count() > 0)
|
||||
{
|
||||
getallin = getInMaxs.Distinct().ToList();
|
||||
}
|
||||
//AllCount = getallin.Count();
|
||||
var getEmployInOutRecords = (from x in Funs.DB.T_d_EmployInOutRecord
|
||||
join y in Funs.DB.SitePerson_Person on new { ss1 = x.ProjectId, ss = x.IDCardNo } equals new { ss1 = y.ProjectId, ss = y.IdentityCard }
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId && y.IsUsed == true && x.ProjectId == this.CurrUser.LoginProjectId && x.RecordDate.Value == DateTime.Now.Date
|
||||
select x.IDCardNo).Distinct();
|
||||
|
||||
//if (AllCount > 0)
|
||||
//{
|
||||
// ////总人数
|
||||
// this.divperson.InnerHtml = ((AllCount % 10000) / 1000).ToString();
|
||||
// this.person00.InnerHtml = ((AllCount % 1000) / 100).ToString();
|
||||
// this.person01.InnerHtml = ((AllCount % 100) / 10).ToString();
|
||||
// this.person02.InnerHtml = (AllCount % 10).ToString();
|
||||
//}
|
||||
|
||||
|
||||
AllCount = getEmployInOutRecords.Count();
|
||||
if (AllCount > 0)
|
||||
{
|
||||
////总人数
|
||||
this.divperson.InnerHtml = ((AllCount % 10000) / 1000).ToString();
|
||||
this.person00.InnerHtml = ((AllCount % 1000) / 100).ToString();
|
||||
this.person01.InnerHtml = ((AllCount % 100) / 10).ToString();
|
||||
this.person02.InnerHtml = (AllCount % 10).ToString();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 项目安全人工时
|
||||
/// <summary>
|
||||
/// 项目安全人工时
|
||||
/// </summary>
|
||||
protected string Two
|
||||
{
|
||||
get
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
Model.SingleSerie s = new Model.SingleSerie();
|
||||
List<double> listdata = new List<double>();
|
||||
foreach (var item in getProjectUnits)
|
||||
{
|
||||
listCategories.Add(UnitService.GetShortUnitNameByUnitId(item.UnitId));
|
||||
decimal total = getDayReportDetails.Where(x => x.UnitId == item.UnitId).Sum(x => x.PersonWorkTime ?? 0);
|
||||
listdata.Add(Convert.ToDouble(total));
|
||||
}
|
||||
s.data = listdata;
|
||||
series.Add(s);
|
||||
|
||||
businessColumn.categories = listCategories;
|
||||
businessColumn.series = series;
|
||||
return JsonConvert.SerializeObject(businessColumn);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 作业许可数量统计
|
||||
/// <summary>
|
||||
/// 作业许可数量统计
|
||||
/// </summary>
|
||||
protected string Three
|
||||
{
|
||||
get
|
||||
{
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
businessColumn.title = "作业许可数量统计";
|
||||
Model.SingleSerie s = new Model.SingleSerie();
|
||||
List<double> listdata = new List<double>();
|
||||
|
||||
var qLicenseManager = ( from x in Funs.DB.License_LicenseManager.Where(xx=>xx.ProjectId==CurrUser.LoginProjectId)
|
||||
join y in Funs.DB.Base_LicenseType
|
||||
on x.LicenseTypeId equals y.LicenseTypeId into z
|
||||
from zz in z
|
||||
select new
|
||||
{
|
||||
x.LicenseTypeId,zz.LicenseTypeCode
|
||||
|
||||
}).ToList();
|
||||
int FireWork = Funs.DB.License_FireWork.Where(x=>x.ProjectId==this.CurrUser.LoginProjectId && x.States== Const.State_3).Count();
|
||||
int HeightWork = Funs.DB.License_HeightWork.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.States == Const.State_3).Count();
|
||||
int LimitedSpace = Funs.DB.License_LimitedSpace.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.States == Const.State_3).Count();
|
||||
int RadialWork = Funs.DB.License_RadialWork.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.States == Const.State_3).Count();
|
||||
int OpenCircuit = Funs.DB.License_OpenCircuit.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.States == Const.State_3).Count();
|
||||
int BreakGround = Funs.DB.License_BreakGround.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.States == Const.State_3).Count();
|
||||
int NightWork = Funs.DB.License_NightWork.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.States == Const.State_3).Count();
|
||||
int LiftingWork = Funs.DB.License_LiftingWork.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.States == Const.State_3).Count();
|
||||
|
||||
foreach(var item in qLicenseManager)
|
||||
{
|
||||
switch (item.LicenseTypeCode)
|
||||
{
|
||||
case "01":
|
||||
case "4"://动火
|
||||
FireWork++;
|
||||
break;
|
||||
case "06":
|
||||
case "18":
|
||||
case "2"://高处
|
||||
HeightWork++;
|
||||
break;
|
||||
case "03":
|
||||
case "7"://受限
|
||||
LimitedSpace++;
|
||||
break;
|
||||
case "14":
|
||||
case "04"://射线
|
||||
RadialWork++;
|
||||
break;
|
||||
case "09":
|
||||
case "5"://断路
|
||||
OpenCircuit++;
|
||||
break;
|
||||
case "02":
|
||||
case "8"://动土
|
||||
BreakGround++;
|
||||
break;
|
||||
case ""://夜间
|
||||
NightWork++;
|
||||
break;
|
||||
case "19":
|
||||
case "05":
|
||||
case "3"://吊装
|
||||
LiftingWork++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
listCategories.Add("动火");
|
||||
listdata.Add(FireWork);
|
||||
listCategories.Add("高处");
|
||||
listdata.Add(HeightWork);
|
||||
listCategories.Add("受限");
|
||||
listdata.Add(LimitedSpace);
|
||||
listCategories.Add("射线");
|
||||
listdata.Add(RadialWork);
|
||||
listCategories.Add("断路");
|
||||
listdata.Add(OpenCircuit);
|
||||
listCategories.Add("动土");
|
||||
listdata.Add(BreakGround);
|
||||
listCategories.Add("夜间");
|
||||
listdata.Add(NightWork);
|
||||
listCategories.Add("吊装");
|
||||
listdata.Add(LiftingWork);
|
||||
|
||||
s.data = listdata;
|
||||
series.Add(s);
|
||||
businessColumn.categories = listCategories;
|
||||
businessColumn.series = series;
|
||||
return JsonConvert.SerializeObject(businessColumn);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 安全检查问题统计
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static List<Model.HSSE_Hazard_HazardRegister> getHazardRegisterLists;
|
||||
|
||||
/// <summary>
|
||||
/// 按单位统计
|
||||
/// </summary>
|
||||
protected string Four1
|
||||
{
|
||||
get
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
Model.SingleSerie s = new Model.SingleSerie();
|
||||
List<double> listdata = new List<double>();
|
||||
List<double> listdata2 = new List<double>();
|
||||
var hazardRegisters = from x in db.View_Hazard_HazardRegister where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
if (hazardRegisters.Count() > 0)
|
||||
{
|
||||
var units = hazardRegisters.Select(x => x.ResponsibleUnit).Distinct().ToList();
|
||||
foreach (var unit in units)
|
||||
{
|
||||
listCategories.Add(UnitService.GetShortUnitNameByUnitId(unit));
|
||||
int state1 = hazardRegisters.Count(x => x.ResponsibleUnit == unit && x.States == "1");
|
||||
int state2 = hazardRegisters.Count(x => x.ResponsibleUnit == unit);
|
||||
listdata.Add(Convert.ToDouble(state1));
|
||||
listdata2.Add(Convert.ToDouble(state2));
|
||||
}
|
||||
s.data = listdata;
|
||||
s.data2 = listdata2;
|
||||
series.Add(s);
|
||||
}
|
||||
businessColumn.categories = listCategories;
|
||||
businessColumn.series = series;
|
||||
return JsonConvert.SerializeObject(businessColumn);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按类型统计
|
||||
/// </summary>
|
||||
protected string Four2
|
||||
{
|
||||
get
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
Model.SingleSerie s = new Model.SingleSerie();
|
||||
List<double> listdata = new List<double>();
|
||||
List<double> listdata2 = new List<double>();
|
||||
var hazardRegisters = from x in db.View_Hazard_HazardRegister where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
if (hazardRegisters.Count() > 0)
|
||||
{
|
||||
var types = hazardRegisters.Select(x => x.RegisterTypesName).Distinct().ToList();
|
||||
foreach (var type in types)
|
||||
{
|
||||
listCategories.Add(type);
|
||||
int state1 = hazardRegisters.Count(x => x.RegisterTypesName == type && x.States == "1");
|
||||
int state2 = hazardRegisters.Count(x => x.RegisterTypesName == type);
|
||||
listdata.Add(Convert.ToDouble(state1));
|
||||
listdata2.Add(Convert.ToDouble(state2));
|
||||
}
|
||||
s.data = listdata;
|
||||
s.data2 = listdata2;
|
||||
series.Add(s);
|
||||
}
|
||||
businessColumn.categories = listCategories;
|
||||
businessColumn.series = series;
|
||||
return JsonConvert.SerializeObject(businessColumn);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 入场安全培训
|
||||
/// <summary>
|
||||
/// 入场安全培训
|
||||
/// </summary>
|
||||
protected string Five
|
||||
{
|
||||
get
|
||||
{
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
businessColumn.title = "入场培训";
|
||||
Model.SingleSerie s = new Model.SingleSerie();
|
||||
Model.SingleSerie s2 = new Model.SingleSerie();
|
||||
//// 每月培训数量
|
||||
List<double> listdata = new List<double>();
|
||||
List<double> listdata2 = new List<double>();
|
||||
var getTrainRecord = from x in Funs.DB.EduTrain_TrainRecord
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.TrainTypeId == Const.EntryTrainTypeId
|
||||
select x;
|
||||
var getTrainRecordDetail = from x in Funs.DB.EduTrain_TrainRecordDetail
|
||||
join y in getTrainRecord on x.TrainingId equals y.TrainingId
|
||||
select x;
|
||||
DateTime startTime = DateTime.Now;
|
||||
DateTime endTime = DateTime.Now;
|
||||
var getProject = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (getProject != null && getProject.StartDate.HasValue)
|
||||
{
|
||||
startTime = getProject.StartDate.Value;
|
||||
if (getProject.EndDate.HasValue && getProject.EndDate < DateTime.Now)
|
||||
{
|
||||
endTime = getProject.EndDate.Value;
|
||||
}
|
||||
}
|
||||
int totalCout = 0;
|
||||
for (int i = 0; startTime.AddMonths(i) <= endTime; i++)
|
||||
{
|
||||
listCategories.Add(string.Format("{0:yyyy-MM}", startTime.AddMonths(i)));
|
||||
|
||||
var getMontDetail = from x in getTrainRecordDetail
|
||||
join y in getTrainRecord on x.TrainingId equals y.TrainingId
|
||||
where y.TrainStartDate.Value.Year == startTime.AddMonths(i).Year && y.TrainStartDate.Value.Month == startTime.AddMonths(i).Month
|
||||
select x;
|
||||
listdata.Add(getMontDetail.Count());
|
||||
totalCout = totalCout + getMontDetail.Count();
|
||||
listdata2.Add(totalCout);
|
||||
}
|
||||
|
||||
s.data = listdata;
|
||||
s2.data = listdata2;
|
||||
series.Add(s);
|
||||
series.Add(s2);
|
||||
businessColumn.categories = listCategories;
|
||||
businessColumn.series = series;
|
||||
return JsonConvert.SerializeObject(businessColumn);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
# region 事故统计
|
||||
/// <summary>
|
||||
/// 事故统计
|
||||
/// </summary>
|
||||
protected string Six
|
||||
{
|
||||
get
|
||||
{
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
|
||||
Model.SingleSerie s = new Model.SingleSerie();
|
||||
List<double> listdata = new List<double>();
|
||||
|
||||
businessColumn.title = "事故统计";
|
||||
var getAccident = from x in Funs.DB.Accident_AccidentReport
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
|
||||
listdata.Add(getAccident.Where(x => x.AccidentTypeId == "1" || x.AccidentTypeId == "2" || x.AccidentTypeId == "3" || x.AccidentTypeId == "4").Count());
|
||||
listdata.Add(getAccident.Where(x => x.AccidentTypeId == "5").Count());
|
||||
listdata.Add(getAccident.Where(x => x.AccidentTypeId == "6" || x.AccidentTypeId == "7").Count());
|
||||
listdata.Add(getAccident.Where(x => x.AccidentTypeId == "8" || x.AccidentTypeId == "9").Count());
|
||||
listdata.Add(getAccident.Where(x => x.AccidentTypeId == "10").Count());
|
||||
listdata.Add(getAccident.Where(x => x.AccidentTypeId == "11").Count());
|
||||
|
||||
s.data = listdata;
|
||||
series.Add(s);
|
||||
businessColumn.series = series;
|
||||
return JsonConvert.SerializeObject(businessColumn);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web
|
||||
{
|
||||
|
||||
|
||||
public partial class mainMenu_Staff
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Head1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
|
||||
|
||||
/// <summary>
|
||||
/// divperson 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divperson;
|
||||
|
||||
/// <summary>
|
||||
/// person00 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl person00;
|
||||
|
||||
/// <summary>
|
||||
/// person01 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl person01;
|
||||
|
||||
/// <summary>
|
||||
/// person02 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl person02;
|
||||
|
||||
/// <summary>
|
||||
/// xmb 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl xmb;
|
||||
}
|
||||
}
|
||||
@@ -245,7 +245,7 @@ namespace FineUIPro.Web.common
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<double> listdata = new List<double>();
|
||||
double result = 0;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
//一次检测合格焊口数
|
||||
int oneCheckJotNum = (from x in db.HJGL_Batch_NDEItem
|
||||
join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
@@ -283,7 +283,7 @@ namespace FineUIPro.Web.common
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<double> listdata = new List<double>();
|
||||
double result = 0;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
//项目焊口数
|
||||
int allJotNum = (from x in db.HJGL_WeldJoint
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace FineUIPro.Web.common
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
|
||||
//加载看板数据
|
||||
loadData();
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
get
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
@@ -198,7 +198,7 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
get
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var personQualitys = from x in db.SitePerson_Person
|
||||
join y in db.QualityAudit_PersonQuality on x.PersonId equals y.PersonId
|
||||
join z in db.Base_WorkPost on x.WorkPostId equals z.WorkPostId
|
||||
@@ -362,7 +362,7 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
get
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
@@ -395,7 +395,7 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
get
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
|
||||
Reference in New Issue
Block a user