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
88cd1d5b
Commit
88cd1d5b
authored
Dec 14, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
d49a93e3
bca5cc00
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
327 additions
and
81 deletions
+327
-81
ClassLogTypeEnum.cs
Edu.Common/Enum/Course/ClassLogTypeEnum.cs
+0
-1
UserInfo.cs
Edu.Model/CacheModel/UserInfo.cs
+5
-0
RB_Class_Room_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_Room_ViewModel.cs
+5
-0
RB_Menu_Function_ViewModel.cs
Edu.Model/ViewModel/System/RB_Menu_Function_ViewModel.cs
+5
-0
RB_Teacher_ViewModel.cs
Edu.Model/ViewModel/User/RB_Teacher_ViewModel.cs
+2
-3
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+140
-20
TeachingRewardsModule.cs
Edu.Module.Course/TeachingRewardsModule.cs
+1
-1
MenuModule.cs
Edu.Module.System/MenuModule.cs
+22
-1
AssistModule.cs
Edu.Module.User/AssistModule.cs
+7
-15
TeacherModule.cs
Edu.Module.User/TeacherModule.cs
+7
-14
RB_Class_RoomRepository.cs
Edu.Repository/Course/RB_Class_RoomRepository.cs
+4
-0
RB_Class_LogRepository.cs
Edu.Repository/Log/RB_Class_LogRepository.cs
+10
-8
RB_Menu_FunctionRepository.cs
Edu.Repository/System/RB_Menu_FunctionRepository.cs
+40
-0
RB_AccountRepository.cs
Edu.Repository/User/RB_AccountRepository.cs
+2
-6
RB_TeacherRepository.cs
Edu.Repository/User/RB_TeacherRepository.cs
+2
-2
BaseController.cs
Edu.WebApi/Controllers/BaseController.cs
+20
-0
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+49
-9
LoginController.cs
Edu.WebApi/Controllers/User/LoginController.cs
+6
-0
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+0
-1
No files found.
Edu.Common/Enum/Course/ClassLogTypeEnum.cs
View file @
88cd1d5b
...
@@ -25,7 +25,6 @@ namespace Edu.Common.Enum.Course
...
@@ -25,7 +25,6 @@ namespace Edu.Common.Enum.Course
/// </summary>
/// </summary>
[
EnumField
(
"上课记录"
)]
[
EnumField
(
"上课记录"
)]
Class
=
3
,
Class
=
3
,
/// <summary>
/// <summary>
/// 创建班级
/// 创建班级
/// </summary>
/// </summary>
...
...
Edu.Model/CacheModel/UserInfo.cs
View file @
88cd1d5b
...
@@ -94,5 +94,10 @@ namespace Edu.Model.CacheModel
...
@@ -94,5 +94,10 @@ namespace Edu.Model.CacheModel
/// 岗位名称
/// 岗位名称
/// </summary>
/// </summary>
public
string
PostName
{
get
;
set
;
}
public
string
PostName
{
get
;
set
;
}
/// <summary>
/// 功能权限列表
/// </summary>
public
object
ActionMenuList
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/Course/RB_Class_Room_ViewModel.cs
View file @
88cd1d5b
...
@@ -37,5 +37,10 @@ namespace Edu.Model.ViewModel.Course
...
@@ -37,5 +37,10 @@ namespace Edu.Model.ViewModel.Course
/// 状态字符串
/// 状态字符串
/// </summary>
/// </summary>
public
string
StatusStr
{
get
{
return
this
.
Status
.
ToName
();
}
}
public
string
StatusStr
{
get
{
return
this
.
Status
.
ToName
();
}
}
/// <summary>
/// 教室编号【查询使用】
/// </summary>
public
string
QRoomIds
{
get
;
set
;
}
}
}
}
}
Edu.Model/ViewModel/System/RB_Menu_Function_ViewModel.cs
View file @
88cd1d5b
...
@@ -11,5 +11,10 @@ namespace Edu.Model.ViewModel.System
...
@@ -11,5 +11,10 @@ namespace Edu.Model.ViewModel.System
/// 菜单名称
/// 菜单名称
/// </summary>
/// </summary>
public
string
MenuName
{
get
;
set
;
}
public
string
MenuName
{
get
;
set
;
}
/// <summary>
/// 菜单列表
/// </summary>
public
string
MenuUrl
{
get
;
set
;
}
}
}
}
}
Edu.Model/ViewModel/User/RB_Teacher_ViewModel.cs
View file @
88cd1d5b
...
@@ -75,9 +75,8 @@ namespace Edu.Model.ViewModel.User
...
@@ -75,9 +75,8 @@ namespace Edu.Model.ViewModel.User
/// </summary>
/// </summary>
public
string
PostName
{
get
;
set
;
}
public
string
PostName
{
get
;
set
;
}
/// <summary>
/// 教师编号
/// 教师ids
/// </summary>
/// </summary>
public
string
Teacher
Ids
{
get
;
set
;
}
public
string
QT
Ids
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
Edu.Module.Course/ClassModule.cs
View file @
88cd1d5b
This diff is collapsed.
Click to expand it.
Edu.Module.Course/TeachingRewardsModule.cs
View file @
88cd1d5b
...
@@ -282,7 +282,7 @@ namespace Edu.Module.Course
...
@@ -282,7 +282,7 @@ namespace Edu.Module.Course
var
dlist
=
teaching_BonusDetailRepository
.
GetList
(
new
RB_Teaching_BonusDetail_ViewModel
()
{
Group_Id
=
dmodel
.
Group_Id
,
BonusIds
=
bonusIds
});
var
dlist
=
teaching_BonusDetailRepository
.
GetList
(
new
RB_Teaching_BonusDetail_ViewModel
()
{
Group_Id
=
dmodel
.
Group_Id
,
BonusIds
=
bonusIds
});
//获取所有的教师
//获取所有的教师
string
teacherIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
TeacherIds
));
string
teacherIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
TeacherIds
));
var
tlist
=
teacherRepository
.
GetTeacherListRepository
(
new
RB_Teacher_ViewModel
()
{
Group_Id
=
dmodel
.
Group_Id
,
Teacher
Ids
=
teacherIds
});
var
tlist
=
teacherRepository
.
GetTeacherListRepository
(
new
RB_Teacher_ViewModel
()
{
Group_Id
=
dmodel
.
Group_Id
,
QT
Ids
=
teacherIds
});
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
...
...
Edu.Module.System/MenuModule.cs
View file @
88cd1d5b
...
@@ -149,7 +149,7 @@ namespace Edu.Module.System
...
@@ -149,7 +149,7 @@ namespace Edu.Module.System
/// <returns></returns>
/// <returns></returns>
public
List
<
MenuTree_ViewModel
>
GetTreeMenuModule
(
RB_Menu_ViewModel
query
,
int
roleId
=
0
)
public
List
<
MenuTree_ViewModel
>
GetTreeMenuModule
(
RB_Menu_ViewModel
query
,
int
roleId
=
0
)
{
{
List
<
RB_Menu_ViewModel
>
list
=
new
List
<
RB_Menu_ViewModel
>()
;
List
<
RB_Menu_ViewModel
>
list
;
if
(
roleId
<=
0
)
if
(
roleId
<=
0
)
{
{
list
=
GetMenuListModule
(
query
);
list
=
GetMenuListModule
(
query
);
...
@@ -251,6 +251,27 @@ namespace Edu.Module.System
...
@@ -251,6 +251,27 @@ namespace Edu.Module.System
return
functionRepository
.
GetMenuFunctionListRepository
(
query
);
return
functionRepository
.
GetMenuFunctionListRepository
(
query
);
}
}
/// <summary>
/// 根据岗位编号获取岗位角色菜单功能权限
/// </summary>
/// <param name="postIds">岗位编号</param>
/// <returns></returns>
public
List
<
RB_Menu_Function_ViewModel
>
GetPostMenuFunctionListModule
(
string
postIds
)
{
return
functionRepository
.
GetPostMenuFunctionListRepository
(
postIds
);
}
/// <summary>
/// 判断用户是否有某项功能权限
/// </summary>
/// <param name="actionCode">权限编码</param>
/// <param name="postIds">岗位编号【可以多个】</param>
/// <returns></returns>
public
bool
CheckUserFunctionModule
(
string
actionCode
,
string
postIds
)
{
return
functionRepository
.
CheckUserFunctionRepository
(
actionCode
,
postIds
);
}
/// <summary>
/// <summary>
/// 新增修改菜单功能权限
/// 新增修改菜单功能权限
/// </summary>
/// </summary>
...
...
Edu.Module.User/AssistModule.cs
View file @
88cd1d5b
...
@@ -119,6 +119,10 @@ namespace Edu.Module.User
...
@@ -119,6 +119,10 @@ namespace Edu.Module.User
}
}
else
else
{
{
if
(
model
.
LeaveStatus
!=
LeaveStatusEnum
.
Departure
)
{
model
.
LeaveTime
=
null
;
}
fileds
.
Add
(
nameof
(
RB_Assist
.
IDCard
),
model
.
IDCard
);
fileds
.
Add
(
nameof
(
RB_Assist
.
IDCard
),
model
.
IDCard
);
fileds
.
Add
(
nameof
(
RB_Assist
.
Sex
),
model
.
Sex
);
fileds
.
Add
(
nameof
(
RB_Assist
.
Sex
),
model
.
Sex
);
fileds
.
Add
(
nameof
(
RB_Assist
.
EntryTime
),
model
.
EntryTime
);
fileds
.
Add
(
nameof
(
RB_Assist
.
EntryTime
),
model
.
EntryTime
);
...
@@ -203,7 +207,7 @@ namespace Edu.Module.User
...
@@ -203,7 +207,7 @@ namespace Edu.Module.User
/// <param name="model"></param>
/// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
/// <returns></returns>
/// <returns></returns>
public
bool
SetAssistDeptModule
(
RB_Assist
model
,
bool
isUpdateBasic
=
false
)
public
bool
SetAssistDeptModule
(
RB_Assist
model
)
{
{
bool
flag
;
bool
flag
;
if
(
model
.
AId
>
0
)
if
(
model
.
AId
>
0
)
...
@@ -211,21 +215,16 @@ namespace Edu.Module.User
...
@@ -211,21 +215,16 @@ namespace Edu.Module.User
var
oldModel
=
GetAssistModule
(
model
.
AId
);
var
oldModel
=
GetAssistModule
(
model
.
AId
);
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Assist
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Assist
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Assist
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Assist
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Assist
.
Dept_Id
),
model
.
Dept_Id
},
{
nameof
(
RB_Assist
.
Dept_Id
),
model
.
Dept_Id
},
// {nameof(RB_Assist.Post_Id),model.Post_Id },
};
};
string
logContent
=
""
;
string
logContent
=
""
;
if
(
model
.
Dept_Id
!=
oldModel
.
Dept_Id
)
if
(
model
.
Dept_Id
!=
oldModel
.
Dept_Id
)
{
{
var
deptList
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
QDeptIds
=
model
.
Dept_Id
+
","
+
oldModel
.
Dept_Id
});
var
deptList
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
QDeptIds
=
model
.
Dept_Id
+
","
+
oldModel
.
Dept_Id
});
logContent
+=
string
.
Format
(
",将部门由【{0}】修改为【{1}】。"
,
(
deptList
.
Where
(
qitem
=>
qitem
.
DeptId
==
oldModel
.
Dept_Id
)?.
FirstOrDefault
()?.
DeptName
??
""
),
(
deptList
.
Where
(
qitem
=>
qitem
.
DeptId
==
model
.
Dept_Id
)?.
FirstOrDefault
()?.
DeptName
??
""
));
logContent
+=
string
.
Format
(
",将部门由【{0}】修改为【{1}】。"
,
(
deptList
.
Where
(
qitem
=>
qitem
.
DeptId
==
oldModel
.
Dept_Id
)?.
FirstOrDefault
()?.
DeptName
??
""
),
(
deptList
.
Where
(
qitem
=>
qitem
.
DeptId
==
model
.
Dept_Id
)?.
FirstOrDefault
()?.
DeptName
??
""
));
}
}
if
(!
string
.
IsNullOrEmpty
(
logContent
))
if
(!
string
.
IsNullOrEmpty
(
logContent
))
{
{
//新增日志
//新增日志
...
@@ -249,7 +248,7 @@ namespace Edu.Module.User
...
@@ -249,7 +248,7 @@ namespace Edu.Module.User
/// <param name="model"></param>
/// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
/// <returns></returns>
/// <returns></returns>
public
bool
SetAssistPostModule
(
RB_Assist
model
,
bool
isUpdateBasic
=
false
)
public
bool
SetAssistPostModule
(
RB_Assist
model
)
{
{
bool
flag
;
bool
flag
;
if
(
model
.
AId
>
0
)
if
(
model
.
AId
>
0
)
...
@@ -261,15 +260,12 @@ namespace Edu.Module.User
...
@@ -261,15 +260,12 @@ namespace Edu.Module.User
{
nameof
(
RB_Assist
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Assist
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Assist
.
Post_Id
),
model
.
Post_Id
},
{
nameof
(
RB_Assist
.
Post_Id
),
model
.
Post_Id
},
};
};
string
logContent
=
""
;
string
logContent
=
""
;
if
(
model
.
Post_Id
!=
oldModel
.
Post_Id
)
if
(
model
.
Post_Id
!=
oldModel
.
Post_Id
)
{
{
var
postList
=
postRepository
.
GetPostListRepository
(
new
RB_Post_ViewModel
()
{
QPostIds
=
model
.
Post_Id
+
","
+
oldModel
.
Post_Id
});
var
postList
=
postRepository
.
GetPostListRepository
(
new
RB_Post_ViewModel
()
{
QPostIds
=
model
.
Post_Id
+
","
+
oldModel
.
Post_Id
});
logContent
+=
string
.
Format
(
",将岗位由【{0}】修改为【{1}】。"
,
(
postList
.
Where
(
qitem
=>
qitem
.
PostId
==
oldModel
.
Post_Id
)?.
FirstOrDefault
()?.
PostName
??
""
),
(
postList
.
Where
(
qitem
=>
qitem
.
PostId
==
model
.
Post_Id
)?.
FirstOrDefault
()?.
PostName
??
""
));
logContent
+=
string
.
Format
(
",将岗位由【{0}】修改为【{1}】。"
,
(
postList
.
Where
(
qitem
=>
qitem
.
PostId
==
oldModel
.
Post_Id
)?.
FirstOrDefault
()?.
PostName
??
""
),
(
postList
.
Where
(
qitem
=>
qitem
.
PostId
==
model
.
Post_Id
)?.
FirstOrDefault
()?.
PostName
??
""
));
}
}
if
(!
string
.
IsNullOrEmpty
(
logContent
))
if
(!
string
.
IsNullOrEmpty
(
logContent
))
{
{
//新增日志
//新增日志
...
@@ -291,9 +287,8 @@ namespace Edu.Module.User
...
@@ -291,9 +287,8 @@ namespace Edu.Module.User
/// 添加修改助教离职时间
/// 添加修改助教离职时间
/// </summary>
/// </summary>
/// <param name="model"></param>
/// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
/// <returns></returns>
/// <returns></returns>
public
bool
SetAssistLeaveTimeModule
(
RB_Assist
model
,
bool
isUpdateBasic
=
false
)
public
bool
SetAssistLeaveTimeModule
(
RB_Assist
model
)
{
{
bool
flag
;
bool
flag
;
if
(
model
.
AId
>
0
)
if
(
model
.
AId
>
0
)
...
@@ -307,9 +302,7 @@ namespace Edu.Module.User
...
@@ -307,9 +302,7 @@ namespace Edu.Module.User
{
nameof
(
RB_Assist
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Assist
.
UpdateTime
),
model
.
UpdateTime
},
};
};
string
logContent
=
""
;
string
logContent
=
""
;
if
(
model
.
LeaveStatus
!=
oldModel
.
LeaveStatus
)
if
(
model
.
LeaveStatus
!=
oldModel
.
LeaveStatus
)
{
{
logContent
+=
string
.
Format
(
",将在职状态由【{0}】修改为【{1}】。"
,
oldModel
.
LeaveStatus
.
ToName
(),
model
.
LeaveStatus
.
ToName
());
logContent
+=
string
.
Format
(
",将在职状态由【{0}】修改为【{1}】。"
,
oldModel
.
LeaveStatus
.
ToName
(),
model
.
LeaveStatus
.
ToName
());
...
@@ -318,7 +311,6 @@ namespace Edu.Module.User
...
@@ -318,7 +311,6 @@ namespace Edu.Module.User
{
{
logContent
+=
string
.
Format
(
",将离职时间由【{0}】修改为【{1}】。"
,
oldModel
?.
LeaveTime
,
model
.
LeaveTime
);
logContent
+=
string
.
Format
(
",将离职时间由【{0}】修改为【{1}】。"
,
oldModel
?.
LeaveTime
,
model
.
LeaveTime
);
}
}
if
(!
string
.
IsNullOrEmpty
(
logContent
))
if
(!
string
.
IsNullOrEmpty
(
logContent
))
{
{
//新增日志
//新增日志
...
...
Edu.Module.User/TeacherModule.cs
View file @
88cd1d5b
...
@@ -125,6 +125,10 @@ namespace Edu.Module.User
...
@@ -125,6 +125,10 @@ namespace Edu.Module.User
}
}
else
else
{
{
if
(
model
.
LeaveStatus
!=
LeaveStatusEnum
.
Departure
)
{
model
.
LeaveTime
=
null
;
}
fileds
.
Add
(
nameof
(
RB_Teacher_ViewModel
.
IDCard
),
model
.
IDCard
);
fileds
.
Add
(
nameof
(
RB_Teacher_ViewModel
.
IDCard
),
model
.
IDCard
);
fileds
.
Add
(
nameof
(
RB_Teacher_ViewModel
.
Sex
),
model
.
Sex
);
fileds
.
Add
(
nameof
(
RB_Teacher_ViewModel
.
Sex
),
model
.
Sex
);
fileds
.
Add
(
nameof
(
RB_Teacher_ViewModel
.
EntryTime
),
model
.
EntryTime
);
fileds
.
Add
(
nameof
(
RB_Teacher_ViewModel
.
EntryTime
),
model
.
EntryTime
);
...
@@ -201,9 +205,8 @@ namespace Edu.Module.User
...
@@ -201,9 +205,8 @@ namespace Edu.Module.User
/// 新增修改讲师
/// 新增修改讲师
/// </summary>
/// </summary>
/// <param name="model"></param>
/// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
/// <returns></returns>
/// <returns></returns>
public
bool
SetTeacherDeptModule
(
RB_Teacher_ViewModel
model
,
bool
isUpdateBasic
=
false
)
public
bool
SetTeacherDeptModule
(
RB_Teacher_ViewModel
model
)
{
{
bool
flag
;
bool
flag
;
if
(
model
.
TId
>
0
)
if
(
model
.
TId
>
0
)
...
@@ -211,7 +214,6 @@ namespace Edu.Module.User
...
@@ -211,7 +214,6 @@ namespace Edu.Module.User
var
oldModel
=
GetTeacherModule
(
model
.
TId
);
var
oldModel
=
GetTeacherModule
(
model
.
TId
);
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Teacher_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Teacher_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Teacher_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Teacher_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Teacher_ViewModel
.
Dept_Id
),
model
.
Dept_Id
},
{
nameof
(
RB_Teacher_ViewModel
.
Dept_Id
),
model
.
Dept_Id
},
...
@@ -223,7 +225,6 @@ namespace Edu.Module.User
...
@@ -223,7 +225,6 @@ namespace Edu.Module.User
var
deptList
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
QDeptIds
=
model
.
Dept_Id
+
","
+
oldModel
.
Dept_Id
});
var
deptList
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
QDeptIds
=
model
.
Dept_Id
+
","
+
oldModel
.
Dept_Id
});
logContent
+=
string
.
Format
(
",将部门由【{0}】修改为【{1}】。"
,
(
deptList
.
Where
(
qitem
=>
qitem
.
DeptId
==
oldModel
.
Dept_Id
)?.
FirstOrDefault
()?.
DeptName
??
""
),
(
deptList
.
Where
(
qitem
=>
qitem
.
DeptId
==
model
.
Dept_Id
)?.
FirstOrDefault
()?.
DeptName
??
""
));
logContent
+=
string
.
Format
(
",将部门由【{0}】修改为【{1}】。"
,
(
deptList
.
Where
(
qitem
=>
qitem
.
DeptId
==
oldModel
.
Dept_Id
)?.
FirstOrDefault
()?.
DeptName
??
""
),
(
deptList
.
Where
(
qitem
=>
qitem
.
DeptId
==
model
.
Dept_Id
)?.
FirstOrDefault
()?.
DeptName
??
""
));
}
}
if
(!
string
.
IsNullOrEmpty
(
logContent
))
if
(!
string
.
IsNullOrEmpty
(
logContent
))
{
{
//新增日志
//新增日志
...
@@ -245,9 +246,8 @@ namespace Edu.Module.User
...
@@ -245,9 +246,8 @@ namespace Edu.Module.User
/// 新增修改讲师
/// 新增修改讲师
/// </summary>
/// </summary>
/// <param name="model"></param>
/// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
/// <returns></returns>
/// <returns></returns>
public
bool
SetTeacherPostModule
(
RB_Teacher_ViewModel
model
,
bool
isUpdateBasic
=
false
)
public
bool
SetTeacherPostModule
(
RB_Teacher_ViewModel
model
)
{
{
bool
flag
;
bool
flag
;
if
(
model
.
TId
>
0
)
if
(
model
.
TId
>
0
)
...
@@ -255,20 +255,16 @@ namespace Edu.Module.User
...
@@ -255,20 +255,16 @@ namespace Edu.Module.User
var
oldModel
=
GetTeacherModule
(
model
.
TId
);
var
oldModel
=
GetTeacherModule
(
model
.
TId
);
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Teacher_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Teacher_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Teacher_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Teacher_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Teacher_ViewModel
.
Post_Id
),
model
.
Post_Id
},
{
nameof
(
RB_Teacher_ViewModel
.
Post_Id
),
model
.
Post_Id
},
};
};
string
logContent
=
""
;
string
logContent
=
""
;
if
(
model
.
Post_Id
!=
oldModel
.
Post_Id
)
if
(
model
.
Post_Id
!=
oldModel
.
Post_Id
)
{
{
var
postList
=
postRepository
.
GetPostListRepository
(
new
RB_Post_ViewModel
()
{
QPostIds
=
model
.
Post_Id
+
","
+
oldModel
.
Post_Id
});
var
postList
=
postRepository
.
GetPostListRepository
(
new
RB_Post_ViewModel
()
{
QPostIds
=
model
.
Post_Id
+
","
+
oldModel
.
Post_Id
});
logContent
+=
string
.
Format
(
",将岗位由【{0}】修改为【{1}】。"
,
(
postList
.
Where
(
qitem
=>
qitem
.
PostId
==
oldModel
.
Post_Id
)?.
FirstOrDefault
()?.
PostName
??
""
),
(
postList
.
Where
(
qitem
=>
qitem
.
PostId
==
model
.
Post_Id
)?.
FirstOrDefault
()?.
PostName
??
""
));
logContent
+=
string
.
Format
(
",将岗位由【{0}】修改为【{1}】。"
,
(
postList
.
Where
(
qitem
=>
qitem
.
PostId
==
oldModel
.
Post_Id
)?.
FirstOrDefault
()?.
PostName
??
""
),
(
postList
.
Where
(
qitem
=>
qitem
.
PostId
==
model
.
Post_Id
)?.
FirstOrDefault
()?.
PostName
??
""
));
}
}
if
(!
string
.
IsNullOrEmpty
(
logContent
))
if
(!
string
.
IsNullOrEmpty
(
logContent
))
{
{
//新增日志
//新增日志
...
@@ -290,9 +286,8 @@ namespace Edu.Module.User
...
@@ -290,9 +286,8 @@ namespace Edu.Module.User
/// 新增修改讲师
/// 新增修改讲师
/// </summary>
/// </summary>
/// <param name="model"></param>
/// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
/// <returns></returns>
/// <returns></returns>
public
bool
SetTeacherLeaveTimeModule
(
RB_Teacher_ViewModel
model
,
bool
isUpdateBasic
=
false
)
public
bool
SetTeacherLeaveTimeModule
(
RB_Teacher_ViewModel
model
)
{
{
bool
flag
;
bool
flag
;
if
(
model
.
TId
>
0
)
if
(
model
.
TId
>
0
)
...
@@ -300,13 +295,11 @@ namespace Edu.Module.User
...
@@ -300,13 +295,11 @@ namespace Edu.Module.User
var
oldModel
=
GetTeacherModule
(
model
.
TId
);
var
oldModel
=
GetTeacherModule
(
model
.
TId
);
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Teacher_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Teacher_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Teacher_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Teacher_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Teacher_ViewModel
.
LeaveStatus
),
model
.
LeaveStatus
},
{
nameof
(
RB_Teacher_ViewModel
.
LeaveStatus
),
model
.
LeaveStatus
},
{
nameof
(
RB_Teacher_ViewModel
.
LeaveTime
),
model
.
LeaveTime
}
{
nameof
(
RB_Teacher_ViewModel
.
LeaveTime
),
model
.
LeaveTime
}
};
};
string
logContent
=
""
;
string
logContent
=
""
;
if
(
model
.
LeaveStatus
!=
oldModel
.
LeaveStatus
)
if
(
model
.
LeaveStatus
!=
oldModel
.
LeaveStatus
)
{
{
...
...
Edu.Repository/Course/RB_Class_RoomRepository.cs
View file @
88cd1d5b
...
@@ -82,6 +82,10 @@ WHERE 1=1
...
@@ -82,6 +82,10 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND A.{0} LIKE @RoomName "
,
nameof
(
RB_Class_Room_ViewModel
.
RoomName
));
builder
.
AppendFormat
(
" AND A.{0} LIKE @RoomName "
,
nameof
(
RB_Class_Room_ViewModel
.
RoomName
));
parameters
.
Add
(
"RoomName"
,
"%"
+
query
.
RoomName
.
Trim
()
+
"%"
);
parameters
.
Add
(
"RoomName"
,
"%"
+
query
.
RoomName
.
Trim
()
+
"%"
);
}
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QRoomIds
))
{
builder
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Class_Room_ViewModel
.
RoomId
),
query
.
QRoomIds
);
}
}
}
return
Get
<
RB_Class_Room_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
return
Get
<
RB_Class_Room_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
...
...
Edu.Repository/Log/RB_Class_LogRepository.cs
View file @
88cd1d5b
using
Edu.Common.Enum.Course
;
using
Edu.Common.Enum.Course
;
using
Edu.Model.Entity.Log
;
using
Edu.Model.Entity.Log
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
...
@@ -56,16 +57,17 @@ WHERE 1=1
...
@@ -56,16 +57,17 @@ WHERE 1=1
/// <param name="School_Id">校区编号</param>
/// <param name="School_Id">校区编号</param>
/// <param name="CreateBy">创建人</param>
/// <param name="CreateBy">创建人</param>
/// <returns></returns>
/// <returns></returns>
public
bool
AddClassLogRepository
(
ClassLogTypeEnum
logType
,
string
LogContent
,
int
ClassId
,
int
Group_Id
,
int
School_Id
,
int
CreateBy
)
public
bool
AddClassLogRepository
(
RB_Class_Log
model
)
{
{
var
model
=
new
RB_Class_Log
()
var
new
model
=
new
RB_Class_Log
()
{
{
LogType
=
logType
,
LogType
=
model
.
LogType
,
LogContent
=
LogContent
,
LogContent
=
model
.
LogContent
.
TrimStart
(
','
).
TrimEnd
(
','
).
TrimStart
(
'、'
).
TrimEnd
(
'、'
),
ClassId
=
ClassId
,
ClassId
=
model
.
ClassId
,
Group_Id
=
Group_Id
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
School_Id
,
School_Id
=
model
.
School_Id
,
CreateBy
=
CreateBy
CreateBy
=
model
.
CreateBy
,
CreateTime
=
DateTime
.
Now
,
};
};
return
base
.
Insert
(
model
)
>
0
;
return
base
.
Insert
(
model
)
>
0
;
}
}
...
...
Edu.Repository/System/RB_Menu_FunctionRepository.cs
View file @
88cd1d5b
using
Edu.Common.Enum
;
using
Edu.Common.Enum
;
using
Edu.Model.Entity.System
;
using
Edu.Model.Entity.System
;
using
Edu.Model.ViewModel.System
;
using
Edu.Model.ViewModel.System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
...
@@ -78,5 +79,44 @@ WHERE 1=1
...
@@ -78,5 +79,44 @@ WHERE 1=1
return
new
List
<
RB_Menu_Function_ViewModel
>();
return
new
List
<
RB_Menu_Function_ViewModel
>();
}
}
}
}
/// <summary>
/// 根据岗位编号获取岗位角色菜单功能权限
/// </summary>
/// <param name="postIds">岗位编号</param>
/// <returns></returns>
public
List
<
RB_Menu_Function_ViewModel
>
GetPostMenuFunctionListRepository
(
string
postIds
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,IFNULL(B.MenuName,'') AS MenuName,IFNULL(B.MenuUrl,'') AS MenuUrl
FROM RB_Menu_Function AS A LEFT JOIN rb_menu AS B ON A.MenuId=B.MenuId
WHERE 1=1 AND A.Id IN(SELECT Action_Id FROM rb_role_functionpermission WHERE Role_Id IN (SELECT RoleId FROM rb_post_role WHERE PostId IN({0})))
"
,
postIds
);
return
Get
<
RB_Menu_Function_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 判断用户是否有某项功能权限
/// </summary>
/// <param name="actionCode">权限编码</param>
/// <param name="postIds">岗位编号【可以多个】</param>
/// <returns></returns>
public
bool
CheckUserFunctionRepository
(
string
actionCode
,
string
postIds
)
{
int
result
=
0
;
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT 1
FROM RB_Menu_Function AS A
WHERE 1=1 AND A.FunctionCode='{0}' AND A.Id IN(SELECT Action_Id FROM rb_role_functionpermission WHERE Role_Id IN (SELECT RoleId FROM rb_post_role WHERE PostId IN({1})))
"
,
actionCode
.
Trim
(),
postIds
);
var
obj
=
base
.
ExecuteScalar
(
builder
.
ToString
());
if
(
obj
!=
null
)
{
Int32
.
TryParse
(
obj
.
ToString
(),
out
result
);
}
return
result
>
0
;
}
}
}
}
}
\ No newline at end of file
Edu.Repository/User/RB_AccountRepository.cs
View file @
88cd1d5b
...
@@ -215,10 +215,6 @@ FROM
...
@@ -215,10 +215,6 @@ FROM
{
{
where
.
AppendFormat
(
" AND A.{0}='{1}' "
,
nameof
(
Employee_ViewModel
.
Account
),
query
.
Account
.
Trim
());
where
.
AppendFormat
(
" AND A.{0}='{1}' "
,
nameof
(
Employee_ViewModel
.
Account
),
query
.
Account
.
Trim
());
}
}
//if (query.Id > 0)
//{
// where.AppendFormat(" AND A.{0}={1} ", nameof(Employee_ViewModel.Id), query.Id);
//}
if
(!
string
.
IsNullOrEmpty
(
query
.
QIds
))
if
(!
string
.
IsNullOrEmpty
(
query
.
QIds
))
{
{
where
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
Employee_ViewModel
.
Id
),
query
.
QIds
);
where
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
Employee_ViewModel
.
Id
),
query
.
QIds
);
...
@@ -270,11 +266,11 @@ FROM
...
@@ -270,11 +266,11 @@ FROM
}
}
if
(!
string
.
IsNullOrEmpty
(
query
.
StartLeaveTime
))
if
(!
string
.
IsNullOrEmpty
(
query
.
StartLeaveTime
))
{
{
where
.
AppendFormat
(
" AND b.{0}>='{1}' "
,
nameof
(
Employee_ViewModel
.
LeaveTime
),
query
.
StartLeaveTime
);
where
.
AppendFormat
(
" AND
B.LeaveStatus=4 AND
b.{0}>='{1}' "
,
nameof
(
Employee_ViewModel
.
LeaveTime
),
query
.
StartLeaveTime
);
}
}
if
(!
string
.
IsNullOrEmpty
(
query
.
EndLeaveTime
))
if
(!
string
.
IsNullOrEmpty
(
query
.
EndLeaveTime
))
{
{
where
.
AppendFormat
(
" AND b.{0}<='{1} 23:59:59' "
,
nameof
(
Employee_ViewModel
.
LeaveTime
),
query
.
EndLeaveTime
);
where
.
AppendFormat
(
" AND
B.LeaveStatus=4 AND
b.{0}<='{1} 23:59:59' "
,
nameof
(
Employee_ViewModel
.
LeaveTime
),
query
.
EndLeaveTime
);
}
}
if
(!
string
.
IsNullOrEmpty
(
query
.
StartBirthDate
))
if
(!
string
.
IsNullOrEmpty
(
query
.
StartBirthDate
))
{
{
...
...
Edu.Repository/User/RB_TeacherRepository.cs
View file @
88cd1d5b
...
@@ -69,9 +69,9 @@ WHERE 1=1
...
@@ -69,9 +69,9 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Teacher_ViewModel
.
TId
),
query
.
TId
);
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Teacher_ViewModel
.
TId
),
query
.
TId
);
}
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Teacher
Ids
))
if
(!
string
.
IsNullOrEmpty
(
query
.
QT
Ids
))
{
{
builder
.
AppendFormat
(
" AND t.{0}
in({1}) "
,
nameof
(
RB_Teacher_ViewModel
.
TId
),
query
.
Teacher
Ids
);
builder
.
AppendFormat
(
" AND t.{0}
IN({1}) "
,
nameof
(
RB_Teacher_ViewModel
.
TId
),
query
.
QT
Ids
);
}
}
}
}
return
Get
<
RB_Teacher_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
return
Get
<
RB_Teacher_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
...
...
Edu.WebApi/Controllers/BaseController.cs
View file @
88cd1d5b
...
@@ -8,6 +8,7 @@ using Newtonsoft.Json;
...
@@ -8,6 +8,7 @@ using Newtonsoft.Json;
using
Newtonsoft.Json.Linq
;
using
Newtonsoft.Json.Linq
;
using
Edu.Model.CacheModel
;
using
Edu.Model.CacheModel
;
using
Edu.Cache.User
;
using
Edu.Cache.User
;
using
Edu.Module.System
;
namespace
Edu.WebApi.Controllers
namespace
Edu.WebApi.Controllers
{
{
...
@@ -17,6 +18,10 @@ namespace Edu.WebApi.Controllers
...
@@ -17,6 +18,10 @@ namespace Edu.WebApi.Controllers
[
EnableCors
(
"AllowCors"
)]
[
EnableCors
(
"AllowCors"
)]
public
class
BaseController
:
ControllerBase
public
class
BaseController
:
ControllerBase
{
{
/// <summary>
/// 菜单处理类对象
/// </summary>
private
readonly
MenuModule
menuModule
=
new
MenuModule
();
/// <summary>
/// <summary>
/// 整理前端传递的post参数
/// 整理前端传递的post参数
...
@@ -72,5 +77,20 @@ namespace Edu.WebApi.Controllers
...
@@ -72,5 +77,20 @@ namespace Edu.WebApi.Controllers
return
userInfo
;
return
userInfo
;
}
}
}
}
/// <summary>
/// 判断用户是否有功能权限
/// </summary>
/// <param name="actionCode">权限编码</param>
/// <returns></returns>
public
bool
CheckUserActionAuth
(
string
actionCode
)
{
bool
flag
=
false
;
if
(
this
.
UserInfo
!=
null
&&
this
.
UserInfo
.
PostId
>
0
)
{
flag
=
menuModule
.
CheckUserFunctionModule
(
actionCode
,
this
.
UserInfo
.
PostId
.
ToString
());
}
return
flag
;
}
}
}
}
}
\ No newline at end of file
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
88cd1d5b
...
@@ -287,7 +287,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -287,7 +287,7 @@ namespace Edu.WebApi.Controllers.Course
public
ApiResult
RemoveClassPlan
()
public
ApiResult
RemoveClassPlan
()
{
{
var
ClassPlanId
=
base
.
ParmJObj
.
GetInt
(
"ClassPlanId"
);
var
ClassPlanId
=
base
.
ParmJObj
.
GetInt
(
"ClassPlanId"
);
var
flag
=
classModule
.
RemoveClassPlanModule
(
ClassPlanId
);
var
flag
=
classModule
.
RemoveClassPlanModule
(
ClassPlanId
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
...
@@ -343,7 +343,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -343,7 +343,7 @@ namespace Edu.WebApi.Controllers.Course
}
}
}
}
}
}
var
flag
=
classModule
.
SetClassPlanModule
(
extModel
);
var
flag
=
classModule
.
SetClassPlanModule
(
extModel
,
base
.
UserInfo
.
Id
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
...
@@ -359,7 +359,8 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -359,7 +359,8 @@ namespace Edu.WebApi.Controllers.Course
public
ApiResult
GetClassStudent
()
public
ApiResult
GetClassStudent
()
{
{
var
classId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
);
var
classId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
);
var
data
=
classModule
.
GetClassStudentListModule
(
classId
);
var
schoolId
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
);
var
data
=
classModule
.
GetClassStudentListModule
(
classId
,
schoolId
,
base
.
UserInfo
.
Group_Id
);
return
ApiResult
.
Success
(
data
:
data
);
return
ApiResult
.
Success
(
data
:
data
);
}
}
...
@@ -395,11 +396,10 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -395,11 +396,10 @@ namespace Edu.WebApi.Controllers.Course
}
}
}
}
}
}
var
orderGuestList
=
classModule
.
GetOrderGuest
(
new
RB_Order_Guest_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
School_Id
=
data
.
School_Id
,
ClassId
=
data
.
ClassId
});
var
orderGuestList
=
classModule
.
GetOrderGuest
(
new
RB_Order_Guest_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
School_Id
=
data
.
School_Id
,
ClassId
=
data
.
ClassId
});
var
checkLogList
=
classModule
.
GetClassCheckListRepository
(
new
RB_Class_Check_ViewModel
{
Group_Id
=
data
.
Group_Id
,
School_Id
=
data
.
School_Id
,
ClassId
=
data
.
ClassId
,
StartDate
=
data
.
ClassDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
EndDate
=
data
.
ClassDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
});
var
checkLogList
=
classModule
.
GetClassCheckListRepository
(
new
RB_Class_Check_ViewModel
{
Group_Id
=
data
.
Group_Id
,
School_Id
=
data
.
School_Id
,
ClassId
=
data
.
ClassId
,
StartDate
=
data
.
ClassDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
EndDate
=
data
.
ClassDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
});
List
<
object
>
guestList
=
new
List
<
object
>();
List
<
object
>
guestList
=
new
List
<
object
>();
foreach
(
var
item
in
orderGuestList
)
foreach
(
var
item
in
orderGuestList
.
Where
(
x
=>
x
.
GuestState
==
1
)
)
{
{
guestList
.
Add
(
new
guestList
.
Add
(
new
{
{
...
@@ -411,10 +411,10 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -411,10 +411,10 @@ namespace Edu.WebApi.Controllers.Course
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
item
.
Mobile
,
item
.
Mobile
,
item
.
OrderId
,
item
.
OrderId
,
IsCheck
=
(
checkLogList
!=
null
&&
checkLogList
.
Any
())
?
checkLogList
.
Where
(
x
=>
x
.
OrderGuestId
==
item
.
Id
).
FirstOrDefault
()?.
CheckStatus
??
-
1
:
-
1
IsCheck
=
(
checkLogList
!=
null
&&
checkLogList
.
Any
())
?
checkLogList
.
Where
(
x
=>
x
.
OrderGuestId
==
item
.
Id
).
FirstOrDefault
()?.
CheckStatus
??
-
1
:
-
1
});
});
}
}
return
ApiResult
.
Success
(
data
:
new
{
data
.
TeacherName
,
data
.
RoomName
,
TotalHour
=
Convert
.
ToInt32
(
totalMinutes
/
60
),
ClassNum
=
Convert
.
ToInt32
(
totalMinutes
/
45
),
ClassDate
=
data
.
ClassDate
.
ToString
(
"yyyy-MM-dd"
),
GuestList
=
guestList
});
return
ApiResult
.
Success
(
data
:
new
{
data
.
TeacherName
,
data
.
RoomName
,
TotalHour
=
Convert
.
ToInt32
(
totalMinutes
/
60
),
ClassNum
=
Convert
.
ToInt32
(
totalMinutes
/
45
),
ClassDate
=
data
.
ClassDate
.
ToString
(
"yyyy-MM-dd"
),
GuestList
=
guestList
});
}
}
/// <summary>
/// <summary>
...
@@ -437,7 +437,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -437,7 +437,7 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
Failed
(
"班级信息不存在"
);
return
ApiResult
.
Failed
(
"班级信息不存在"
);
}
}
bool
result
=
classModule
.
UpdateClassStudentDropOutModule
(
ids
,
dropOutRemark
,
classId
,
base
.
UserInfo
.
Id
,
classModel
.
Group_Id
,
classModel
.
School_Id
,
studentName
);
bool
result
=
classModule
.
UpdateClassStudentDropOutModule
(
ids
,
dropOutRemark
,
classId
,
base
.
UserInfo
.
Id
,
classModel
.
Group_Id
,
classModel
.
School_Id
,
studentName
);
return
ApiResult
.
Success
();
return
result
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
...
@@ -459,8 +459,9 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -459,8 +459,9 @@ namespace Edu.WebApi.Controllers.Course
model
.
UpdateBy
=
base
.
UserInfo
.
Id
;
model
.
UpdateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateTime
=
System
.
DateTime
.
Now
;
model
.
CreateTime
=
System
.
DateTime
.
Now
;
model
.
UpdateTime
=
model
.
CreateTime
;
model
.
UpdateTime
=
model
.
CreateTime
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
bool
result
=
classModule
.
AddClassStudentDropOutModule
(
model
,
base
.
UserInfo
.
AccountName
);
bool
result
=
classModule
.
AddClassStudentDropOutModule
(
model
,
base
.
UserInfo
.
AccountName
);
return
ApiResult
.
Success
();
return
result
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
/// <summary>
/// <summary>
/// 获取教室页列表
/// 获取教室页列表
...
@@ -553,6 +554,45 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -553,6 +554,45 @@ namespace Edu.WebApi.Controllers.Course
return
result
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
"签到失败"
);
return
result
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
"签到失败"
);
}
}
/// <summary>
/// 获取班级日志
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetClassLogPageList
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Class_Log_ViewModel
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
),
ClassId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
classModule
.
GetClassLogPageListRepository
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
{
if
(
item
.
CreateBy
>
0
)
{
item
.
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
;
}
}
var
resultList
=
list
.
Select
(
x
=>
new
{
LogTypeStr
=
EnumHelper
.
ToName
(
x
.
LogType
),
x
.
LogContent
,
CreateYear
=
x
.
CreateTime
.
ToString
(
"yyyy"
),
CreateMonth
=
x
.
CreateTime
.
ToString
(
"MM"
),
CreateDay
=
x
.
CreateTime
.
ToString
(
"dd"
),
CreatHour
=
x
.
CreateTime
.
ToString
(
"HH:mm:ss"
),
x
.
CreateByName
});
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
resultList
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
#
endregion
#
endregion
#
region
获取学员信息
#
region
获取学员信息
...
...
Edu.WebApi/Controllers/User/LoginController.cs
View file @
88cd1d5b
...
@@ -91,6 +91,8 @@ namespace Edu.WebApi.Controllers.User
...
@@ -91,6 +91,8 @@ namespace Edu.WebApi.Controllers.User
{
{
MenuType
=
accountType
MenuType
=
accountType
},
postIds
:
model
.
Post_Id
.
ToString
());
},
postIds
:
model
.
Post_Id
.
ToString
());
//获取功能权限列表
var
actionList
=
menuModule
.
GetPostMenuFunctionListModule
(
model
.
Post_Id
.
ToString
());
UserInfo
obj
=
new
UserInfo
UserInfo
obj
=
new
UserInfo
{
{
Id
=
model
.
Id
,
Id
=
model
.
Id
,
...
@@ -110,6 +112,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -110,6 +112,7 @@ namespace Edu.WebApi.Controllers.User
DeptName
=
model
.
DeptName
,
DeptName
=
model
.
DeptName
,
PostId
=
model
.
Post_Id
,
PostId
=
model
.
Post_Id
,
PostName
=
model
.
PostName
,
PostName
=
model
.
PostName
,
ActionMenuList
=
actionList
?.
Select
(
qitem
=>
new
{
qitem
.
FunctionCode
,
qitem
.
FunctionName
,
qitem
.
MenuName
,
qitem
.
MenuUrl
}),
};
};
UserReidsCache
.
UserInfoSet
(
Cache
.
CacheKey
.
User_Login_Key
+
model
.
Id
,
obj
,
Common
.
Config
.
JwtExpirTime
);
UserReidsCache
.
UserInfoSet
(
Cache
.
CacheKey
.
User_Login_Key
+
model
.
Id
,
obj
,
Common
.
Config
.
JwtExpirTime
);
return
ApiResult
.
Success
(
data
:
obj
);
return
ApiResult
.
Success
(
data
:
obj
);
...
@@ -143,6 +146,9 @@ namespace Edu.WebApi.Controllers.User
...
@@ -143,6 +146,9 @@ namespace Edu.WebApi.Controllers.User
MenuType
=
(
int
)
userInfo
.
AccountType
MenuType
=
(
int
)
userInfo
.
AccountType
},
userInfo
.
PostId
.
ToString
());
},
userInfo
.
PostId
.
ToString
());
userInfo
.
MenuList
=
treeList
;
userInfo
.
MenuList
=
treeList
;
//获取功能权限列表
var
actionList
=
menuModule
.
GetPostMenuFunctionListModule
(
userInfo
.
PostId
.
ToString
());
userInfo
.
ActionMenuList
=
actionList
?.
Select
(
qitem
=>
new
{
qitem
.
FunctionCode
,
qitem
.
FunctionName
,
qitem
.
MenuName
,
qitem
.
MenuUrl
});
}
}
return
ApiResult
.
Success
(
data
:
userInfo
);
return
ApiResult
.
Success
(
data
:
userInfo
);
}
}
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
88cd1d5b
...
@@ -671,7 +671,6 @@ namespace Edu.WebApi.Controllers.User
...
@@ -671,7 +671,6 @@ namespace Edu.WebApi.Controllers.User
pageModel
.
PageData
=
list
.
Select
((
qitem
,
i
)
=>
new
pageModel
.
PageData
=
list
.
Select
((
qitem
,
i
)
=>
new
{
{
Id
=
(
pageModel
.
PageSize
*
(
pageModel
.
PageIndex
-
1
))
+
i
+
1
,
Id
=
(
pageModel
.
PageSize
*
(
pageModel
.
PageIndex
-
1
))
+
i
+
1
,
// qitem.Id,
qitem
.
UserIcon
,
qitem
.
UserIcon
,
qitem
.
EmployeeName
,
qitem
.
EmployeeName
,
qitem
.
SchoolName
,
qitem
.
SchoolName
,
...
...
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