diff --git a/SGGL/BLL/API/APIPersonService.cs b/SGGL/BLL/API/APIPersonService.cs
index 51e9c7c8..85751fe7 100644
--- a/SGGL/BLL/API/APIPersonService.cs
+++ b/SGGL/BLL/API/APIPersonService.cs
@@ -320,7 +320,11 @@ namespace BLL
{
query = query.Where(x => x.ProjectName.Contains(filter.ProjectName));
}
-
+ // 项目代号过滤(模糊查询)
+ if (!string.IsNullOrEmpty(filter.ProjectCode))
+ {
+ query = query.Where(x => x.ProjectCode.Contains(filter.ProjectCode));
+ }
// 人员ID过滤
if (!string.IsNullOrEmpty(filter.PersonId))
{
@@ -384,6 +388,7 @@ namespace BLL
IdentityCard = x.IdentityCard,
ProjectId = x.ProjectId,
ProjectName = x.ProjectName,
+ ProjectCode= x.ProjectCode,
UnitId = x.UnitId,
UnitName = x.UnitName,
TeamGroupName = x.TeamGroupName,
@@ -1112,7 +1117,7 @@ namespace BLL
var query = from x in db.SitePerson_PersonInOut
join y in db.SitePerson_Person on x.PersonId equals y.PersonId
join z in db.Base_Project on x.ProjectId equals z.ProjectId
- where x.ChangeTime >= filter.StartTime && x.ChangeTime <= filter.EndTime && z.ProjectName.Contains(filter.ProjectName)
+ where x.ChangeTime >= filter.StartTime && x.ChangeTime <= filter.EndTime && z.ProjectCode.Contains(filter.ProjectCode)
select new Model.PersonInOutItem
{
PersonId = x.PersonId,
@@ -1130,7 +1135,12 @@ namespace BLL
// 添加过滤条件
if (filter != null)
- {
+ {
+ // 项目名称过滤(模糊查询)
+ if (!string.IsNullOrEmpty(filter.ProjectName))
+ {
+ query = query.Where(x => x.ProjectName.Contains(filter.ProjectName));
+ }
// 单位名称过滤(模糊查询)
if (!string.IsNullOrEmpty(filter.UnitName))
{
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 939f1c0c..3933756b 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -16910,7 +16910,7 @@
-
+
diff --git a/SGGL/Model/HSSE/PersonInOutRecordInput.cs b/SGGL/Model/HSSE/PersonInOutRecordInput.cs
index 12287848..ebd12ce5 100644
--- a/SGGL/Model/HSSE/PersonInOutRecordInput.cs
+++ b/SGGL/Model/HSSE/PersonInOutRecordInput.cs
@@ -16,6 +16,10 @@ namespace Model
///
public string ProjectName { get; set; }
///
+ /// 项目代号
+ ///
+ public string ProjectCode { get; set; }
+ ///
/// 单位名称
///
public string UnitName { get; set; }
diff --git a/SGGL/Model/HSSE/ProjectPersonInput.cs b/SGGL/Model/HSSE/ProjectPersonInput.cs
index e594b832..3b9bae68 100644
--- a/SGGL/Model/HSSE/ProjectPersonInput.cs
+++ b/SGGL/Model/HSSE/ProjectPersonInput.cs
@@ -40,6 +40,10 @@ namespace Model
///
public string ProjectName { get; set; }
///
+ /// 项目代号
+ ///
+ public string ProjectCode { get; set; }
+ ///
/// 单位名称
///
public string UnitName { get; set; }
diff --git a/SGGL/Model/HSSE/ProjectPersonOutput.cs b/SGGL/Model/HSSE/ProjectPersonOutput.cs
index b0fb4ebd..91142e9a 100644
--- a/SGGL/Model/HSSE/ProjectPersonOutput.cs
+++ b/SGGL/Model/HSSE/ProjectPersonOutput.cs
@@ -42,6 +42,10 @@ namespace Model
///
public string ProjectName { get; set; }
///
+ /// 项目代号
+ ///
+ public string ProjectCode { get; set; }
+ ///
/// 单位ID
///
public string UnitId { get; set; }
diff --git a/SGGL/WebAPI/Controllers/PersonController.cs b/SGGL/WebAPI/Controllers/PersonController.cs
index c534b96a..a1a049cc 100644
--- a/SGGL/WebAPI/Controllers/PersonController.cs
+++ b/SGGL/WebAPI/Controllers/PersonController.cs
@@ -102,7 +102,7 @@ namespace WebAPI.Controllers
///
/// 根据条件获取项目人员信息(支持分页和过滤)
///
- /// 查询过滤条件(ProjectName为必填参数)
+ /// 查询过滤条件(ProjectCode为必填参数)
/// 每页条数
/// 页码(从1开始)
/// 是否返回全部数据
@@ -112,11 +112,11 @@ namespace WebAPI.Controllers
var responeData = new Model.ResponeData();
try
{
- // 验证必填参数 ProjectName
- if (filter == null || string.IsNullOrEmpty(filter.ProjectName))
+ // 验证必填参数 ProjectCode
+ if (filter == null || string.IsNullOrEmpty(filter.ProjectCode))
{
responeData.code = 0;
- responeData.message = "ProjectName为必填参数!";
+ responeData.message = "ProjectCode为必填参数!";
return responeData;
}
@@ -1072,10 +1072,10 @@ namespace WebAPI.Controllers
responeData.message = "StartTime不能大于EndTime!";
return responeData;
}
- if (filter == null || string.IsNullOrEmpty(filter.ProjectName))
+ if (filter == null || string.IsNullOrEmpty(filter.ProjectCode))
{
responeData.code = 0;
- responeData.message = "ProjectName为必填参数!";
+ responeData.message = "ProjectCode为必填参数!";
return responeData;
}