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
57fd65a2
Commit
57fd65a2
authored
Jul 05, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1111
parent
1b74a3e2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
7 deletions
+39
-7
RB_Course_Chapter_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Course_Chapter_ViewModel.cs
+5
-0
RB_Course_ChapterRepository.cs
Edu.Repository/Course/RB_Course_ChapterRepository.cs
+4
-0
CourseController.cs
Edu.WebApi/Controllers/Course/CourseController.cs
+17
-4
ScrollController.cs
Edu.WebApi/Controllers/Course/ScrollController.cs
+13
-3
No files found.
Edu.Model/ViewModel/Course/RB_Course_Chapter_ViewModel.cs
View file @
57fd65a2
...
...
@@ -44,5 +44,10 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public
List
<
RB_Course_Words_Extend
>
WordsList
{
get
;
set
;
}
/// <summary>
/// 是否值查询根节点
/// </summary>
public
int
IsQRoot
{
get
;
set
;
}
}
}
Edu.Repository/Course/RB_Course_ChapterRepository.cs
View file @
57fd65a2
...
...
@@ -56,6 +56,10 @@ namespace Edu.Repository.Course
{
builder
.
AppendFormat
(
" AND {0}='{1}' "
,
nameof
(
RB_Course_Chapter_ViewModel
.
ChapterNo
),
query
.
ChapterNo
);
}
if
(
query
.
IsQRoot
==
1
)
{
builder
.
AppendFormat
(
" AND {0}=0 "
,
nameof
(
RB_Course_Chapter_ViewModel
.
ParentId
));
}
}
return
Get
<
RB_Course_Chapter_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
...
...
Edu.WebApi/Controllers/Course/CourseController.cs
View file @
57fd65a2
...
...
@@ -691,11 +691,24 @@ namespace Edu.WebApi.Controllers.Course
[
HttpPost
]
public
ApiResult
GetChapterList
()
{
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Course_Chapter_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Course_Chapter_ViewModel
()
{
CourseId
=
base
.
ParmJObj
.
GetInt
(
"CourseId"
),
IsQRoot
=
base
.
ParmJObj
.
GetInt
(
"IsQRoot"
),
};
if
(
query
.
CourseId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
message
:
"请传递课程编号!"
);
}
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
courseModule
.
GetChapterListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
var
list
=
courseModule
.
GetChapterListModule
(
query
).
OrderBy
(
qitem
=>
qitem
.
ChapterGradeNo
).
ToList
();
return
ApiResult
.
Success
(
data
:
list
.
Select
(
qitem
=>
new
{
qitem
.
ChapterId
,
qitem
.
ChapterNo
,
qitem
.
ChapterGradeNo
,
qitem
.
ChapterName
,
}));
}
/// <summary>
...
...
Edu.WebApi/Controllers/Course/ScrollController.cs
View file @
57fd65a2
...
...
@@ -1228,15 +1228,25 @@ namespace Edu.WebApi.Controllers.Course
var
sObj
=
JObject
.
Parse
(
ChapterList
[
i
].
ToString
());
;
var
chapterName
=
sObj
.
GetStringValue
(
"ChapterName"
);
int
State
=
sObj
.
GetInt
(
"State"
);
if
(
State
==
4
)
if
(
State
==
1
)
{
str
=
chapterName
;
dataRow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
str
)
{
FontColorEnum
=
ColorEnum
.
DarkBlue
});
}
else
if
(
State
==
2
)
{
str
=
"【补课】\r\n"
+
chapterName
;
dataRow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
str
)
{
FontColorEnum
=
ColorEnum
.
Red
});
}
else
if
(
State
==
3
)
{
str
=
"【缺课】\r\n"
+
chapterName
;
dataRow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
str
)
{
FontColorEnum
=
ColorEnum
.
Red
});
}
else
{
str
=
"【已上课】\r\n"
+
chapterName
;
dataRow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
str
)
{
FontColorEnum
=
ColorEnum
.
DarkBlue
}
);
str
=
chapterName
;
dataRow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
str
)
);
}
}
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