瀏覽代碼

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

yuanrf 2 年之前
父節點
當前提交
8361026a22
共有 1 個文件被更改,包括 18 次插入11 次删除
  1. 18 11
      OASystem/OASystem.Infrastructure/Repositories/System/UsersRepository.cs

+ 18 - 11
OASystem/OASystem.Infrastructure/Repositories/System/UsersRepository.cs

@@ -77,17 +77,24 @@ namespace OASystem.Infrastructure.Repositories.System
             }
             else if (portType == 2) //Android
             {
-                //List<UserView> _userDataList = _mapper.Map<List<UserView>>(_userList);
-                //if (_userDataList.Count != 0)
-                //{
-                //    result.Code = 0;
-                //    result.Msg = "成功!";
-                //    result.Data = _userDataList;
-                //}
-                //else
-                //{
-                //    result.Msg = "暂无数据!";
-                //}
+                string userSqlWhere = string.Format(@"Select su.CompanyId, sc.CompanyName,su.DepId,sd.DepName,su.JobPostId,sjp.JobName,
+                                                        su.Id UserId,su.CnName,su.CnName,su.Number,su.Ext,su.Phone,su.UrgentPhone,su.Email
+                                                      From Sys_Users su 
+                                                      Inner Join Sys_Company sc On su.CompanyId = sc.Id
+                                                      Inner Join Sys_Department sd On su.DepId = sd.Id
+                                                      Inner Join Sys_JobPost sjp On su.JobPostId = sjp.Id {0}", sqlWhere);
+                var _userList = await _sqlSugar.SqlQueryable<UserInfoWebView>(userSqlWhere).ToListAsync();
+
+                if (_userList.Count != 0)
+                {
+                    result.Code = 0;
+                    result.Msg = "成功!";
+                    result.Data = _userList;
+                }
+                else
+                {
+                    result.Msg = "暂无数据!";
+                }
             }
             else if (portType == 3) //IOS
             {