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