|
@@ -213,7 +213,7 @@ public class SubjectServiceImpl extends MppServiceImpl<SubjectDao, SubjectEntity
|
|
if (CollectionUtils.isNotEmpty(subjects)) {
|
|
if (CollectionUtils.isNotEmpty(subjects)) {
|
|
Calendar now = Calendar.getInstance();
|
|
Calendar now = Calendar.getInstance();
|
|
long endTime = now.getTimeInMillis();
|
|
long endTime = now.getTimeInMillis();
|
|
- now.add(Calendar.MINUTE, -1);
|
|
|
|
|
|
+ now.add(Calendar.HOUR_OF_DAY, -1);
|
|
long startTime = now.getTimeInMillis();
|
|
long startTime = now.getTimeInMillis();
|
|
for (SubjectScanProgressVo vo : subjects) {
|
|
for (SubjectScanProgressVo vo : subjects) {
|
|
vo.setScannedCount(vo.getStudentCount() - vo.getUnexistCount());
|
|
vo.setScannedCount(vo.getStudentCount() - vo.getUnexistCount());
|
|
@@ -223,14 +223,14 @@ public class SubjectServiceImpl extends MppServiceImpl<SubjectDao, SubjectEntity
|
|
vo.setEstimation("-");
|
|
vo.setEstimation("-");
|
|
} else {
|
|
} else {
|
|
vo.setEstimation(Calculator.divide(
|
|
vo.setEstimation(Calculator.divide(
|
|
- Calculator.multiply(Calculator.divide(count, endTime - startTime), vo.getUnexistCount()),
|
|
|
|
- 3600000) + "h");
|
|
|
|
|
|
+ Calculator.multiply(Calculator.divide(count, endTime - startTime, 6), vo.getUnexistCount()),
|
|
|
|
+ 3600000, 2) + "h");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
int totalUnScanned = studentService.getUnscannedCountByExam(examId);
|
|
int totalUnScanned = studentService.getUnscannedCountByExam(examId);
|
|
int totalCount = studentService.getCountByExam(examId);
|
|
int totalCount = studentService.getCountByExam(examId);
|
|
ret.getTotal().setStudentCount(totalCount);
|
|
ret.getTotal().setStudentCount(totalCount);
|
|
- ret.getTotal().setScannedCount(totalCount-totalUnScanned);
|
|
|
|
|
|
+ ret.getTotal().setScannedCount(totalCount - totalUnScanned);
|
|
ret.getTotal().setUnexistCount(totalUnScanned);
|
|
ret.getTotal().setUnexistCount(totalUnScanned);
|
|
ret.getTotal().setProgress(
|
|
ret.getTotal().setProgress(
|
|
Calculator.percentage(ret.getTotal().getScannedCount(), ret.getTotal().getStudentCount(), 2));
|
|
Calculator.percentage(ret.getTotal().getScannedCount(), ret.getTotal().getStudentCount(), 2));
|
|
@@ -239,8 +239,8 @@ public class SubjectServiceImpl extends MppServiceImpl<SubjectDao, SubjectEntity
|
|
ret.getTotal().setEstimation("-");
|
|
ret.getTotal().setEstimation("-");
|
|
} else {
|
|
} else {
|
|
ret.getTotal().setEstimation(
|
|
ret.getTotal().setEstimation(
|
|
- Calculator.divide(Calculator.multiply(Calculator.divide(count, endTime - startTime),
|
|
|
|
- ret.getTotal().getUnexistCount()), 3600000) + "h");
|
|
|
|
|
|
+ Calculator.divide(Calculator.multiply(Calculator.divide(count, endTime - startTime, 6),
|
|
|
|
+ ret.getTotal().getUnexistCount()), 3600000, 2) + "h");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return ret;
|
|
return ret;
|