Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
f27f86a0
Commit
f27f86a0
authored
Dec 01, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0269469c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
DepartmentModule.cs
Edu.Module.User/DepartmentModule.cs
+6
-5
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+10
-0
No files found.
Edu.Module.User/DepartmentModule.cs
View file @
f27f86a0
...
@@ -141,7 +141,6 @@ namespace Edu.Module.User
...
@@ -141,7 +141,6 @@ namespace Edu.Module.User
{
{
deptList
=
new
List
<
RB_Department_ViewModel
>();
deptList
=
new
List
<
RB_Department_ViewModel
>();
}
}
//校区部门
//校区部门
List
<
DepartmentTree_ViewModel
>
schoolDeptList
=
new
List
<
DepartmentTree_ViewModel
>();
List
<
DepartmentTree_ViewModel
>
schoolDeptList
=
new
List
<
DepartmentTree_ViewModel
>();
if
(
schoolList
!=
null
)
if
(
schoolList
!=
null
)
...
@@ -155,7 +154,12 @@ namespace Edu.Module.User
...
@@ -155,7 +154,12 @@ namespace Edu.Module.User
ParentId
=
item
.
Dept_Id
,
ParentId
=
item
.
Dept_Id
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>()
ChildList
=
new
List
<
DepartmentTree_ViewModel
>()
};
};
tModel
.
ChildList
=
GetDeptTreeList
(
0
,
deptList
.
Where
(
qitem
=>
qitem
.
School_Id
>
0
).
ToList
(),
SchoolId
:
item
.
SId
,
null
);
var
currentSchoolDeptList
=
deptList
.
Where
(
qitem
=>
qitem
.
School_Id
==
item
.
SId
).
ToList
();
if
(
currentSchoolDeptList
!=
null
&&
currentSchoolDeptList
.
Count
>
0
)
{
var
currentSchoolDeptId
=
currentSchoolDeptList
?.
Min
(
qitem
=>
qitem
.
ParentId
)
??
0
;
tModel
.
ChildList
=
GetDeptTreeList
(
currentSchoolDeptId
,
currentSchoolDeptList
,
SchoolId
:
item
.
SId
,
null
);
}
schoolDeptList
.
Add
(
tModel
);
schoolDeptList
.
Add
(
tModel
);
}
}
}
}
...
@@ -191,8 +195,6 @@ namespace Edu.Module.User
...
@@ -191,8 +195,6 @@ namespace Edu.Module.User
return
list
;
return
list
;
}
}
/// <summary>
/// <summary>
/// 递归生成树形结构
/// 递归生成树形结构
...
@@ -202,7 +204,6 @@ namespace Edu.Module.User
...
@@ -202,7 +204,6 @@ namespace Edu.Module.User
private
List
<
DepartmentTree_ViewModel
>
GetDeptTreeList
(
int
parentId
,
List
<
RB_Department_ViewModel
>
sourceList
,
int
SchoolId
=
0
,
List
<
DepartmentTree_ViewModel
>
schoolDeptList
=
null
)
private
List
<
DepartmentTree_ViewModel
>
GetDeptTreeList
(
int
parentId
,
List
<
RB_Department_ViewModel
>
sourceList
,
int
SchoolId
=
0
,
List
<
DepartmentTree_ViewModel
>
schoolDeptList
=
null
)
{
{
List
<
DepartmentTree_ViewModel
>
treeList
=
new
List
<
DepartmentTree_ViewModel
>();
List
<
DepartmentTree_ViewModel
>
treeList
=
new
List
<
DepartmentTree_ViewModel
>();
foreach
(
var
item
in
sourceList
.
Where
(
qitem
=>
qitem
.
ParentId
==
parentId
&&
qitem
.
School_Id
==
SchoolId
))
foreach
(
var
item
in
sourceList
.
Where
(
qitem
=>
qitem
.
ParentId
==
parentId
&&
qitem
.
School_Id
==
SchoolId
))
{
{
DepartmentTree_ViewModel
model
=
new
DepartmentTree_ViewModel
()
DepartmentTree_ViewModel
model
=
new
DepartmentTree_ViewModel
()
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
f27f86a0
...
@@ -976,6 +976,16 @@ namespace Edu.WebApi.Controllers.User
...
@@ -976,6 +976,16 @@ namespace Edu.WebApi.Controllers.User
qitem
.
PostName
qitem
.
PostName
}));
}));
}
}
/// <summary>
/// 获取员工通讯录
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetEmployeeAddrBook
()
{
return
ApiResult
.
Failed
();
}
#
endregion
#
endregion
#
region
枚举相列表
#
region
枚举相列表
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment