WANG 6 年之前
父节点
当前提交
16f2eac432

+ 4 - 8
examcloud-task-api-provider/src/main/java/cn/com/qmth/examcloud/task/api/controller/CopyExamStudentController.java

@@ -6,7 +6,6 @@ import java.util.Optional;
 import javax.transaction.Transactional;
 
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -39,9 +38,6 @@ import io.swagger.annotations.ApiOperation;
 @RequestMapping("${$rmp.ctr.task}" + "copyExamStudent")
 public class CopyExamStudentController extends ControllerSupport {
 
-	@Value("${$dir}")
-	private String dir;
-
 	@Autowired
 	CopyExamStudentRepo copyExamStudentRepo;
 
@@ -66,10 +62,10 @@ public class CopyExamStudentController extends ControllerSupport {
 		ExamBean exam2 = examCloudService.getExam(req).getExamBean();
 
 		CopyExamStudentPK pk = new CopyExamStudentPK(examId1, examId2);
-		 Optional<CopyExamStudentEntity> opt = copyExamStudentRepo.findById(pk);
-			CopyExamStudentEntity one =null;
-		 if (opt.isPresent()) {
-			 one=opt.get();
+		Optional<CopyExamStudentEntity> opt = copyExamStudentRepo.findById(pk);
+		CopyExamStudentEntity one = null;
+		if (opt.isPresent()) {
+			one = opt.get();
 		}
 		if (null != one && (!one.getStatus().equals(CopyExamStudentStatus.COMPLETE))) {
 			throw new StatusException("T-620001", "复制中,请勿重复操作");