From df755c4fedb3ecabf35e4589e4974c2bba309c3b Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Fri, 12 Aug 2022 17:32:31 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Service/Reading/Dto/OrganInfoViewModel.cs | 5 +++++
IRaCIS.Core.Application/Service/Reading/OrganInfoService.cs | 1 +
2 files changed, 6 insertions(+)
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/OrganInfoViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/OrganInfoViewModel.cs
index 205a96bd2..7002fe225 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/OrganInfoViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/OrganInfoViewModel.cs
@@ -86,6 +86,11 @@ namespace IRaCIS.Core.Application.ViewModel
/// 类型名称
public string TypeName { get; set; }
+ ///
+ /// 类型枚举
+ ///
+ public OrganType? OrganType { get; set; }
+
}
/// OrganInfoAddOrEdit 列表查询参数模型
diff --git a/IRaCIS.Core.Application/Service/Reading/OrganInfoService.cs b/IRaCIS.Core.Application/Service/Reading/OrganInfoService.cs
index b5eac6fe6..a0e49cdbd 100644
--- a/IRaCIS.Core.Application/Service/Reading/OrganInfoService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/OrganInfoService.cs
@@ -42,6 +42,7 @@ namespace IRaCIS.Core.Application.Service
{
var organInfoQueryable = _organInfoRepository
.WhereIf(!inQuery.TypeName.IsNullOrEmpty(),x=>x.TypeName==inQuery.TypeName)
+ .WhereIf(inQuery.OrganType!=null, x => x.OrganType == inQuery.OrganType)
.ProjectTo(_mapper.ConfigurationProvider);
return await organInfoQueryable.ToListAsync();
}