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
464ea544
Commit
464ea544
authored
Jan 11, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
8ae86737
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
9 deletions
+37
-9
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+19
-2
RB_StuWords_PrepRepository.cs
Edu.Repository/Exam/RB_StuWords_PrepRepository.cs
+9
-3
AppletIndexController.cs
Edu.WebApi/Controllers/Applet/AppletIndexController.cs
+9
-4
No files found.
Edu.Module.Course/ClassModule.cs
View file @
464ea544
...
...
@@ -31,6 +31,8 @@ using Edu.Repository.Sell;
using
Edu.Module.User
;
using
System.Web
;
using
Edu.Common.Enum.System
;
using
Edu.Repository.Exam
;
using
Edu.Model.ViewModel.Exam
;
namespace
Edu.Module.Course
{
...
...
@@ -205,6 +207,11 @@ namespace Edu.Module.Course
/// </summary>
private
readonly
RB_Class_FeedBackRepository
class_FeedBackRepository
=
new
RB_Class_FeedBackRepository
();
/// <summary>
/// 学员单词预习仓储层对象
/// </summary>
private
readonly
RB_StuWords_PrepRepository
stuWords_PrepRepository
=
new
RB_StuWords_PrepRepository
();
/// <summary>
/// 获取班级列表
/// </summary>
...
...
@@ -4850,7 +4857,7 @@ namespace Edu.Module.Course
/// </summary>
/// <param name="classId"></param>
/// <returns></returns>
public
object
GetIndexWords
(
int
classId
,
int
courseId
,
int
groupId
)
public
object
GetIndexWords
(
int
classId
,
int
courseId
,
int
groupId
,
int
Stu_Account_Id
=
0
)
{
int
NextCourseNo
=
0
,
ReviewCourseNo
=
0
;
var
planModel
=
class_PlanRepository
.
GetToDayClassPlan
(
classId
,
groupId
);
...
...
@@ -4900,13 +4907,23 @@ namespace Edu.Module.Course
{
ReviewNum
=
course_WordsRepository
.
GetCourseWordsNum
(
courseId
,
ReviewCourseNo
,
groupId
);
}
decimal
TotalScore
=
0
;
if
(
Stu_Account_Id
>
0
)
{
TotalScore
=
stuWords_PrepRepository
.
GetStuWordsPrepScoreRepository
(
new
RB_StuWords_Prep_Extend
()
{
CourseId
=
courseId
,
Stu_Account_Id
=
Stu_Account_Id
});
}
return
new
{
NextWord
=
NextNum
,
NextCourseNo
,
ReviewWord
=
ReviewNum
,
ReviewCourseNo
,
CourseId
=
courseId
CourseId
=
courseId
,
TotalScore
};
}
...
...
Edu.Repository/Exam/RB_StuWords_PrepRepository.cs
View file @
464ea544
...
...
@@ -49,10 +49,10 @@ namespace Edu.Repository.Exam
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_StuWords_Prep_Extend
>
GetStuWordsPrepPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_StuWords_Prep_Extend
query
)
public
decimal
GetStuWordsPrepScoreRepository
(
RB_StuWords_Prep_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT
A.*
FROM RB_StuWords_Prep AS A WHERE 1=1 "
);
builder
.
AppendFormat
(
@" SELECT
SUM(A.Score) AS Score
FROM RB_StuWords_Prep AS A WHERE 1=1 "
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
...
...
@@ -72,7 +72,13 @@ namespace Edu.Repository.Exam
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_StuWords_Prep_Extend
.
Stu_Account_Id
),
query
.
Stu_Account_Id
);
}
}
return
GetPage
<
RB_StuWords_Prep_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
decimal
totalScore
=
0
;
object
obj
=
base
.
ExecuteScalar
(
builder
.
ToString
());
if
(
obj
!=
null
)
{
decimal
.
TryParse
(
obj
.
ToString
(),
out
totalScore
);
}
return
totalScore
;
}
}
}
Edu.WebApi/Controllers/Applet/AppletIndexController.cs
View file @
464ea544
...
...
@@ -415,13 +415,15 @@ namespace Edu.WebApi.Controllers.Applet
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetMyStudyCourseInfo
()
{
public
ApiResult
GetMyStudyCourseInfo
()
{
var
appletUserInfo
=
base
.
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
base
.
RequestParm
.
Msg
.
ToString
());
int
ClassId
=
parms
.
GetInt
(
"ClassId"
,
0
);
//班级ID
int
CourseId
=
parms
.
GetInt
(
"CourseId"
,
0
);
//课程ID
int
GuestId
=
parms
.
GetInt
(
"GuestId"
,
0
);
//订单GuestId
if
(
ClassId
<=
0
)
{
if
(
ClassId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递班级ID"
);
}
//获取课程回顾
...
...
@@ -469,14 +471,17 @@ namespace Edu.WebApi.Controllers.Applet
var
Words
=
new
object
();
if
(
ClassId
>
0
&&
CourseId
>
0
)
{
Words
=
classModule
.
GetIndexWords
(
ClassId
,
CourseId
,
appletUserInfo
.
Group_Id
);
Words
=
classModule
.
GetIndexWords
(
ClassId
,
CourseId
,
appletUserInfo
.
Group_Id
,
appletUserInfo
.
Id
);
}
else
{
Words
=
new
{
NextWord
=
0
,
ReviewWord
=
0
NextCourseNo
=
0
,
ReviewWord
=
0
,
ReviewCourseNo
=
0
,
CourseId
=
CourseId
};
}
...
...
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