|
@@ -212,7 +212,7 @@ public class BatchImportExamStudentTask implements TaskService {
|
|
|
int runCount = successCount.get() + failCount.get();
|
|
|
log.info("总数:{} 成功数:{} 失败数:{} 已执行:{}条 已耗时:{}秒 平均每秒{}条 进度:{}% {}"
|
|
|
, total, successCount.get(), failCount.get(), runCount, cost, runCount / cost,
|
|
|
- runCount * 100f / total, predictTime(total, runCount, cost));
|
|
|
+ MathUtils.percentage(runCount, total), predictTime(total, runCount, cost));
|
|
|
}
|
|
|
|
|
|
log.info("----------> 分批集合{} size:{}", n + 1, cutTotal);
|
|
@@ -252,7 +252,7 @@ public class BatchImportExamStudentTask implements TaskService {
|
|
|
}
|
|
|
float nPerSecond = (float) finishCount / curCost;
|
|
|
float second = (totalCount - finishCount) / nPerSecond;
|
|
|
- return "剩:" + second / 60f + "分钟";
|
|
|
+ return "剩:" + MathUtils.round(second / 60f, 2) + "分钟";
|
|
|
}
|
|
|
|
|
|
private void normalRun(User loginUser, List<ExamStudentInfo> batchList, AtomicInteger successCount,
|
|
@@ -279,7 +279,7 @@ public class BatchImportExamStudentTask implements TaskService {
|
|
|
if (runCount % 20 == 0) {
|
|
|
log.info("总数:{} 成功数:{} 失败数:{} 已执行:{}条 已耗时:{}秒 平均每秒{}条 进度:{}%"
|
|
|
, batchList.size(), successCount.get(), failCount.get(), runCount, cost
|
|
|
- , runCount / cost, runCount * 100f / batchList.size());
|
|
|
+ , runCount / cost, MathUtils.percentage(runCount, batchList.size()));
|
|
|
}
|
|
|
}
|
|
|
}
|