现场考勤——当前现场总人数
This commit is contained in:
parent
134f759589
commit
c54c470818
|
|
@ -179,65 +179,76 @@
|
||||||
padding: 20px 0px;
|
padding: 20px 0px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
.base-wrap{
|
|
||||||
padding:15px 10px;
|
.base-wrap {
|
||||||
height:100%;
|
padding: 15px 10px;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
.base-wrap .base-tit{
|
|
||||||
font-size:12px;
|
.base-wrap .base-tit {
|
||||||
color:#fff;
|
font-size: 12px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.base-wrap .base-txt-wrap {
|
||||||
|
margin-top: 5px;
|
||||||
|
background-color: #0B508B;
|
||||||
|
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%;
|
||||||
}
|
}
|
||||||
.base-wrap .base-txt-wrap{
|
|
||||||
margin-top:5px;
|
.yj-info-1-list {
|
||||||
background-color:#0B508B;
|
color: #fff;
|
||||||
border-radius:5px;
|
|
||||||
color:#FFAE72;
|
|
||||||
height:100%;
|
|
||||||
align-items:center;
|
|
||||||
justify-content:space-around;
|
|
||||||
}
|
}
|
||||||
.base-wrap .base-txt-wrap .num-1{
|
|
||||||
background-color:#2A759C;
|
.yj-info-1 .telbg {
|
||||||
padding:5px;
|
height: 100%;
|
||||||
font-size:40px;
|
width: 85px;
|
||||||
}
|
|
||||||
.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: url(../res/index/images/tel.png) center center no-repeat;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
}
|
}
|
||||||
.yj-info-1-list-item{
|
|
||||||
padding:0 5px;
|
.yj-info-1-list-item {
|
||||||
background-color:#2A759C;
|
padding: 0 5px;
|
||||||
margin-bottom:5px;
|
background-color: #2A759C;
|
||||||
font-size:12px;
|
margin-bottom: 5px;
|
||||||
align-items:center;
|
font-size: 12px;
|
||||||
justify-content:center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.yj-info-1-list-item:last-child{
|
|
||||||
margin-bottom:0;
|
.yj-info-1-list-item:last-child {
|
||||||
}
|
margin-bottom: 0;
|
||||||
.yj-info-1-list-item .telnum{
|
}
|
||||||
text-align:center;
|
|
||||||
align-items:center;
|
.yj-info-1-list-item .telnum {
|
||||||
justify-content:center;
|
text-align: center;
|
||||||
display:flex;
|
align-items: center;
|
||||||
}
|
justify-content: center;
|
||||||
.yj-info-1-info{
|
display: flex;
|
||||||
color:#fff;
|
}
|
||||||
background-color:#2A759C;
|
|
||||||
text-align:center;
|
.yj-info-1-info {
|
||||||
font-size:16px;
|
color: #fff;
|
||||||
height:40px;
|
background-color: #2A759C;
|
||||||
line-height:40px;
|
text-align: center;
|
||||||
margin-top:5px;
|
font-size: 16px;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
@ -248,15 +259,15 @@
|
||||||
<div class="item flex1">
|
<div class="item flex1">
|
||||||
<div class="bw-b-bottom">
|
<div class="bw-b-bottom">
|
||||||
<div class="bw-b-bottom-up">
|
<div class="bw-b-bottom-up">
|
||||||
<div class="bw-item-content pd0">
|
<div class="bw-item-content pd0 js-hover" data-type="SitePersonNum">
|
||||||
<div class="base-wrap flex flexV">
|
<div class="base-wrap flex flexV">
|
||||||
<div class="base-tit">当前现场总人数</div>
|
<div class="base-tit">当前现场总人数</div>
|
||||||
<div class="base-txt-wrap flex flex1">
|
<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="divperson">0</div>
|
||||||
<div class="num-1 specialNum" runat="server" id="person00">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="person01">0</div>
|
||||||
<div class="num-1 specialNum" runat="server" id="person02">0</div>
|
<div class="num-1 specialNum" runat="server" id="person02">0</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -270,7 +281,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom-wrap flex1">
|
<div class="bottom-wrap flex1">
|
||||||
|
|
@ -290,12 +301,32 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<script type="text/javascript" src="../res/index/js/jquery-3.4.1.min.js"></script>
|
<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/swiper-3.4.2.jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="../res/index/js/echarts.min.js"></script>
|
<script type="text/javascript" src="../res/index/js/echarts.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
initClick();
|
||||||
|
})
|
||||||
|
|
||||||
|
function initClick() {
|
||||||
|
$(".js-hover").click(function () {
|
||||||
|
var htmlContent = GetClickHtml(this);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetClickHtml(obj) {
|
||||||
|
var $this = $(obj), type = $this.attr('data-type');
|
||||||
|
if (type == 'SitePersonNum') {
|
||||||
|
$('iframe').attr('src', '../DataShow/ProjectSitePerson.aspx') //项目当前现场人员
|
||||||
|
window.open("../DataShow/ProjectSitePerson.aspx")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function category_Two(id, xArr, data) {
|
function category_Two(id, xArr, data) {
|
||||||
// 基于准备好的dom,初始化echarts实例
|
// 基于准备好的dom,初始化echarts实例
|
||||||
|
|
@ -410,30 +441,30 @@
|
||||||
name: '累计人工时',
|
name: '累计人工时',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
data: two.series[0].data,
|
data: two.series[0].data,
|
||||||
//label: { //柱体上显示数值
|
//label: { //柱体上显示数值
|
||||||
// show: true,//开启显示
|
// show: true,//开启显示
|
||||||
// position: 'top',//在上方显示
|
// position: 'top',//在上方显示
|
||||||
// textStyle: {//数值样式
|
// textStyle: {//数值样式
|
||||||
// fontSize: '20px',
|
// fontSize: '20px',
|
||||||
// color: '#fff'
|
// color: '#fff'
|
||||||
// },
|
// },
|
||||||
// formatter: '{c}',
|
// formatter: '{c}',
|
||||||
// },
|
// },
|
||||||
itemStyle: { normal: { color: '#00c771' } }
|
itemStyle: { normal: { color: '#00c771' } }
|
||||||
},{
|
}, {
|
||||||
name: '当月人工时',
|
name: '当月人工时',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
/* barWidth: 40,*/
|
/* barWidth: 40,*/
|
||||||
data: two.series[1].data,
|
data: two.series[1].data,
|
||||||
//label: { //柱体上显示数值
|
//label: { //柱体上显示数值
|
||||||
// show: true,//开启显示
|
// show: true,//开启显示
|
||||||
// position: 'inside',//内部
|
// position: 'inside',//内部
|
||||||
// textStyle: {//数值样式
|
// textStyle: {//数值样式
|
||||||
// fontSize: '20px',
|
// fontSize: '20px',
|
||||||
// color: '#fff'
|
// color: '#fff'
|
||||||
// },
|
// },
|
||||||
// formatter: '{c}',
|
// formatter: '{c}',
|
||||||
// },
|
// },
|
||||||
}]
|
}]
|
||||||
category_Two('two', xArr, data)
|
category_Two('two', xArr, data)
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -537,7 +568,7 @@
|
||||||
right: '0%',
|
right: '0%',
|
||||||
bottom: 40,
|
bottom: 40,
|
||||||
containLabel: true,
|
containLabel: true,
|
||||||
backgroundColor: 'rgba(0,162,233, 0.01)',
|
backgroundColor: 'rgba(0,162,233, 0.01)',
|
||||||
// borderColor: 'rgba(0,162,233, 1)'
|
// borderColor: 'rgba(0,162,233, 1)'
|
||||||
},
|
},
|
||||||
//itemStyle: {
|
//itemStyle: {
|
||||||
|
|
@ -557,8 +588,8 @@
|
||||||
var series = [{
|
var series = [{
|
||||||
name: '签到',
|
name: '签到',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barWidth: 20,
|
barWidth: 20,
|
||||||
barGap:0.05,
|
barGap: 0.05,
|
||||||
data: four1.series[0].data,
|
data: four1.series[0].data,
|
||||||
label: { //柱体上显示数值
|
label: { //柱体上显示数值
|
||||||
show: true,//开启显示
|
show: true,//开启显示
|
||||||
|
|
@ -572,18 +603,18 @@
|
||||||
itemStyle: { normal: { color: '#88cc00' } }
|
itemStyle: { normal: { color: '#88cc00' } }
|
||||||
}, {
|
}, {
|
||||||
name: '系统',
|
name: '系统',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barWidth: 20,
|
barWidth: 20,
|
||||||
data: four1.series[1].data,
|
data: four1.series[1].data,
|
||||||
label: { //柱体上显示数值
|
label: { //柱体上显示数值
|
||||||
show: true,//开启显示
|
show: true,//开启显示
|
||||||
position: 'top',//在上方显示
|
position: 'top',//在上方显示
|
||||||
textStyle: {//数值样式
|
textStyle: {//数值样式
|
||||||
fontSize: '20px',
|
fontSize: '20px',
|
||||||
color: '#fff'
|
color: '#fff'
|
||||||
},
|
|
||||||
formatter: '{c}',
|
|
||||||
},
|
},
|
||||||
|
formatter: '{c}',
|
||||||
|
},
|
||||||
itemStyle: { normal: { color: '#AE4B23' } }
|
itemStyle: { normal: { color: '#AE4B23' } }
|
||||||
}];
|
}];
|
||||||
category_Four('four', xArr, series)
|
category_Four('four', xArr, series)
|
||||||
|
|
@ -611,7 +642,7 @@
|
||||||
data: four1.series[0].data
|
data: four1.series[0].data
|
||||||
}, {
|
}, {
|
||||||
name: '系统',
|
name: '系统',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: four1.series[1].data,
|
data: four1.series[1].data,
|
||||||
itemStyle: { normal: { color: 'rgba(174,75,37, 1)' } }
|
itemStyle: { normal: { color: 'rgba(174,75,37, 1)' } }
|
||||||
}];
|
}];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using BLL;
|
using BLL;
|
||||||
|
using FineUIPro.Web.DataShow;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
@ -8,15 +9,37 @@ namespace FineUIPro.Web.common
|
||||||
{
|
{
|
||||||
public partial class mainMenu_PDigData : PageBase
|
public partial class mainMenu_PDigData : PageBase
|
||||||
{
|
{
|
||||||
|
#region 定义项
|
||||||
|
/// <summary>
|
||||||
|
/// 项目主键
|
||||||
|
/// </summary>
|
||||||
|
public string ProjectId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["ProjectId"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["ProjectId"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
this.ProjectId = string.Empty;
|
||||||
|
if (this.CurrUser != null && !string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
{
|
||||||
|
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
|
}
|
||||||
getEmployInOutRecords = Funs.DB.T_d_EmployInOutRecord.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RecordDate.Value == DateTime.Now.Date).ToList();
|
getEmployInOutRecords = Funs.DB.T_d_EmployInOutRecord.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RecordDate.Value == DateTime.Now.Date).ToList();
|
||||||
getAllPersons = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == this.CurrUser.LoginProjectId).ToList();
|
getAllPersons = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == this.CurrUser.LoginProjectId).ToList();
|
||||||
getPersons = getAllPersons.Where(x =>x.IsUsed == true && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime > DateTime.Now)).ToList();
|
getPersons = getAllPersons.Where(x => x.IsUsed == true && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime > DateTime.Now)).ToList();
|
||||||
///当前现场总人数
|
///当前现场总人数
|
||||||
getSitePerson();
|
getSitePerson();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -26,7 +49,13 @@ namespace FineUIPro.Web.common
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void getSitePerson()
|
private void getSitePerson()
|
||||||
{
|
{
|
||||||
var AllCount = getEmployInOutRecords.Count();
|
//var AllCount = getEmployInOutRecords.Count();
|
||||||
|
|
||||||
|
//var getEmployInOutRecords = Funs.DB.T_d_EmployInOutRecord.Where(x => x.ProjectId == this.ProjectId && x.RecordDate.Value == DateTime.Now.Date).ToList();
|
||||||
|
// int AllCount = getEmployInOutRecords.Count();
|
||||||
|
|
||||||
|
var getallin = APIPageDataService.getPersonNum(this.ProjectId, DateTime.Now);
|
||||||
|
int AllCount = getallin.Count();
|
||||||
if (AllCount > 0)
|
if (AllCount > 0)
|
||||||
{
|
{
|
||||||
////总人数
|
////总人数
|
||||||
|
|
@ -72,7 +101,7 @@ namespace FineUIPro.Web.common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 现场人员
|
#region 现场人员
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|
@ -105,12 +134,12 @@ namespace FineUIPro.Web.common
|
||||||
int manCount = 0;
|
int manCount = 0;
|
||||||
var units = getAllPersons.Select(x => x.UnitId).Distinct();
|
var units = getAllPersons.Select(x => x.UnitId).Distinct();
|
||||||
if (units.Count() > 0)
|
if (units.Count() > 0)
|
||||||
{
|
{
|
||||||
foreach (var unitId in units)
|
foreach (var unitId in units)
|
||||||
{
|
{
|
||||||
var unitRords = from x in getEmployInOutRecords
|
var unitRords = from x in getEmployInOutRecords
|
||||||
join y in getAllPersons on x.IDCardNo equals y.IdentityCard
|
join y in getAllPersons on x.IDCardNo equals y.IdentityCard
|
||||||
where y.UnitId == unitId && y.PersonId != null && x.UnitId== unitId
|
where y.UnitId == unitId && y.PersonId != null && x.UnitId == unitId
|
||||||
select x;
|
select x;
|
||||||
var unitPersons = getPersons.Where(x => x.UnitId == unitId);
|
var unitPersons = getPersons.Where(x => x.UnitId == unitId);
|
||||||
int rcount = unitRords.Distinct().Count();
|
int rcount = unitRords.Distinct().Count();
|
||||||
|
|
@ -160,8 +189,8 @@ namespace FineUIPro.Web.common
|
||||||
businessColumn.title = "现场人员";
|
businessColumn.title = "现场人员";
|
||||||
var getTypes = (from x in getEmployInOutRecords
|
var getTypes = (from x in getEmployInOutRecords
|
||||||
join y in getAllPersons on x.IDCardNo equals y.IdentityCard
|
join y in getAllPersons on x.IDCardNo equals y.IdentityCard
|
||||||
join z in Funs.DB.Base_WorkPost on y.WorkPostId equals z.WorkPostId
|
join z in Funs.DB.Base_WorkPost on y.WorkPostId equals z.WorkPostId
|
||||||
select new { y.WorkPostId,z.WorkPostName }).Distinct();
|
select new { y.WorkPostId, z.WorkPostName }).Distinct();
|
||||||
if (getTypes.Count() > 0)
|
if (getTypes.Count() > 0)
|
||||||
{
|
{
|
||||||
foreach (var item in getTypes)
|
foreach (var item in getTypes)
|
||||||
|
|
@ -196,6 +225,6 @@ namespace FineUIPro.Web.common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||||
<UseIISExpress>true</UseIISExpress>
|
<UseIISExpress>true</UseIISExpress>
|
||||||
<Use64BitIISExpress />
|
<Use64BitIISExpress />
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue