From c54c470818534459bd031e3fda4b5c452d0e7844 Mon Sep 17 00:00:00 2001 From: xiaju <1784803958@qq.com> Date: Thu, 6 Nov 2025 16:32:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=B0=E5=9C=BA=E8=80=83=E5=8B=A4=E2=80=94?= =?UTF-8?q?=E2=80=94=E5=BD=93=E5=89=8D=E7=8E=B0=E5=9C=BA=E6=80=BB=E4=BA=BA?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/mainMenu_PDigData.aspx | 225 ++++++++++-------- .../common/mainMenu_PDigData.aspx.cs | 49 +++- SGGL/WebAPI/WebAPI.csproj.user | 2 +- 3 files changed, 168 insertions(+), 108 deletions(-) diff --git a/SGGL/FineUIPro.Web/common/mainMenu_PDigData.aspx b/SGGL/FineUIPro.Web/common/mainMenu_PDigData.aspx index 21b32e87..090e4bb8 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_PDigData.aspx +++ b/SGGL/FineUIPro.Web/common/mainMenu_PDigData.aspx @@ -179,65 +179,76 @@ padding: 20px 0px; color: #fff; } - .base-wrap{ - padding:15px 10px; - height:100%; + + .base-wrap { + padding: 15px 10px; + height: 100%; } - .base-wrap .base-tit{ - font-size:12px; - color:#fff; + + .base-wrap .base-tit { + 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; - background-color:#0B508B; - border-radius:5px; - color:#FFAE72; - height:100%; - align-items:center; - justify-content:space-around; + + .yj-info-1-list { + color: #fff; } - .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; + + .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 { + 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; + + .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; } @@ -248,15 +259,15 @@
-
+
-
当前现场总人数
-
-
0
-
0
-
0
-
0
-
+
当前现场总人数
+
+
0
+
0
+
0
+
0
+
@@ -270,7 +281,7 @@
- +
@@ -290,12 +301,32 @@
- + + @@ -537,7 +568,7 @@ right: '0%', bottom: 40, containLabel: true, - backgroundColor: 'rgba(0,162,233, 0.01)', + backgroundColor: 'rgba(0,162,233, 0.01)', // borderColor: 'rgba(0,162,233, 1)' }, //itemStyle: { @@ -557,8 +588,8 @@ var series = [{ name: '签到', type: 'bar', - barWidth: 20, - barGap:0.05, + barWidth: 20, + barGap: 0.05, data: four1.series[0].data, label: { //柱体上显示数值 show: true,//开启显示 @@ -572,18 +603,18 @@ itemStyle: { normal: { color: '#88cc00' } } }, { name: '系统', - type: 'bar', - barWidth: 20, - data: four1.series[1].data, - label: { //柱体上显示数值 - show: true,//开启显示 - position: 'top',//在上方显示 - textStyle: {//数值样式 - fontSize: '20px', - color: '#fff' - }, - formatter: '{c}', + type: 'bar', + barWidth: 20, + data: four1.series[1].data, + label: { //柱体上显示数值 + show: true,//开启显示 + position: 'top',//在上方显示 + textStyle: {//数值样式 + fontSize: '20px', + color: '#fff' }, + formatter: '{c}', + }, itemStyle: { normal: { color: '#AE4B23' } } }]; category_Four('four', xArr, series) @@ -611,7 +642,7 @@ data: four1.series[0].data }, { name: '系统', - type: 'bar', + type: 'bar', data: four1.series[1].data, itemStyle: { normal: { color: 'rgba(174,75,37, 1)' } } }]; diff --git a/SGGL/FineUIPro.Web/common/mainMenu_PDigData.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_PDigData.aspx.cs index 0a2e3415..6ebcfaf8 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_PDigData.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_PDigData.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using FineUIPro.Web.DataShow; using Newtonsoft.Json; using System; using System.Collections.Generic; @@ -8,15 +9,37 @@ namespace FineUIPro.Web.common { public partial class mainMenu_PDigData : PageBase { + #region 定义项 + /// + /// 项目主键 + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + protected void Page_Load(object sender, EventArgs e) { 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(); 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 /// 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) { ////总人数 @@ -72,7 +101,7 @@ namespace FineUIPro.Web.common } } #endregion - + #region 现场人员 /// /// @@ -105,12 +134,12 @@ namespace FineUIPro.Web.common int manCount = 0; var units = getAllPersons.Select(x => x.UnitId).Distinct(); if (units.Count() > 0) - { + { foreach (var unitId in units) - { + { var unitRords = from x in getEmployInOutRecords 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; var unitPersons = getPersons.Where(x => x.UnitId == unitId); int rcount = unitRords.Distinct().Count(); @@ -160,8 +189,8 @@ namespace FineUIPro.Web.common businessColumn.title = "现场人员"; var getTypes = (from x in getEmployInOutRecords join y in getAllPersons on x.IDCardNo equals y.IdentityCard - join z in Funs.DB.Base_WorkPost on y.WorkPostId equals z.WorkPostId - select new { y.WorkPostId,z.WorkPostName }).Distinct(); + join z in Funs.DB.Base_WorkPost on y.WorkPostId equals z.WorkPostId + select new { y.WorkPostId, z.WorkPostName }).Distinct(); if (getTypes.Count() > 0) { foreach (var item in getTypes) @@ -196,6 +225,6 @@ namespace FineUIPro.Web.common } } #endregion - + } } \ No newline at end of file diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user index 1a1a9a6c..17978b44 100644 --- a/SGGL/WebAPI/WebAPI.csproj.user +++ b/SGGL/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true