From c64f579390decd190f20e9b280b92853ea3e2fbc Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 5 Dec 2023 20:50:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AF=B9=E4=BA=BA=E5=91=98=E8=BF=9B=E8=A1=8C=E7=AD=9B?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/LawyerArchivesController.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/24Hour/Controllers/Common/LawyerArchivesController.cs b/24Hour/Controllers/Common/LawyerArchivesController.cs index 3e5f300..1ec9a7f 100644 --- a/24Hour/Controllers/Common/LawyerArchivesController.cs +++ b/24Hour/Controllers/Common/LawyerArchivesController.cs @@ -81,6 +81,26 @@ namespace _24Hour.Controllers.Common var data = await _db.Queryable() .Where(x => x.unitCode == _userdata.unitCode && x.IsDeleted == 0 && x.isdeactivate == 0) .Where(x => x.identity == "律师") + .Take(500) + .ToListAsync(); + res.IsSucceed = true; + res.result = data; + return res; + } + /// + /// 获取当前登录人员的单位下所有的律师信息 + /// + /// + [HttpGet("GetLawyerByUnitCodeWithFilter")] + public async Task>> GetLawyerByUnitCodeWithFilter(string filter) + { + var res = new Result>(); + + var data = await _db.Queryable() + .Where(x => x.unitCode == _userdata.unitCode && x.IsDeleted == 0 && x.isdeactivate == 0) + .WhereIF(string.IsNullOrEmpty(filter) == false, x => x.cardId.Contains(filter) || x.identitycardId.Contains(filter) || x.name.Contains(filter) || x.departmentName.Contains(filter)) + .Where(x => x.identity == "律师") + .Take(100) .ToListAsync(); res.IsSucceed = true; res.result = data;