From 516ba4b650a58c367232273124a1ac966f35b5ca Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 23 十一月 2021 10:42:45 +0800
Subject: [PATCH] 专家资料查询

---
 zhengcaioa/Services/ExpertService.cs |   39 +++++++++++++++++++++++++++++++++++----
 1 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/zhengcaioa/Services/ExpertService.cs b/zhengcaioa/Services/ExpertService.cs
index d7fdd28..b0f17df 100644
--- a/zhengcaioa/Services/ExpertService.cs
+++ b/zhengcaioa/Services/ExpertService.cs
@@ -142,6 +142,22 @@
                         into csss
                          from ccc in csss.DefaultIfEmpty()
 
+                         join m in _context.PltUsers
+                     on a.Creater equals m.Id
+                     into msssss
+                         from mmm in msssss.DefaultIfEmpty()
+
+
+                         join n in _context.Areas
+                 on a.Province equals n.CodeId
+                 into nsssss
+                         from nnn in nsssss.DefaultIfEmpty()
+
+                         join o in _context.Areas
+                 on a.City equals o.CodeId
+                 into osssss
+                         from ooo in osssss.DefaultIfEmpty()
+
 
                          where a.RecStatus == "A"
                           && (searchEntity.JoinCount<=0 || hhh.JoinCount >= searchEntity.JoinCount)
@@ -169,6 +185,7 @@
                              Remark = a.Remark,
 
                              Creater = a.Creater,
+                             CreaterName = mmm.UserName,
                              Createtime = a.Createtime,
 
                              RecStatus = a.RecStatus,
@@ -184,8 +201,10 @@
                              
                              Sort = a.Sort,
                              ShenheStatus = a.ShenheStatus,
-                             
-                             
+
+                             AreaName = nnn.Name + "-" + ooo.Name,
+
+
                          }).ToList(); 
 
             if (!string.IsNullOrEmpty(searchEntity.Name))
@@ -236,7 +255,11 @@
             {
                 query = query.Where(m => m.Phone1.Contains(searchEntity.Phone1)).ToList();
             }
-
+            if (!string.IsNullOrEmpty(searchEntity.Creater))
+            {
+                query = query.Where(m => m.Creater == searchEntity.Creater).ToList();
+            }
+              
 
            query = query.OrderByDescending(x => x.Modifytime).ToList();
             //if (searchEntity.totalrows == 0)
@@ -266,9 +289,17 @@
             return result;
         }
 
-        public List<ExpertDTO> GetList()
+        public List<ExpertDTO> GetList(string[] id = null)
         {
             var listExperts = _context.Experts.Where(e => e.RecStatus == "A" && e.ShenheStatus == "A").ToList();
+
+            if (id != null)
+            {
+
+                listExperts = listExperts.Where(r => id.Contains(r.Id)).ToList();
+            }
+
+
             var list = _mapper.Map<List<ExpertDTO>>(listExperts);
             return list;
         }

--
Gitblit v1.9.1