From 3d4009617e58efae445a6dc59eddab5dfce488dd Mon Sep 17 00:00:00 2001
From: xiaju <1784803958@qq.com>
Date: Mon, 8 Dec 2025 10:02:06 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BD=93=E5=89=8D=E7=8E=B0?=
=?UTF-8?q?=E5=9C=BA=E4=BA=BA=E5=91=98=E7=95=8C=E9=9D=A2=E8=A1=A5=E5=85=85?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SGGL/BLL/ProjectData/TeamGroupService.cs | 26 ++++++++++----
.../DataShow/ProjectSitePerson.aspx | 15 ++++++++
.../DataShow/ProjectSitePerson.aspx.cs | 34 +++++++++++++++---
.../ProjectSitePerson.aspx.designer.cs | 36 +++++++++++++++++++
4 files changed, 101 insertions(+), 10 deletions(-)
diff --git a/SGGL/BLL/ProjectData/TeamGroupService.cs b/SGGL/BLL/ProjectData/TeamGroupService.cs
index 28261cbe..c5b9463f 100644
--- a/SGGL/BLL/ProjectData/TeamGroupService.cs
+++ b/SGGL/BLL/ProjectData/TeamGroupService.cs
@@ -42,7 +42,7 @@ namespace BLL
EntryTime = teamGroup.EntryTime,
ExitTime = teamGroup.ExitTime,
GroupLeaderId = teamGroup.GroupLeaderId,
- RealNamePushTime= null,
+ RealNamePushTime = null,
};
db.ProjectData_TeamGroup.InsertOnSubmit(newTeamGroup);
db.SubmitChanges();
@@ -119,14 +119,28 @@ namespace BLL
///
public static object GetTeamGroupListByUnitId(string projectId, string unitId)
{
- return (from x in Funs.DB.ProjectData_TeamGroup
- where x.ProjectId == projectId && x.UnitId == unitId
- orderby x.TeamGroupCode select x).ToList();
+ //return (from x in Funs.DB.ProjectData_TeamGroup
+ // where x.ProjectId == projectId && x.UnitId == unitId
+ // orderby x.TeamGroupCode select x).ToList();
+
+
+ var list = (from x in Funs.DB.ProjectData_TeamGroup
+ orderby x.TeamGroupCode
+ select x).ToList();
+ if (!string.IsNullOrWhiteSpace(projectId))
+ {
+ list = list.Where(x => x.ProjectId == projectId).ToList();
+ }
+ if (!string.IsNullOrWhiteSpace(unitId))
+ {
+ list = list.Where(x => x.UnitId == unitId).ToList();
+ }
+ return list;
}
- public static Model.ProjectData_TeamGroup getTeamGroupByTeamGroupName(string projectId,string unitId, string name)
+ public static Model.ProjectData_TeamGroup getTeamGroupByTeamGroupName(string projectId, string unitId, string name)
{
- return Funs.DB.ProjectData_TeamGroup.FirstOrDefault(x => x.ProjectId == projectId && x.UnitId== unitId && x.TeamGroupName == name);
+ return Funs.DB.ProjectData_TeamGroup.FirstOrDefault(x => x.ProjectId == projectId && x.UnitId == unitId && x.TeamGroupName == name);
}
#region 表下拉框
diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectSitePerson.aspx b/SGGL/FineUIPro.Web/DataShow/ProjectSitePerson.aspx
index db1e93ad..e2fdf4a0 100644
--- a/SGGL/FineUIPro.Web/DataShow/ProjectSitePerson.aspx
+++ b/SGGL/FineUIPro.Web/DataShow/ProjectSitePerson.aspx
@@ -20,6 +20,21 @@
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectSitePerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/ProjectSitePerson.aspx.cs
index fcf294a0..8cdc5284 100644
--- a/SGGL/FineUIPro.Web/DataShow/ProjectSitePerson.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/ProjectSitePerson.aspx.cs
@@ -36,8 +36,11 @@ namespace FineUIPro.Web.DataShow
{
if (!IsPostBack)
{
- Funs.DropDownPageSize(this.ddlPageSize);
this.ProjectId = this.CurrUser.LoginProjectId;
+ Funs.DropDownPageSize(this.ddlPageSize);
+ UnitService.InitUnitDownList(this.drpUnit, this.ProjectId, true);
+ TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpWorkTeam, this.ProjectId, null, true);
+ WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true);
this.Panel1.Title = $"项目当前现场人员({BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId)})";
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
//BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
@@ -59,7 +62,7 @@ namespace FineUIPro.Web.DataShow
var query =
from x in db.SitePerson_PersonInOutNow
where x.ChangeTime >= startDate && x.ChangeTime < endDate && x.ProjectId == this.ProjectId
- group x by new { x.PersonId, x.ProjectId} into g
+ group x by new { x.PersonId, x.ProjectId } into g
select new
{
g.Key.PersonId,
@@ -80,10 +83,13 @@ namespace FineUIPro.Web.DataShow
{
PersonId = record.PersonId,
PersonName = y.PersonName,
+ WorkPostId = y.WorkPostId,
WorkPostName = z.WorkPostName,
IdentityCard = y.IdentityCard,
+ UnitId = y.UnitId,
UnitName = u.UnitName,
- TeamGroupName= tg.TeamGroupName,
+ TeamGroupId = y.TeamGroupId,
+ TeamGroupName = tg.TeamGroupName,
ProjectId = record.ProjectId,
ChangeTime = record.MaxChangeTime,
PostType = z.PostType,
@@ -94,6 +100,26 @@ namespace FineUIPro.Web.DataShow
{
finalQuery = finalQuery.Where(x => x.PostType == Const.PostType_1);
}
+ if (!string.IsNullOrWhiteSpace(this.txtPersonName.Text.Trim()))
+ {
+ finalQuery = finalQuery.Where(x => x.PersonName.Contains(this.txtPersonName.Text.Trim()));
+ }
+
+ if (this.drpUnit.SelectedValue != Const._Null && !string.IsNullOrEmpty(this.drpUnit.SelectedValue))
+ {
+ finalQuery = finalQuery.Where(x => x.UnitId == this.drpUnit.SelectedValue);
+ }
+
+ if (this.drpWorkPost.SelectedValue != Const._Null && !string.IsNullOrEmpty(this.drpWorkPost.SelectedValue))
+ {
+ finalQuery = finalQuery.Where(x => x.WorkPostId == this.drpWorkPost.SelectedValue);
+ }
+
+ if (this.drpWorkTeam.SelectedValue != Const._Null && !string.IsNullOrEmpty(this.drpWorkTeam.SelectedValue))
+ {
+ finalQuery = finalQuery.Where(x => x.TeamGroupId == this.drpWorkTeam.SelectedValue);
+ }
+
DataTable tb = this.LINQToDataTable(finalQuery);
@@ -172,7 +198,7 @@ namespace FineUIPro.Web.DataShow
{
Response.ClearContent();
string filename = Funs.GetNewFileName();
- Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("项目当前现场" + filename+DateTime.Now.ToString("yyyyMMddHHmmss"), System.Text.Encoding.UTF8) + ".xls");
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("项目当前现场" + filename + DateTime.Now.ToString("yyyyMMddHHmmss"), System.Text.Encoding.UTF8) + ".xls");
Response.ContentType = "application/excel";
Response.ContentEncoding = System.Text.Encoding.UTF8;
this.Grid1.PageSize = this.Grid1.RecordCount;
diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectSitePerson.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/ProjectSitePerson.aspx.designer.cs
index 2f49f452..29332efc 100644
--- a/SGGL/FineUIPro.Web/DataShow/ProjectSitePerson.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/DataShow/ProjectSitePerson.aspx.designer.cs
@@ -59,6 +59,42 @@ namespace FineUIPro.Web.DataShow
///
protected global::FineUIPro.Toolbar Toolbar1;
+ ///
+ /// txtPersonName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtPersonName;
+
+ ///
+ /// drpUnit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpUnit;
+
+ ///
+ /// drpWorkTeam 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpWorkTeam;
+
+ ///
+ /// drpWorkPost 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpWorkPost;
+
///
/// chManager 控件。
///