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
40108bcc
Commit
40108bcc
authored
Mar 06, 2018
by
xingyuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.添加接口:根据章节ID和学生ID查询实验完成状态;
parent
a99826a7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
2 deletions
+42
-2
BChapterController.java
...soft/business/bchapter/controller/BChapterController.java
+15
-1
BChapterRepository.java
...org/rcisoft/business/bchapter/dao/BChapterRepository.java
+15
-0
BChapterService.java
...rg/rcisoft/business/bchapter/service/BChapterService.java
+5
-0
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+6
-0
Swagger2Config.java
src/main/java/org/rcisoft/config/Swagger2Config.java
+1
-1
No files found.
src/main/java/org/rcisoft/business/bchapter/controller/BChapterController.java
View file @
40108bcc
...
@@ -234,7 +234,21 @@ public class BChapterController extends PaginationController<BChapter> {
...
@@ -234,7 +234,21 @@ public class BChapterController extends PaginationController<BChapter> {
scoreInfoDTO
);
scoreInfoDTO
);
}
}
@ApiOperation
(
value
=
"根据学生ID(token判断获取)和章节ID查询该节的学习情况"
,
notes
=
"学习情况包括:分数、实验完成状态以及各个教学手段完成状态。"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"slId"
,
value
=
"开课ID"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"chapterId"
,
value
=
"章节ID"
,
required
=
true
,
dataType
=
"varchar"
),
})
@PreAuthorize
(
"hasRole('ROLE_1003')"
)
@GetMapping
(
value
=
"/queryChapStudyState"
)
public
Result
queryChapterStudyState
(
ScoreInfoDTO
scoreInfoDTO
)
throws
Exception
{
scoreInfoDTO
.
setStudentId
(
UserUtil
.
getUserInfoProp
(
getToken
(),
UserUtil
.
USER_ID
));
scoreInfoDTO
=
bChapterService
.
getChapInfoById
(
scoreInfoDTO
);
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
scoreInfoDTO
);
}
@ApiOperation
(
value
=
"更改章节状态"
,
notes
=
"根据章节ID更改章节状态"
)
@ApiOperation
(
value
=
"更改章节状态"
,
notes
=
"根据章节ID更改章节状态"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
),
...
...
src/main/java/org/rcisoft/business/bchapter/dao/BChapterRepository.java
View file @
40108bcc
...
@@ -86,6 +86,21 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
...
@@ -86,6 +86,21 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
@ResultMap
(
"QueryScoreListByChapterIdResultMap"
)
@ResultMap
(
"QueryScoreListByChapterIdResultMap"
)
List
<
StudentChapterScoreVO
>
queryScoreListByChapterId
(
@Param
(
"dto"
)
QueryScoreListDTO
dto
);
List
<
StudentChapterScoreVO
>
queryScoreListByChapterId
(
@Param
(
"dto"
)
QueryScoreListDTO
dto
);
/**
* 根据学生ID和章节ID查询该节的学习情况
* @param
* @return
*/
@Select
(
"<script>SELECT\n"
+
"\tt1.is_complete as isComplete\n"
+
"FROM\n"
+
"\tb_r_student_chapter t1\n"
+
"LEFT JOIN b_student t2 ON t1.student_id = t2.business_id\n"
+
"LEFT JOIN s_user t3 ON t3.login_name = t2.code\n"
+
"WHERE t1.chapter_id = #{chapterId} and t3.business_id = #{studentId}"
+
"</script>"
)
ScoreInfoDTO
queryChapInfoById
(
@Param
(
"chapterId"
)
String
chapterId
,
@Param
(
"studentId"
)
String
studentId
);
/**
/**
* 根据课程id和学生id查找该学生所学课程分数列表
* 根据课程id和学生id查找该学生所学课程分数列表
* @param slid
* @param slid
...
...
src/main/java/org/rcisoft/business/bchapter/service/BChapterService.java
View file @
40108bcc
...
@@ -92,6 +92,11 @@ public interface BChapterService{
...
@@ -92,6 +92,11 @@ public interface BChapterService{
*/
*/
void
updateIsComplete
(
ScoreInfoDTO
scoreInfoDTO
,
String
token
)
throws
Exception
;
void
updateIsComplete
(
ScoreInfoDTO
scoreInfoDTO
,
String
token
)
throws
Exception
;
/*
* 根据学生ID和章节ID查询该节的学习情况
* */
ScoreInfoDTO
getChapInfoById
(
ScoreInfoDTO
scoreInfoDTO
)
throws
Exception
;
int
addBslFormLesson
(
String
bLseeonId
,
String
lessonCode
,
String
businessId
);
int
addBslFormLesson
(
String
bLseeonId
,
String
lessonCode
,
String
businessId
);
int
updateChapterState
(
BChapter
bChapter
);
int
updateChapterState
(
BChapter
bChapter
);
...
...
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
40108bcc
...
@@ -221,6 +221,12 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -221,6 +221,12 @@ public class BChapterServiceImpl implements BChapterService {
throw
new
ServiceException
(
ResultServiceEnums
.
UPDATE_ERROR
);
throw
new
ServiceException
(
ResultServiceEnums
.
UPDATE_ERROR
);
}
}
@Override
public
ScoreInfoDTO
getChapInfoById
(
ScoreInfoDTO
scoreInfoDTO
)
throws
Exception
{
return
bChapterRepository
.
queryChapInfoById
(
scoreInfoDTO
.
getChapterId
(),
scoreInfoDTO
.
getStudentId
());
}
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Override
@Override
public
int
addBslFormLesson
(
String
bLessonId
,
String
lessonCode
,
String
slId
)
{
public
int
addBslFormLesson
(
String
bLessonId
,
String
lessonCode
,
String
slId
)
{
...
...
src/main/java/org/rcisoft/config/Swagger2Config.java
View file @
40108bcc
...
@@ -29,7 +29,7 @@ public class Swagger2Config {
...
@@ -29,7 +29,7 @@ public class Swagger2Config {
.
title
(
"教学实训平台"
)
.
title
(
"教学实训平台"
)
.
description
(
"教学实训平台"
)
.
description
(
"教学实训平台"
)
.
termsOfServiceUrl
(
"教学实训平台"
)
.
termsOfServiceUrl
(
"教学实训平台"
)
.
version
(
"
1
.0"
)
.
version
(
"
2
.0"
)
.
build
();
.
build
();
}
}
}
}
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