|
@@ -67,7 +67,7 @@ public class AssignTaskService {
|
|
randomBundleCount += 1;
|
|
randomBundleCount += 1;
|
|
}
|
|
}
|
|
List<MarkTask> markTaskList = markTaskRepo.findByWorkId(markSubject.getWorkId());
|
|
List<MarkTask> markTaskList = markTaskRepo.findByWorkId(markSubject.getWorkId());
|
|
- Map<Long, MarkTask> randomMap = markTaskList.stream().collect(Collectors.toMap(MarkTask::getRandomSeqNew, Function.identity(), (dto1, dto2) -> dto1));
|
|
|
|
|
|
+ Map<Long, Object> randomMap = markTaskList.stream().collect(Collectors.toMap(MarkTask::getRandomSeqNew, Function.identity(), (dto1, dto2) -> dto1));
|
|
for (int i = 0; i < randomBundleCount; i++) {
|
|
for (int i = 0; i < randomBundleCount; i++) {
|
|
int fromIndex = i * randomBundleSize;
|
|
int fromIndex = i * randomBundleSize;
|
|
int endIndex = i * randomBundleSize + randomBundleSize;
|
|
int endIndex = i * randomBundleSize + randomBundleSize;
|
|
@@ -123,8 +123,11 @@ public class AssignTaskService {
|
|
Iterator<Paper> iterator = papers.iterator();
|
|
Iterator<Paper> iterator = papers.iterator();
|
|
List<MarkTask> markTaskList = new ArrayList<>(papers.size() * sum);
|
|
List<MarkTask> markTaskList = new ArrayList<>(papers.size() * sum);
|
|
List<Paper> paperList = new ArrayList<>(papers.size());
|
|
List<Paper> paperList = new ArrayList<>(papers.size());
|
|
- List<MarkTask> markTasks = markTaskRepo.findByWorkId(markSubject.getWorkId());
|
|
|
|
- Map<Long, MarkTask> randomMap = markTasks.stream().collect(Collectors.toMap(MarkTask::getRandomSeqNew, Function.identity(), (dto1, dto2) -> dto1));
|
|
|
|
|
|
+// List<MarkTask> markTasks = markTaskRepo.findByWorkId(markSubject.getWorkId());
|
|
|
|
+// Map<Long, MarkTask> randomMap = markTasks.stream().collect(Collectors.toMap(MarkTask::getRandomSeqNew, Function.identity(), (dto1, dto2) -> dto1));
|
|
|
|
+ List<Object[]> markTasks = markTaskRepo.findAllByWorkId(markSubject.getWorkId());
|
|
|
|
+ Map<Long, Object> randomMap = new HashMap<>();
|
|
|
|
+ markTasks.forEach(m-> randomMap.put(Long.valueOf(m[1].toString()), m[0]));
|
|
//定序序号记录
|
|
//定序序号记录
|
|
Map map = new HashMap();
|
|
Map map = new HashMap();
|
|
while (iterator.hasNext()) {
|
|
while (iterator.hasNext()) {
|
|
@@ -278,7 +281,7 @@ public class AssignTaskService {
|
|
* @return
|
|
* @return
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
- public Long getRandom(Long markerId, Long paperId, Long workId, String examNumber, Map<Long, MarkTask> randomMap) throws Exception {
|
|
|
|
|
|
+ public Long getRandom(Long markerId, Long paperId, Long workId, String examNumber, Map<Long, Object> randomMap) throws Exception {
|
|
int count = 0;
|
|
int count = 0;
|
|
Long random = 0L;
|
|
Long random = 0L;
|
|
while (true) {
|
|
while (true) {
|