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
35f4257a
Commit
35f4257a
authored
Nov 16, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增字段
parent
d6a5a9c0
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
162 additions
and
8 deletions
+162
-8
RB_Assist.cs
Edu.Model/Entity/User/RB_Assist.cs
+11
-0
RB_Destination_ViewModel.cs
Edu.Model/ViewModel/System/RB_Destination_ViewModel.cs
+1
-1
RB_Assist_ViewModel.cs
Edu.Model/ViewModel/User/RB_Assist_ViewModel.cs
+10
-0
RB_Manager_ViewModel.cs
Edu.Model/ViewModel/User/RB_Manager_ViewModel.cs
+10
-0
RB_Post_ViewModel.cs
Edu.Model/ViewModel/User/RB_Post_ViewModel.cs
+5
-0
RB_Teacher_ViewModel.cs
Edu.Model/ViewModel/User/RB_Teacher_ViewModel.cs
+10
-0
AssistModule.cs
Edu.Module.User/AssistModule.cs
+34
-1
ManagerModule.cs
Edu.Module.User/ManagerModule.cs
+36
-2
TeacherModule.cs
Edu.Module.User/TeacherModule.cs
+34
-1
RB_PostRepository.cs
Edu.Repository/User/RB_PostRepository.cs
+8
-0
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+3
-3
No files found.
Edu.Model/Entity/User/RB_Assist.cs
View file @
35f4257a
...
...
@@ -87,5 +87,16 @@ namespace Edu.Model.Entity.User
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 部门编号
/// </summary>
public
int
Dept_Id
{
get
;
set
;
}
/// <summary>
/// 岗位编号
/// </summary>
public
int
Post_Id
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/System/RB_Destination_ViewModel.cs
View file @
35f4257a
...
...
@@ -11,7 +11,7 @@
public
string
NameStr
{
get
;
set
;
}
/// <summary>
///
多个编号【逗号分割】
///
多个编号【逗号分割】
/// </summary>
public
string
Ids
{
get
;
set
;
}
}
...
...
Edu.Model/ViewModel/User/RB_Assist_ViewModel.cs
View file @
35f4257a
...
...
@@ -64,5 +64,15 @@ namespace Edu.Model.ViewModel.User
/// 助教登录账号
/// </summary>
public
string
AssistAccount
{
get
;
set
;
}
/// <summary>
/// 部门名称
/// </summary>
public
string
DeptName
{
get
;
set
;
}
/// <summary>
/// 岗位名称
/// </summary>
public
string
PostName
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/User/RB_Manager_ViewModel.cs
View file @
35f4257a
...
...
@@ -49,5 +49,15 @@ namespace Edu.Model.ViewModel.User
/// 管理者账号
/// </summary>
public
string
ManagerAccount
{
get
;
set
;
}
/// <summary>
/// 部门名称
/// </summary>
public
string
DeptName
{
get
;
set
;
}
/// <summary>
/// 岗位名称
/// </summary>
public
string
PostName
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/User/RB_Post_ViewModel.cs
View file @
35f4257a
...
...
@@ -45,5 +45,10 @@ namespace Edu.Model.ViewModel.User
/// 所属部门
/// </summary>
public
string
DeptName
{
get
;
set
;
}
/// <summary>
/// 岗位编号查询
/// </summary>
public
string
QPostIds
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/User/RB_Teacher_ViewModel.cs
View file @
35f4257a
...
...
@@ -64,5 +64,15 @@ namespace Edu.Model.ViewModel.User
/// 教师账号
/// </summary>
public
string
TeacherAccount
{
get
;
set
;
}
/// <summary>
/// 部门名称
/// </summary>
public
string
DeptName
{
get
;
set
;
}
/// <summary>
/// 岗位名称
/// </summary>
public
string
PostName
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.User/AssistModule.cs
View file @
35f4257a
...
...
@@ -27,6 +27,16 @@ namespace Edu.Module.User
/// </summary>
private
readonly
AccountModule
accountModule
=
new
AccountModule
();
/// <summary>
/// 部门仓储层对象
/// </summary>
private
readonly
RB_DepartmentRepository
departmentRepository
=
new
RB_DepartmentRepository
();
/// <summary>
/// 岗位仓储层对象
/// </summary>
private
readonly
RB_PostRepository
postRepository
=
new
RB_PostRepository
();
/// <summary>
/// 获取助教列表
/// </summary>
...
...
@@ -48,7 +58,28 @@ namespace Edu.Module.User
/// <returns></returns>
public
List
<
RB_Assist_ViewModel
>
GetAssistPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Assist_ViewModel
query
)
{
return
assistRepository
.
GetAssistPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
assistRepository
.
GetAssistPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
string
postIds
=
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
Post_Id
>
0
).
Select
(
qitem
=>
qitem
.
Post_Id
));
string
deptIds
=
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
Dept_Id
>
0
).
Select
(
qitem
=>
qitem
.
Dept_Id
));
List
<
RB_Post_ViewModel
>
postList
=
new
List
<
RB_Post_ViewModel
>();
List
<
RB_Department_ViewModel
>
deptList
=
new
List
<
RB_Department_ViewModel
>();
if
(!
string
.
IsNullOrEmpty
(
postIds
))
{
postList
=
postRepository
.
GetPostListRepository
(
new
RB_Post_ViewModel
()
{
QPostIds
=
postIds
});
}
if
(!
string
.
IsNullOrEmpty
(
deptIds
))
{
deptList
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
QDeptIds
=
deptIds
});
}
foreach
(
var
item
in
list
)
{
item
.
DeptName
=
deptList
?.
Where
(
qitem
=>
qitem
.
DeptId
==
item
.
Dept_Id
)?.
FirstOrDefault
()?.
DeptName
??
""
;
item
.
PostName
=
postList
?.
Where
(
qitem
=>
qitem
.
PostId
==
item
.
Post_Id
)?.
FirstOrDefault
()?.
PostName
??
""
;
}
}
return
list
;
}
/// <summary>
...
...
@@ -71,6 +102,8 @@ namespace Edu.Module.User
{
nameof
(
RB_Assist
.
AssistIntro
),
model
.
AssistIntro
},
{
nameof
(
RB_Assist
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Assist
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Teacher_ViewModel
.
Dept_Id
),
model
.
Dept_Id
},
{
nameof
(
RB_Teacher_ViewModel
.
Post_Id
),
model
.
Post_Id
},
};
flag
=
assistRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Assist
.
AId
),
model
.
AId
));
}
...
...
Edu.Module.User/ManagerModule.cs
View file @
35f4257a
...
...
@@ -6,6 +6,7 @@ using Edu.Model.ViewModel.User;
using
Edu.Repository.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
VT.FW.DB
;
namespace
Edu.Module.User
...
...
@@ -25,6 +26,16 @@ namespace Edu.Module.User
/// </summary>
private
readonly
AccountModule
accountModule
=
new
AccountModule
();
/// <summary>
/// 岗位仓储层对象
/// </summary>
private
readonly
RB_PostRepository
postRepository
=
new
RB_PostRepository
();
/// <summary>
/// 部门仓储层对象
/// </summary>
private
readonly
RB_DepartmentRepository
departmentRepository
=
new
RB_DepartmentRepository
();
/// <summary>
/// 获取管理者列表
/// </summary>
...
...
@@ -45,7 +56,28 @@ namespace Edu.Module.User
/// <returns></returns>
public
List
<
RB_Manager_ViewModel
>
GetManagerPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Manager_ViewModel
query
)
{
return
managerRepository
.
GetManagerPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
managerRepository
.
GetManagerPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
string
postIds
=
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
Post_Id
>
0
).
Select
(
qitem
=>
qitem
.
Post_Id
));
string
deptIds
=
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
Dept_Id
>
0
).
Select
(
qitem
=>
qitem
.
Dept_Id
));
List
<
RB_Post_ViewModel
>
postList
=
new
List
<
RB_Post_ViewModel
>();
List
<
RB_Department_ViewModel
>
deptList
=
new
List
<
RB_Department_ViewModel
>();
if
(!
string
.
IsNullOrEmpty
(
postIds
))
{
postList
=
postRepository
.
GetPostListRepository
(
new
RB_Post_ViewModel
()
{
QPostIds
=
postIds
});
}
if
(!
string
.
IsNullOrEmpty
(
deptIds
))
{
deptList
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
QDeptIds
=
deptIds
});
}
foreach
(
var
item
in
list
)
{
item
.
DeptName
=
deptList
?.
Where
(
qitem
=>
qitem
.
DeptId
==
item
.
Dept_Id
)?.
FirstOrDefault
()?.
DeptName
??
""
;
item
.
PostName
=
postList
?.
Where
(
qitem
=>
qitem
.
PostId
==
item
.
Post_Id
)?.
FirstOrDefault
()?.
PostName
??
""
;
}
}
return
list
;
}
/// <summary>
...
...
@@ -66,6 +98,8 @@ namespace Edu.Module.User
{
nameof
(
RB_Manager_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Manager_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Manager_ViewModel
.
RoleAuth
),
model
.
RoleAuth
},
{
nameof
(
RB_Manager_ViewModel
.
Dept_Id
),
model
.
Dept_Id
},
{
nameof
(
RB_Manager_ViewModel
.
Post_Id
),
model
.
Post_Id
},
};
flag
=
managerRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Manager_ViewModel
.
MId
),
model
.
MId
));
}
...
...
@@ -157,7 +191,7 @@ namespace Edu.Module.User
UpdateTime
=
DateTime
.
Now
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
Status
=
model
.
Status
,
Status
=
model
.
Status
,
});
}
}
...
...
Edu.Module.User/TeacherModule.cs
View file @
35f4257a
...
...
@@ -27,6 +27,16 @@ namespace Edu.Module.User
/// </summary>
private
readonly
AccountModule
accountModule
=
new
AccountModule
();
/// <summary>
/// 岗位管理仓储层对象
/// </summary>
private
readonly
RB_PostRepository
postRepository
=
new
RB_PostRepository
();
/// <summary>
/// 部门管理仓储层对象
/// </summary>
private
readonly
RB_DepartmentRepository
departmentRepository
=
new
RB_DepartmentRepository
();
/// <summary>
/// 获取讲师列表
/// </summary>
...
...
@@ -48,7 +58,28 @@ namespace Edu.Module.User
/// <returns></returns>
public
List
<
RB_Teacher_ViewModel
>
GetTeacherPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Teacher_ViewModel
query
)
{
return
teacherRepository
.
GetTeacherPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
teacherRepository
.
GetTeacherPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
string
postIds
=
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
Post_Id
>
0
).
Select
(
qitem
=>
qitem
.
Post_Id
));
string
deptIds
=
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
Dept_Id
>
0
).
Select
(
qitem
=>
qitem
.
Dept_Id
));
List
<
RB_Post_ViewModel
>
postList
=
new
List
<
RB_Post_ViewModel
>();
List
<
RB_Department_ViewModel
>
deptList
=
new
List
<
RB_Department_ViewModel
>();
if
(!
string
.
IsNullOrEmpty
(
postIds
))
{
postList
=
postRepository
.
GetPostListRepository
(
new
RB_Post_ViewModel
()
{
QPostIds
=
postIds
});
}
if
(!
string
.
IsNullOrEmpty
(
deptIds
))
{
deptList
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
QDeptIds
=
deptIds
});
}
foreach
(
var
item
in
list
)
{
item
.
DeptName
=
deptList
?.
Where
(
qitem
=>
qitem
.
DeptId
==
item
.
Dept_Id
)?.
FirstOrDefault
()?.
DeptName
??
""
;
item
.
PostName
=
postList
?.
Where
(
qitem
=>
qitem
.
PostId
==
item
.
Post_Id
)?.
FirstOrDefault
()?.
PostName
??
""
;
}
}
return
list
;
}
/// <summary>
...
...
@@ -76,6 +107,8 @@ namespace Edu.Module.User
{
nameof
(
RB_Teacher_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Teacher_ViewModel
.
TeachTag
),
model
.
TeachTag
},
{
nameof
(
RB_Teacher_ViewModel
.
School_Id
),
model
.
School_Id
},
{
nameof
(
RB_Teacher_ViewModel
.
Dept_Id
),
model
.
Dept_Id
},
{
nameof
(
RB_Teacher_ViewModel
.
Post_Id
),
model
.
Post_Id
},
};
flag
=
teacherRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Teacher_ViewModel
.
TId
),
model
.
TId
));
}
...
...
Edu.Repository/User/RB_PostRepository.cs
View file @
35f4257a
...
...
@@ -83,6 +83,14 @@ WHERE 1=1
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Post_ViewModel
.
PostId
)}
=
{
query
.
PostId
}
"
);
}
if
(
query
.
RB_Dept_Id
>
0
)
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Post_ViewModel
.
RB_Dept_Id
)}
=
{
query
.
RB_Dept_Id
}
"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QPostIds
))
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Post_ViewModel
.
PostId
)}
IN(
{
query
.
QPostIds
}
) "
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
PostName
))
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Post_ViewModel
.
PostName
)}
LIKE @PostName "
);
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
35f4257a
...
...
@@ -78,10 +78,10 @@ namespace Edu.WebApi.Controllers.User
if
(
int
.
TryParse
(
RequestParm
.
Uid
,
out
int
uid
))
{
viewModel
.
Group_Id
=
UserReidsCache
.
GetUserLoginInfo
(
uid
).
Group_Id
;
var
result
=
accountModule
.
SetResetPassword
(
viewModel
);
if
(
re
sult
.
re
uslt
)
var
(
reuslt
,
newPass
)
=
accountModule
.
SetResetPassword
(
viewModel
);
if
(
reuslt
)
{
return
ApiResult
.
Success
(
$"密码重置成功,用户新密码为【
{
result
.
newPass
}
】,请复制保存"
);
return
ApiResult
.
Success
(
$"密码重置成功,用户新密码为【
{
newPass
}
】,请复制保存"
);
}
else
{
...
...
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