Commit ba6f7abc authored by luzhuang's avatar luzhuang

Merge remote-tracking branch 'origin/meiteng' into meiteng

parents f6c2b985 b83cc998
......@@ -375,16 +375,18 @@ public class BChapterServiceImpl implements BChapterService {
for (BRStudentChapter studentChapter: brStudentChapterList){
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 (learnProgress > 0 && newLearnProgress < 0.01){
newLearnProgress = 0.01;
if (newLearnProgress == 0){
lessonPerson.setIsFinish("0");
lessonPerson.setFinishDate(null);
}
if (newLearnProgress < 1){
if (0 < newLearnProgress && newLearnProgress < 1){
lessonPerson.setIsFinish("1");
lessonPerson.setFinishDate(null);
}
lessonPerson.setLearnProgress(newLearnProgress*100 + "%");
bLessonPersonRepository.updateByPrimaryKeySelective(lessonPerson);
studentChapter.setProgress(0);
studentChapter.setCurrentLocation(0);
brStudentChapterRepository.updateById(studentChapter);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment