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
7b1cc9a2
Commit
7b1cc9a2
authored
Nov 11, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into zql
parents
72161853
5c2a5eb7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+17
-14
No files found.
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
7b1cc9a2
...
...
@@ -373,17 +373,19 @@ public class BChapterServiceImpl implements BChapterService {
// 更新 学生针对此章节的中间表
List
<
BRStudentChapter
>
brStudentChapterList
=
brStudentChapterRepository
.
queryByStuIdAndChapter
(
chapterDTO
.
getBusinessId
(),
""
);
for
(
BRStudentChapter
studentChapter:
brStudentChapterList
){
double
learnProgress
=
Double
.
parseDouble
(
lessonPerson
.
getLearnProgress
().
split
(
"%"
)[
0
])
/
100
;
if
(
lessonPerson
.
getPersonId
().
equals
(
studentChapter
.
getStudentId
()))
{
double
learnProgress
=
Double
.
parseDouble
(
lessonPerson
.
getLearnProgress
().
split
(
"%"
)[
0
])
/
100
;
double
newLearnProgress
=
Double
.
parseDouble
(
numberFormat
.
format
((
float
)
(
learnProgress
*
Integer
.
parseInt
(
bLesson
.
getClassHour
())
-
studentChapter
.
getProgress
())
/
Float
.
parseFloat
(
bLesson
.
getClassHour
())));
if
(
newLearnProgress
==
0
)
{
if
(
newLearnProgress
==
0
)
{
lessonPerson
.
setIsFinish
(
"0"
);
lessonPerson
.
setFinishDate
(
null
);
}
if
(
0
<
newLearnProgress
&&
newLearnProgress
<
1
)
{
if
(
0
<
newLearnProgress
&&
newLearnProgress
<
1
)
{
lessonPerson
.
setIsFinish
(
"1"
);
lessonPerson
.
setFinishDate
(
null
);
}
lessonPerson
.
setLearnProgress
(
newLearnProgress
*
100
+
"%"
);
lessonPerson
.
setLearnProgress
(
newLearnProgress
*
100
+
"%"
);
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
lessonPerson
);
studentChapter
.
setProgress
(
0
);
studentChapter
.
setCurrentLocation
(
0
);
...
...
@@ -392,6 +394,7 @@ public class BChapterServiceImpl implements BChapterService {
}
}
}
}
//不是为添加章时插入资料表
if
(
StringUtils
.
isNotEmpty
(
model
.
getIsTest
()))
{
...
...
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