Browse Source

。。。

wangwei 6 years ago
parent
commit
f3fa3b8d0b

+ 0 - 16
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/controller/ExamController.java

@@ -367,22 +367,6 @@ public class ExamController extends ControllerSupport {
 		return examService.getOrgProperty(examId, accessUser.getOrgId(), key);
 	}
 
-	/**
-	 * 方法注释
-	 *
-	 * @author WANGWEI
-	 * @param id
-	 * @return
-	 */
-	@ApiOperation(value = "按ID删除考试批次", notes = "删除")
-	@DeleteMapping("{ids}")
-	public List<Long> deleteExam(@PathVariable String ids) {
-		List<Long> examIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
-				.collect(Collectors.toList());
-		examService.deleteExam(examIds);
-		return examIds;
-	}
-
 	@ApiOperation(value = "启用考试", notes = "启用考试")
 	@PutMapping("enable/{ids}")
 	public void enableUser(@PathVariable String ids) {

+ 0 - 23
examcloud-core-examwork-service/src/main/java/cn/com/qmth/examcloud/core/examwork/service/impl/ExamServiceImpl.java

@@ -1,7 +1,5 @@
 package cn.com.qmth.examcloud.core.examwork.service.impl;
 
-import java.util.Date;
-import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
@@ -54,27 +52,6 @@ public class ExamServiceImpl implements ExamService {
 	@Autowired
 	ExamOrgPropertyRepo examOrgPropertyRepo;
 
-	/**
-	 * 删除考试批次
-	 * 
-	 * @param ids
-	 * @return
-	 */
-	public void deleteExam(List<Long> ids) {
-		List<ExamEntity> exams = examRepo.findByIdIn(ids);
-		for (ExamEntity exam : exams) {
-			if (exam.getBeginTime().before(new Date())) {
-				throw new StatusException("", "[ " + exam.getName() + " ] 已经开考,不能删除");
-			}
-			// 删除学习中心特殊设置
-			examOrgSettingsRepo.deleteByExamId(exam.getId());
-			// 删除考生
-			examStudentService.deleteExamStudentsByExamId(exam.getId());
-			// 删除考试
-			examRepo.delete(exam);
-		}
-	}
-
 	/**
 	 * 方法注释
 	 *