|
@@ -39,7 +39,7 @@ public class RPCServiceImpl implements IRPCService {
|
|
|
List<Map<String,Object>> retList=new ArrayList<>();
|
|
|
for(TaskSubmit taskSubmit:submitList){
|
|
|
Map<String,Object> singleRecord=new HashMap<>();
|
|
|
- final List<TaskFile> fileList = taskFileRepository.findTaskFileByOwnerId(taskSubmit.getStudentId());
|
|
|
+ final List<TaskFile> fileList = taskFileRepository.findTaskFileByOwnerIdAndTaskId(taskSubmit.getStudentId(),id);
|
|
|
singleRecord.put("studentId",taskSubmit.getStudentId());
|
|
|
singleRecord.put("fileList",fileList);
|
|
|
retList.add(singleRecord);
|
|
@@ -129,4 +129,18 @@ public class RPCServiceImpl implements IRPCService {
|
|
|
}
|
|
|
return new Result(true,StatusCode.OK,"查询成功",result);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Result getTaskSubmit(Long id) {
|
|
|
+ final Optional<Task> taskOptional = taskRepository.findById(id);
|
|
|
+ if(!taskOptional.isPresent()){
|
|
|
+ return new Result(false, StatusCode.ERROR,"任务不存在");
|
|
|
+ }
|
|
|
+ final Task task = taskOptional.get();
|
|
|
+ if(!task.getSubmitType().equals(1)){
|
|
|
+ return new Result(false,StatusCode.ERROR,"提交方式不是文本格式");
|
|
|
+ }
|
|
|
+ final List<TaskSubmit> submitList = taskSubmitRepository.findTaskSubmitByTaskId(task.getId());
|
|
|
+ return new Result(true,StatusCode.OK,"查询成功",submitList);
|
|
|
+ }
|
|
|
}
|