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
b9d89f22
Commit
b9d89f22
authored
Jul 02, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c0007e7b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
4 deletions
+29
-4
RB_Course_Chapter_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Course_Chapter_ViewModel.cs
+12
-0
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+15
-2
CourseController.cs
Edu.WebApi/Controllers/Course/CourseController.cs
+2
-2
No files found.
Edu.Model/ViewModel/Course/RB_Course_Chapter_ViewModel.cs
View file @
b9d89f22
...
...
@@ -13,5 +13,17 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public
string
CourseIds
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
decimal
OrderFileds
{
get
{
decimal
.
TryParse
(
this
.
ChapterNo
,
out
decimal
Num
);
return
Num
;
}
}
}
}
Edu.Module.Course/CourseModule.cs
View file @
b9d89f22
...
...
@@ -98,6 +98,11 @@ namespace Edu.Module.Course
/// </summary>
private
readonly
RB_ClassRepository
classRepository
=
new
RB_ClassRepository
();
/// <summary>
/// 班级基础配置仓储层对象
/// </summary>
private
readonly
RB_Class_ConfigRepository
class_ConfigRepository
=
new
RB_Class_ConfigRepository
();
#
region
课程管理
/// <summary>
...
...
@@ -480,7 +485,7 @@ namespace Edu.Module.Course
{
List
<
ChapterTree_ViewModel
>
resultList
=
new
List
<
ChapterTree_ViewModel
>();
//获取下级节点
var
subList
=
sourceList
?.
Where
(
qItem
=>
qItem
.
ParentId
==
parentId
).
OrderBy
(
qitem
=>
qitem
.
SortNum
).
ToList
();
var
subList
=
sourceList
?.
Where
(
qItem
=>
qItem
.
ParentId
==
parentId
).
OrderBy
(
qitem
=>
qitem
.
OrderFileds
).
ToList
();
//如果存在下级节点
if
(
subList
!=
null
&&
subList
.
Count
>
0
)
{
...
...
@@ -519,6 +524,10 @@ namespace Edu.Module.Course
public
bool
SetChapterModule
(
RB_Course_Chapter_ViewModel
model
)
{
bool
flag
;
if
(
model
.
StudyMinutes
>
0
)
{
model
.
StudyHours
=
model
.
StudyMinutes
/
class_ConfigRepository
.
GetBasicMinutesRepository
(
model
.
Group_Id
);
}
if
(
model
.
ChapterId
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
...
@@ -532,7 +541,6 @@ namespace Edu.Module.Course
{
nameof
(
RB_Course_Chapter_ViewModel
.
Objectives
)
,
model
.
Objectives
},
{
nameof
(
RB_Course_Chapter_ViewModel
.
Requirement
)
,
model
.
Requirement
},
{
nameof
(
RB_Course_Chapter_ViewModel
.
CourseRate
)
,
model
.
CourseRate
},
{
nameof
(
RB_Course_Chapter_ViewModel
.
CurrentHours
)
,
model
.
CurrentHours
},
};
flag
=
chapterRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_Chapter_ViewModel
.
ChapterId
),
model
.
ChapterId
));
}
...
...
@@ -607,6 +615,11 @@ namespace Edu.Module.Course
return
flag
;
}
/// <summary>
/// 设置章节名称
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetChapterNameModule
(
RB_Course_Chapter_ViewModel
model
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
...
Edu.WebApi/Controllers/Course/CourseController.cs
View file @
b9d89f22
...
...
@@ -436,8 +436,9 @@ namespace Edu.WebApi.Controllers.Course
Objectives
=
base
.
ParmJObj
.
GetStringValue
(
"Objectives"
),
Requirement
=
base
.
ParmJObj
.
GetStringValue
(
"Requirement"
),
CourseRate
=(
CourseRateEnum
)
base
.
ParmJObj
.
GetInt
(
"CourseRate"
),
CurrentHours
=
base
.
ParmJObj
.
GetInt
(
"CurrentHours"
),
//
CurrentHours=base.ParmJObj.GetInt("CurrentHours"),
};
extModel
.
Status
=
DateStateEnum
.
Normal
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
...
...
@@ -486,7 +487,6 @@ namespace Edu.WebApi.Controllers.Course
public
ApiResult
GetCourseRateEnumList
()
{
var
list
=
Common
.
Plugin
.
EnumHelper
.
EnumToList
(
typeof
(
CourseRateEnum
));
return
ApiResult
.
Success
(
data
:
list
);
}
...
...
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