wangwei %!s(int64=6) %!d(string=hai) anos
pai
achega
d16c8548ac

+ 450 - 449
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/controller/ExamStudentController.java

@@ -1,449 +1,450 @@
-package cn.com.qmth.examcloud.core.examwork.api.controller;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import javax.persistence.criteria.Predicate;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.PageRequest;
-import org.springframework.data.domain.Sort;
-import org.springframework.data.domain.Sort.Direction;
-import org.springframework.data.jpa.domain.Specification;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.google.common.collect.Lists;
-
-import cn.com.qmth.examcloud.commons.base.exception.StatusException;
-import cn.com.qmth.examcloud.commons.base.util.PathUtil;
-import cn.com.qmth.examcloud.commons.web.helpers.page.PageInfo;
-import cn.com.qmth.examcloud.commons.web.security.bean.User;
-import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
-import cn.com.qmth.examcloud.core.basic.api.CourseCloudService;
-import cn.com.qmth.examcloud.core.basic.api.OrgCloudService;
-import cn.com.qmth.examcloud.core.basic.api.StudentCloudService;
-import cn.com.qmth.examcloud.core.basic.api.bean.OrgBean;
-import cn.com.qmth.examcloud.core.basic.api.bean.StudentBean;
-import cn.com.qmth.examcloud.core.basic.api.request.GetOrgReq;
-import cn.com.qmth.examcloud.core.basic.api.request.GetStudentReq;
-import cn.com.qmth.examcloud.core.basic.api.request.SaveStudentReq;
-import cn.com.qmth.examcloud.core.basic.api.response.GetOrgResp;
-import cn.com.qmth.examcloud.core.basic.api.response.GetStudentResp;
-import cn.com.qmth.examcloud.core.basic.api.response.SaveStudentResp;
-import cn.com.qmth.examcloud.core.examwork.api.controller.bean.ExamStudentDomain;
-import cn.com.qmth.examcloud.core.examwork.dao.ExamRepo;
-import cn.com.qmth.examcloud.core.examwork.dao.ExamStudentRepo;
-import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamEntity;
-import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamStudentEntity;
-import cn.com.qmth.examcloud.core.examwork.service.ExamStudentService;
-import cn.com.qmth.examcloud.core.examwork.service.bean.ExamStudentInfo;
-import cn.com.qmth.examcloud.core.oe.admin.api.ExamRecordCloudService;
-import cn.com.qmth.examcloud.core.oe.admin.api.request.CheckExamIsStartedReq;
-import cn.com.qmth.examcloud.core.oe.admin.api.response.CheckExamIsStartedResp;
-import io.swagger.annotations.ApiOperation;
-
-/**
- * 考生服务API Created by songyue on 17/1/13.
- */
-@Transactional
-@RestController
-@RequestMapping("${$rmp.ctr.examwork}/exam_student")
-public class ExamStudentController extends ControllerSupport {
-
-	@Autowired
-	ExamStudentRepo examStudentRepo;
-
-	@Autowired
-	ExamStudentService examStudentService;
-
-	@Autowired
-	ExamRepo examRepo;
-
-	@Autowired
-	StudentCloudService studentCloudService;
-
-	@Autowired
-	CourseCloudService courseCloudService;
-
-	@Autowired
-	OrgCloudService orgCloudService;
-
-	@Autowired
-	ExamRecordCloudService examRecordCloudService;
-
-	/**
-	 * 方法注释
-	 *
-	 * @author WANGWEI
-	 * @param studentId
-	 * @return
-	 */
-	@ApiOperation(value = "查询学生的所有考试")
-	@GetMapping("byStudentId/{studentId}")
-	public List<ExamStudentEntity> getExamStudentListByStudentId(@PathVariable Long studentId) {
-
-		return examStudentRepo.findByStudentId(studentId);
-	}
-
-	/**
-	 * 重构
-	 *
-	 * @author WANGWEI
-	 * @param examCriteria
-	 * @param curPage
-	 * @param pageSize
-	 * @return
-	 */
-	@ApiOperation(value = "查询考试学生带条件和分页", notes = "带条件带分页")
-	@GetMapping("examStudentPage/{curPage}/{pageSize}")
-	public PageInfo<ExamStudentDomain> getExamStudentPage(@PathVariable Integer curPage,
-			@PathVariable Integer pageSize, @RequestParam(required = false) Long orgId,
-			@RequestParam(required = false) Long examId,
-			@RequestParam(required = false) String studentName,
-			@RequestParam(required = false) String studentCode,
-			@RequestParam(required = false) Long courseId,
-			@RequestParam(required = false) String courseCode,
-			@RequestParam(required = false) String courseLevel,
-			@RequestParam(required = false) String courseName,
-			@RequestParam(required = false) String examSite,
-			@RequestParam(required = false) String identityNumber,
-			@RequestParam(required = false) Boolean identityNumberLike,
-			@RequestParam(required = false) String specialtyName,
-			@RequestParam(required = false) String infoCollector,
-			@RequestParam(required = false) Boolean withStarted) {
-
-		User accessUser = getAccessUser();
-
-		final Boolean finalIdentityNumberLike = null == identityNumberLike
-				? true
-				: identityNumberLike;
-
-		Specification<ExamStudentEntity> specification = (root, query, cb) -> {
-			List<Predicate> predicates = new ArrayList<>();
-			predicates.add(cb.equal(root.get("rootOrgId"), accessUser.getRootOrgId()));
-
-			if (null != orgId) {
-				predicates.add(cb.equal(root.get("orgId"), orgId));
-			}
-
-			if (null != examId) {
-				predicates.add(cb.equal(root.get("examId"), examId));
-			}
-			if (StringUtils.isNotEmpty(studentName)) {
-				predicates.add(cb.like(root.get("name"), toSqlSearchPattern(studentName)));
-			}
-			if (StringUtils.isNotEmpty(studentCode)) {
-				predicates.add(cb.like(root.get("studentCode"), toSqlSearchPattern(studentCode)));
-			}
-			if (null != courseId) {
-				predicates.add(cb.equal(root.get("courseId"), courseId));
-			}
-			if (StringUtils.isNotEmpty(courseCode)) {
-				predicates.add(cb.equal(root.get("courseCode"), courseCode));
-			}
-			if (StringUtils.isNotEmpty(courseLevel)) {
-				predicates.add(cb.equal(root.get("courseLevel"), courseLevel));
-			}
-			if (StringUtils.isNotEmpty(courseName)) {
-				predicates.add(cb.like(root.get("courseName"), toSqlSearchPattern(courseName)));
-			}
-			if (!StringUtils.isEmpty(examSite)) {
-				predicates.add(cb.like(root.get("examSite"), toSqlSearchPattern(examSite)));
-			}
-			if (StringUtils.isNotEmpty(identityNumber)) {
-				if (finalIdentityNumberLike) {
-					predicates.add(cb.like(root.get("identityNumber"),
-							toSqlSearchPattern(identityNumber)));
-				} else {
-					predicates.add(cb.equal(root.get("identityNumber"), identityNumber));
-				}
-			}
-			if (StringUtils.isNotEmpty(specialtyName)) {
-				predicates
-						.add(cb.like(root.get("specialtyName"), toSqlSearchPattern(specialtyName)));
-			}
-			if (StringUtils.isNotEmpty(infoCollector)) {
-				predicates
-						.add(cb.like(root.get("infoCollector"), toSqlSearchPattern(infoCollector)));
-			}
-
-			return cb.and(predicates.toArray(new Predicate[predicates.size()]));
-		};
-
-		PageRequest pageRequest = new PageRequest(curPage, pageSize,
-				new Sort(Direction.DESC, "updateTime"));
-
-		Page<ExamStudentEntity> examStudents = examStudentRepo.findAll(specification, pageRequest);
-
-		List<ExamStudentDomain> ret = Lists.newArrayList();
-
-		for (ExamStudentEntity cur : examStudents) {
-			ExamEntity exam = examRepo.findOne(cur.getExamId());
-
-			GetOrgReq getOrgReq = new GetOrgReq();
-			getOrgReq.setOrgId(cur.getOrgId());
-			GetOrgResp getOrgResp = orgCloudService.getOrg(getOrgReq);
-			OrgBean org = getOrgResp.getOrg();
-
-			GetStudentReq getStudentReq = new GetStudentReq();
-			getStudentReq.setRootOrgId(accessUser.getRootOrgId());
-			getStudentReq.setIdentityNumber(cur.getIdentityNumber());
-			GetStudentResp getStudentResp = studentCloudService.getStudent(getStudentReq);
-			StudentBean studentBean = getStudentResp.getStudentInfo();
-
-			Boolean started = null;
-			if (null != withStarted && withStarted) {
-				CheckExamIsStartedReq checkExamIsStartedReq = new CheckExamIsStartedReq();
-				checkExamIsStartedReq.setExamId(exam.getId());
-				checkExamIsStartedReq.setCourseId(cur.getCourseId());
-				checkExamIsStartedReq.setStudentId(studentBean.getId());
-				checkExamIsStartedReq.setExamId(exam.getId());
-				try {
-					CheckExamIsStartedResp checkExamIsStartedResp = examRecordCloudService
-							.checkExamIsStarted(checkExamIsStartedReq);
-					started = checkExamIsStartedResp.getIsStarted();
-				} catch (Exception e) {
-					log.error("fail to invoke remote method: checkExamIsStarted()", e);
-				}
-
-			}
-
-			ExamStudentDomain bean = new ExamStudentDomain();
-			bean.setRootOrgId(cur.getRootOrgId());
-			bean.setId(cur.getId());
-			bean.setExamId(exam.getId());
-			bean.setExamName(exam.getName());
-			bean.setStudentId(cur.getStudentId());
-			bean.setStudentName(cur.getName());
-			bean.setStudentCode(cur.getStudentCode());
-			bean.setIdentityNumber(cur.getIdentityNumber());
-			bean.setCourseId(cur.getCourseId());
-			bean.setCourseCode(cur.getCourseCode());
-			bean.setCourseName(cur.getCourseName());
-			bean.setCourseLevel(cur.getCourseLevel());
-			bean.setInfoCollector(cur.getInfoCollector());
-			bean.setOrgId(cur.getOrgId());
-			bean.setOrgCode(org.getCode());
-			bean.setOrgName(org.getName());
-			bean.setPaperType(cur.getPaperType());
-			bean.setPhone(studentBean.getPhoneNumber());
-			bean.setGrade(cur.getGrade());
-			bean.setSpecialtyName(cur.getSpecialtyName());
-			bean.setExamSite(cur.getExamSite());
-			bean.setExamType(exam.getExamType().name());
-			bean.setUpdateTime(cur.getUpdateTime());
-			bean.setEnable(cur.getEnable());
-			bean.setLocked(
-					null == exam.getExamStudentLocked() ? false : exam.getExamStudentLocked());
-			bean.setStarted(started);
-
-			bean.setExt1(cur.getExt1());
-			bean.setExt2(cur.getExt2());
-			bean.setExt3(cur.getExt3());
-			bean.setExt4(cur.getExt4());
-			bean.setExt5(cur.getExt5());
-			ret.add(bean);
-		}
-		return new PageInfo<ExamStudentDomain>(examStudents, ret);
-	}
-
-	/**
-	 * 方法注释
-	 *
-	 * @author WANGWEI
-	 * @param id
-	 * @return
-	 */
-	@ApiOperation(value = "按ID查询考试学生", notes = "ID查询")
-	@GetMapping("{id}")
-	public ExamStudentEntity getExamStudentById(@PathVariable Long id) {
-		ExamStudentEntity es = examStudentRepo.findOne(id);
-		if (null == es) {
-			throw new StatusException("E-520001", "考生不存在");
-		}
-		return es;
-	}
-
-	/**
-	 * 方法注释
-	 *
-	 * @author WANGWEI
-	 * @param examStudent
-	 * @return
-	 */
-	@Transactional
-	@ApiOperation(value = "新增考试学生", notes = "新增")
-	@PostMapping()
-	public ExamStudentDomain addExamStudent(@RequestBody ExamStudentDomain examStudent) {
-		trim(examStudent);
-		Long rootOrgId = getRootOrgId();
-		examStudent.setRootOrgId(rootOrgId);
-		examStudent.setInfoCollector(examStudent.getInfoCollector());
-		return saveExamStudent(examStudent);
-	}
-
-	/**
-	 * 方法注释
-	 *
-	 * @author WANGWEI
-	 * @param examStudent
-	 * @return
-	 */
-	@Transactional
-	@ApiOperation(value = "更新考试学生", notes = "更新")
-	@PutMapping()
-	public ExamStudentDomain updateExamStudent(@RequestBody ExamStudentDomain examStudent) {
-		trim(examStudent);
-		Long rootOrgId = getRootOrgId();
-		examStudent.setRootOrgId(rootOrgId);
-		examStudent.setInfoCollector(examStudent.getInfoCollector());
-		return saveExamStudent(examStudent);
-	}
-
-	/**
-	 * 方法注释
-	 *
-	 * @author WANGWEI
-	 * @param examStudent
-	 * @return
-	 */
-	private ExamStudentDomain saveExamStudent(ExamStudentDomain examStudent) {
-		SaveStudentReq saveStudentReq = new SaveStudentReq();
-		saveStudentReq.setIdentityNumber(examStudent.getIdentityNumber().toUpperCase(Locale.US));
-		saveStudentReq.setName(examStudent.getStudentName());
-		saveStudentReq.setPhoneNumber(examStudent.getPhone());
-		saveStudentReq.setOrgId(examStudent.getOrgId());
-		saveStudentReq.setRemark(examStudent.getRemark());
-		saveStudentReq.setRootOrgId(examStudent.getRootOrgId());
-		saveStudentReq.setStudentCode(examStudent.getStudentCode());
-
-		SaveStudentResp saveStudentResp = studentCloudService.saveStudent(saveStudentReq);
-
-		Long studentId = saveStudentResp.getStudentId();
-
-		ExamStudentInfo info = new ExamStudentInfo();
-		info.setCourseId(examStudent.getCourseId());
-		info.setExamId(examStudent.getExamId());
-		info.setIdentityNumber(examStudent.getIdentityNumber());
-		info.setPaperType(examStudent.getPaperType());
-		info.setRootOrgId(examStudent.getRootOrgId());
-		info.setStudentCode(examStudent.getStudentCode());
-		info.setStudentName(examStudent.getStudentName());
-		info.setStudentId(studentId);
-		info.setInfoCollector(examStudent.getInfoCollector());
-		info.setGrade(examStudent.getGrade());
-		info.setExamSite(examStudent.getExamSite());
-		info.setSpecialtyName(examStudent.getSpecialtyName());
-		info.setRemark(examStudent.getRemark());
-
-		info.setExt1(examStudent.getExt1());
-		info.setExt2(examStudent.getExt2());
-		info.setExt3(examStudent.getExt3());
-		info.setExt4(examStudent.getExt4());
-		info.setExt5(examStudent.getExt5());
-
-		ExamStudentInfo savedExamStudent = examStudentService.saveExamStudent(info);
-
-		ExamStudentDomain ret = new ExamStudentDomain();
-		ret.setId(savedExamStudent.getId());
-		ret.setStudentId(studentId);
-		ret.setStudentCode(savedExamStudent.getStudentCode());
-		ret.setStudentName(savedExamStudent.getStudentName());
-		ret.setCourseCode(savedExamStudent.getCourseCode());
-		ret.setCourseName(savedExamStudent.getCourseName());
-		return ret;
-	}
-
-	/**
-	 * 方法注释
-	 *
-	 * @author WANGWEI
-	 * @param ids
-	 * @return
-	 */
-	@Transactional
-	@ApiOperation(value = "按ID删除考试学生", notes = "删除")
-	@DeleteMapping("/{ids}")
-	public List<Long> deleteExamStudent(@PathVariable String ids) {
-		List<Long> idList = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
-				.collect(Collectors.toList());
-		examStudentService.deleteExamStudentsByStudentIds(idList);
-		return idList;
-	}
-
-	/**
-	 * 方法注释
-	 *
-	 * @author WANGWEI
-	 * @param examId
-	 * @return
-	 */
-	@ApiOperation(value = "按考试删除考试学生", notes = "按考试删除")
-	@Transactional
-	@DeleteMapping("exam/{examId}")
-	public Long deleteExamStudents(@PathVariable Long examId) {
-		examStudentService.deleteExamStudentsByExamId(examId);
-		return examId;
-	}
-
-	@ApiOperation(value = "下载导入模板", notes = "下载导入模板")
-	@GetMapping("/downloadTemplate")
-	public void downloadTemplate(HttpServletResponse response) {
-		String resoucePath = PathUtil.getResoucePath("templates/studentImportTemplate.xlsx");
-		exportFile("考生导入模板.xlsx", new File(resoucePath));
-	}
-
-	@ApiOperation(value = "启用考生")
-	@PutMapping("enable/{ids}")
-	public List<String> enableStudent(@PathVariable String ids) {
-		List<Long> examStuIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
-				.collect(Collectors.toList());
-		List<String> ret = Lists.newArrayList();
-		for (Long cur : examStuIds) {
-			ExamStudentEntity s = examStudentRepo.findOne(cur);
-			s.setEnable(true);
-			examStudentRepo.save(s);
-			ret.add(s.getId() + ":" + s.getName());
-		}
-		return ret;
-	}
-
-	/**
-	 * 方法注释
-	 *
-	 * @author WANGWEI
-	 * @param ids
-	 * @return
-	 */
-	@ApiOperation(value = "禁用考生")
-	@PutMapping("disable/{ids}")
-	public List<String> disableStudent(@PathVariable String ids) {
-		List<Long> examStuIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
-				.collect(Collectors.toList());
-		List<String> ret = Lists.newArrayList();
-		for (Long cur : examStuIds) {
-			ExamStudentEntity s = examStudentRepo.findOne(cur);
-			s.setEnable(false);
-			examStudentRepo.save(s);
-			ret.add(s.getId() + ":" + s.getName());
-		}
-		return ret;
-	}
-
-}
+package cn.com.qmth.examcloud.core.examwork.api.controller;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import javax.persistence.criteria.Predicate;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.data.domain.Sort.Direction;
+import org.springframework.data.jpa.domain.Specification;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.google.common.collect.Lists;
+
+import cn.com.qmth.examcloud.commons.base.exception.StatusException;
+import cn.com.qmth.examcloud.commons.base.util.PathUtil;
+import cn.com.qmth.examcloud.commons.web.helpers.page.PageInfo;
+import cn.com.qmth.examcloud.commons.web.security.bean.User;
+import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
+import cn.com.qmth.examcloud.core.basic.api.CourseCloudService;
+import cn.com.qmth.examcloud.core.basic.api.OrgCloudService;
+import cn.com.qmth.examcloud.core.basic.api.StudentCloudService;
+import cn.com.qmth.examcloud.core.basic.api.bean.OrgBean;
+import cn.com.qmth.examcloud.core.basic.api.bean.StudentBean;
+import cn.com.qmth.examcloud.core.basic.api.request.GetOrgReq;
+import cn.com.qmth.examcloud.core.basic.api.request.GetStudentReq;
+import cn.com.qmth.examcloud.core.basic.api.request.SaveStudentReq;
+import cn.com.qmth.examcloud.core.basic.api.response.GetOrgResp;
+import cn.com.qmth.examcloud.core.basic.api.response.GetStudentResp;
+import cn.com.qmth.examcloud.core.basic.api.response.SaveStudentResp;
+import cn.com.qmth.examcloud.core.examwork.api.controller.bean.ExamStudentDomain;
+import cn.com.qmth.examcloud.core.examwork.dao.ExamRepo;
+import cn.com.qmth.examcloud.core.examwork.dao.ExamStudentRepo;
+import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamEntity;
+import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamStudentEntity;
+import cn.com.qmth.examcloud.core.examwork.service.ExamStudentService;
+import cn.com.qmth.examcloud.core.examwork.service.bean.ExamStudentInfo;
+import cn.com.qmth.examcloud.core.oe.admin.api.ExamRecordCloudService;
+import cn.com.qmth.examcloud.core.oe.admin.api.request.CheckExamIsStartedReq;
+import cn.com.qmth.examcloud.core.oe.admin.api.response.CheckExamIsStartedResp;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 考生服务API Created by songyue on 17/1/13.
+ */
+@Transactional
+@RestController
+@RequestMapping("${$rmp.ctr.examwork}/exam_student")
+public class ExamStudentController extends ControllerSupport {
+
+	@Autowired
+	ExamStudentRepo examStudentRepo;
+
+	@Autowired
+	ExamStudentService examStudentService;
+
+	@Autowired
+	ExamRepo examRepo;
+
+	@Autowired
+	StudentCloudService studentCloudService;
+
+	@Autowired
+	CourseCloudService courseCloudService;
+
+	@Autowired
+	OrgCloudService orgCloudService;
+
+	@Autowired
+	ExamRecordCloudService examRecordCloudService;
+
+	/**
+	 * 方法注释
+	 *
+	 * @author WANGWEI
+	 * @param studentId
+	 * @return
+	 */
+	@ApiOperation(value = "查询学生的所有考试")
+	@GetMapping("byStudentId/{studentId}")
+	public List<ExamStudentEntity> getExamStudentListByStudentId(@PathVariable Long studentId) {
+
+		return examStudentRepo.findByStudentId(studentId);
+	}
+
+	/**
+	 * 重构
+	 *
+	 * @author WANGWEI
+	 * @param examCriteria
+	 * @param curPage
+	 * @param pageSize
+	 * @return
+	 */
+	@ApiOperation(value = "查询考试学生带条件和分页", notes = "带条件带分页")
+	@GetMapping("examStudentPage/{curPage}/{pageSize}")
+	public PageInfo<ExamStudentDomain> getExamStudentPage(@PathVariable Integer curPage,
+			@PathVariable Integer pageSize, @RequestParam(required = false) Long orgId,
+			@RequestParam(required = false) Long examId,
+			@RequestParam(required = false) String studentName,
+			@RequestParam(required = false) String studentCode,
+			@RequestParam(required = false) Long courseId,
+			@RequestParam(required = false) String courseCode,
+			@RequestParam(required = false) String courseLevel,
+			@RequestParam(required = false) String courseName,
+			@RequestParam(required = false) String examSite,
+			@RequestParam(required = false) String identityNumber,
+			@RequestParam(required = false) Boolean identityNumberLike,
+			@RequestParam(required = false) String specialtyName,
+			@RequestParam(required = false) String infoCollector,
+			@RequestParam(required = false) Boolean withStarted) {
+
+		User accessUser = getAccessUser();
+
+		final Boolean finalIdentityNumberLike = null == identityNumberLike
+				? true
+				: identityNumberLike;
+
+		Specification<ExamStudentEntity> specification = (root, query, cb) -> {
+			List<Predicate> predicates = new ArrayList<>();
+			predicates.add(cb.equal(root.get("rootOrgId"), accessUser.getRootOrgId()));
+
+			if (null != orgId) {
+				predicates.add(cb.equal(root.get("orgId"), orgId));
+			}
+
+			if (null != examId) {
+				predicates.add(cb.equal(root.get("examId"), examId));
+			}
+			if (StringUtils.isNotEmpty(studentName)) {
+				predicates.add(cb.like(root.get("name"), toSqlSearchPattern(studentName)));
+			}
+			if (StringUtils.isNotEmpty(studentCode)) {
+				predicates.add(cb.like(root.get("studentCode"), toSqlSearchPattern(studentCode)));
+			}
+			if (null != courseId) {
+				predicates.add(cb.equal(root.get("courseId"), courseId));
+			}
+			if (StringUtils.isNotEmpty(courseCode)) {
+				predicates.add(cb.equal(root.get("courseCode"), courseCode));
+			}
+			if (StringUtils.isNotEmpty(courseLevel)) {
+				predicates.add(cb.equal(root.get("courseLevel"), courseLevel));
+			}
+			if (StringUtils.isNotEmpty(courseName)) {
+				predicates.add(cb.like(root.get("courseName"), toSqlSearchPattern(courseName)));
+			}
+			if (!StringUtils.isEmpty(examSite)) {
+				predicates.add(cb.like(root.get("examSite"), toSqlSearchPattern(examSite)));
+			}
+			if (StringUtils.isNotEmpty(identityNumber)) {
+				if (finalIdentityNumberLike) {
+					predicates.add(cb.like(root.get("identityNumber"),
+							toSqlSearchPattern(identityNumber)));
+				} else {
+					predicates.add(cb.equal(root.get("identityNumber"), identityNumber));
+				}
+			}
+			if (StringUtils.isNotEmpty(specialtyName)) {
+				predicates
+						.add(cb.like(root.get("specialtyName"), toSqlSearchPattern(specialtyName)));
+			}
+			if (StringUtils.isNotEmpty(infoCollector)) {
+				predicates
+						.add(cb.like(root.get("infoCollector"), toSqlSearchPattern(infoCollector)));
+			}
+
+			return cb.and(predicates.toArray(new Predicate[predicates.size()]));
+		};
+
+		PageRequest pageRequest = new PageRequest(curPage, pageSize,
+				new Sort(Direction.DESC, "updateTime"));
+
+		Page<ExamStudentEntity> examStudents = examStudentRepo.findAll(specification, pageRequest);
+
+		List<ExamStudentDomain> ret = Lists.newArrayList();
+
+		for (ExamStudentEntity cur : examStudents) {
+			ExamEntity exam = examRepo.findOne(cur.getExamId());
+
+			GetOrgReq getOrgReq = new GetOrgReq();
+			getOrgReq.setOrgId(cur.getOrgId());
+			GetOrgResp getOrgResp = orgCloudService.getOrg(getOrgReq);
+			OrgBean org = getOrgResp.getOrg();
+
+			GetStudentReq getStudentReq = new GetStudentReq();
+			getStudentReq.setRootOrgId(accessUser.getRootOrgId());
+			getStudentReq.setIdentityNumber(cur.getIdentityNumber());
+			GetStudentResp getStudentResp = studentCloudService.getStudent(getStudentReq);
+			StudentBean studentBean = getStudentResp.getStudentInfo();
+
+			Boolean started = null;
+			if (null != withStarted && withStarted) {
+				CheckExamIsStartedReq checkExamIsStartedReq = new CheckExamIsStartedReq();
+				checkExamIsStartedReq.setExamId(exam.getId());
+				checkExamIsStartedReq.setCourseId(cur.getCourseId());
+				checkExamIsStartedReq.setStudentId(studentBean.getId());
+				checkExamIsStartedReq.setExamId(exam.getId());
+				try {
+					CheckExamIsStartedResp checkExamIsStartedResp = examRecordCloudService
+							.checkExamIsStarted(checkExamIsStartedReq);
+					started = checkExamIsStartedResp.getIsStarted();
+				} catch (Exception e) {
+					log.error("fail to invoke remote method: checkExamIsStarted()", e);
+				}
+
+			}
+
+			ExamStudentDomain bean = new ExamStudentDomain();
+			bean.setRootOrgId(cur.getRootOrgId());
+			bean.setId(cur.getId());
+			bean.setExamId(exam.getId());
+			bean.setExamName(exam.getName());
+			bean.setStudentId(cur.getStudentId());
+			bean.setStudentName(cur.getName());
+			bean.setStudentCode(cur.getStudentCode());
+			bean.setIdentityNumber(cur.getIdentityNumber());
+			bean.setCourseId(cur.getCourseId());
+			bean.setCourseCode(cur.getCourseCode());
+			bean.setCourseName(cur.getCourseName());
+			bean.setCourseLevel(cur.getCourseLevel());
+			bean.setInfoCollector(cur.getInfoCollector());
+			bean.setOrgId(cur.getOrgId());
+			bean.setOrgCode(org.getCode());
+			bean.setOrgName(org.getName());
+			bean.setPaperType(cur.getPaperType());
+			bean.setPhone(studentBean.getPhoneNumber());
+			bean.setGrade(cur.getGrade());
+			bean.setSpecialtyName(cur.getSpecialtyName());
+			bean.setExamSite(cur.getExamSite());
+			bean.setExamType(exam.getExamType().name());
+			bean.setUpdateTime(cur.getUpdateTime());
+			bean.setEnable(cur.getEnable());
+			bean.setLocked(
+					null == exam.getExamStudentLocked() ? false : exam.getExamStudentLocked());
+			bean.setStarted(started);
+			bean.setPhotoPath(studentBean.getPhotoPath());
+
+			bean.setExt1(cur.getExt1());
+			bean.setExt2(cur.getExt2());
+			bean.setExt3(cur.getExt3());
+			bean.setExt4(cur.getExt4());
+			bean.setExt5(cur.getExt5());
+			ret.add(bean);
+		}
+		return new PageInfo<ExamStudentDomain>(examStudents, ret);
+	}
+
+	/**
+	 * 方法注释
+	 *
+	 * @author WANGWEI
+	 * @param id
+	 * @return
+	 */
+	@ApiOperation(value = "按ID查询考试学生", notes = "ID查询")
+	@GetMapping("{id}")
+	public ExamStudentEntity getExamStudentById(@PathVariable Long id) {
+		ExamStudentEntity es = examStudentRepo.findOne(id);
+		if (null == es) {
+			throw new StatusException("E-520001", "考生不存在");
+		}
+		return es;
+	}
+
+	/**
+	 * 方法注释
+	 *
+	 * @author WANGWEI
+	 * @param examStudent
+	 * @return
+	 */
+	@Transactional
+	@ApiOperation(value = "新增考试学生", notes = "新增")
+	@PostMapping()
+	public ExamStudentDomain addExamStudent(@RequestBody ExamStudentDomain examStudent) {
+		trim(examStudent);
+		Long rootOrgId = getRootOrgId();
+		examStudent.setRootOrgId(rootOrgId);
+		examStudent.setInfoCollector(examStudent.getInfoCollector());
+		return saveExamStudent(examStudent);
+	}
+
+	/**
+	 * 方法注释
+	 *
+	 * @author WANGWEI
+	 * @param examStudent
+	 * @return
+	 */
+	@Transactional
+	@ApiOperation(value = "更新考试学生", notes = "更新")
+	@PutMapping()
+	public ExamStudentDomain updateExamStudent(@RequestBody ExamStudentDomain examStudent) {
+		trim(examStudent);
+		Long rootOrgId = getRootOrgId();
+		examStudent.setRootOrgId(rootOrgId);
+		examStudent.setInfoCollector(examStudent.getInfoCollector());
+		return saveExamStudent(examStudent);
+	}
+
+	/**
+	 * 方法注释
+	 *
+	 * @author WANGWEI
+	 * @param examStudent
+	 * @return
+	 */
+	private ExamStudentDomain saveExamStudent(ExamStudentDomain examStudent) {
+		SaveStudentReq saveStudentReq = new SaveStudentReq();
+		saveStudentReq.setIdentityNumber(examStudent.getIdentityNumber().toUpperCase(Locale.US));
+		saveStudentReq.setName(examStudent.getStudentName());
+		saveStudentReq.setPhoneNumber(examStudent.getPhone());
+		saveStudentReq.setOrgId(examStudent.getOrgId());
+		saveStudentReq.setRemark(examStudent.getRemark());
+		saveStudentReq.setRootOrgId(examStudent.getRootOrgId());
+		saveStudentReq.setStudentCode(examStudent.getStudentCode());
+
+		SaveStudentResp saveStudentResp = studentCloudService.saveStudent(saveStudentReq);
+
+		Long studentId = saveStudentResp.getStudentId();
+
+		ExamStudentInfo info = new ExamStudentInfo();
+		info.setCourseId(examStudent.getCourseId());
+		info.setExamId(examStudent.getExamId());
+		info.setIdentityNumber(examStudent.getIdentityNumber());
+		info.setPaperType(examStudent.getPaperType());
+		info.setRootOrgId(examStudent.getRootOrgId());
+		info.setStudentCode(examStudent.getStudentCode());
+		info.setStudentName(examStudent.getStudentName());
+		info.setStudentId(studentId);
+		info.setInfoCollector(examStudent.getInfoCollector());
+		info.setGrade(examStudent.getGrade());
+		info.setExamSite(examStudent.getExamSite());
+		info.setSpecialtyName(examStudent.getSpecialtyName());
+		info.setRemark(examStudent.getRemark());
+
+		info.setExt1(examStudent.getExt1());
+		info.setExt2(examStudent.getExt2());
+		info.setExt3(examStudent.getExt3());
+		info.setExt4(examStudent.getExt4());
+		info.setExt5(examStudent.getExt5());
+
+		ExamStudentInfo savedExamStudent = examStudentService.saveExamStudent(info);
+
+		ExamStudentDomain ret = new ExamStudentDomain();
+		ret.setId(savedExamStudent.getId());
+		ret.setStudentId(studentId);
+		ret.setStudentCode(savedExamStudent.getStudentCode());
+		ret.setStudentName(savedExamStudent.getStudentName());
+		ret.setCourseCode(savedExamStudent.getCourseCode());
+		ret.setCourseName(savedExamStudent.getCourseName());
+		return ret;
+	}
+
+	/**
+	 * 方法注释
+	 *
+	 * @author WANGWEI
+	 * @param ids
+	 * @return
+	 */
+	@Transactional
+	@ApiOperation(value = "按ID删除考试学生", notes = "删除")
+	@DeleteMapping("/{ids}")
+	public List<Long> deleteExamStudent(@PathVariable String ids) {
+		List<Long> idList = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
+				.collect(Collectors.toList());
+		examStudentService.deleteExamStudentsByStudentIds(idList);
+		return idList;
+	}
+
+	/**
+	 * 方法注释
+	 *
+	 * @author WANGWEI
+	 * @param examId
+	 * @return
+	 */
+	@ApiOperation(value = "按考试删除考试学生", notes = "按考试删除")
+	@Transactional
+	@DeleteMapping("exam/{examId}")
+	public Long deleteExamStudents(@PathVariable Long examId) {
+		examStudentService.deleteExamStudentsByExamId(examId);
+		return examId;
+	}
+
+	@ApiOperation(value = "下载导入模板", notes = "下载导入模板")
+	@GetMapping("/downloadTemplate")
+	public void downloadTemplate(HttpServletResponse response) {
+		String resoucePath = PathUtil.getResoucePath("templates/studentImportTemplate.xlsx");
+		exportFile("考生导入模板.xlsx", new File(resoucePath));
+	}
+
+	@ApiOperation(value = "启用考生")
+	@PutMapping("enable/{ids}")
+	public List<String> enableStudent(@PathVariable String ids) {
+		List<Long> examStuIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
+				.collect(Collectors.toList());
+		List<String> ret = Lists.newArrayList();
+		for (Long cur : examStuIds) {
+			ExamStudentEntity s = examStudentRepo.findOne(cur);
+			s.setEnable(true);
+			examStudentRepo.save(s);
+			ret.add(s.getId() + ":" + s.getName());
+		}
+		return ret;
+	}
+
+	/**
+	 * 方法注释
+	 *
+	 * @author WANGWEI
+	 * @param ids
+	 * @return
+	 */
+	@ApiOperation(value = "禁用考生")
+	@PutMapping("disable/{ids}")
+	public List<String> disableStudent(@PathVariable String ids) {
+		List<Long> examStuIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
+				.collect(Collectors.toList());
+		List<String> ret = Lists.newArrayList();
+		for (Long cur : examStuIds) {
+			ExamStudentEntity s = examStudentRepo.findOne(cur);
+			s.setEnable(false);
+			examStudentRepo.save(s);
+			ret.add(s.getId() + ":" + s.getName());
+		}
+		return ret;
+	}
+
+}

+ 383 - 373
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/controller/bean/ExamStudentDomain.java

@@ -1,373 +1,383 @@
-package cn.com.qmth.examcloud.core.examwork.api.controller.bean;
-
-import java.util.Date;
-
-import cn.com.qmth.examcloud.commons.web.cloud.api.JsonSerializable;
-
-/**
- * 考生
- *
- * @author WANGWEI
- * @date 2018年7月9日
- * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
- */
-public class ExamStudentDomain implements JsonSerializable {
-
-	private static final long serialVersionUID = 757982847766860857L;
-
-	private Long id;
-
-	private Long studentId;
-
-	private String identityNumber;
-
-	private String studentName;
-
-	private String studentCode;
-
-	private Long examId;
-
-	private String examName;
-
-	private Long rootOrgId;
-
-	private Long orgId;
-
-	private String orgCode;
-
-	private String orgName;
-
-	private String examNumber;
-
-	private Long courseId;
-
-	private String courseCode;
-
-	private String courseName;
-
-	private String courseLevel;
-
-	private String paperType;
-
-	private String specialtyCode;
-
-	private String specialtyName;
-
-	private String examSite;
-
-	private String infoCollector;
-
-	private String phone;
-
-	private String remark;
-
-	private String grade;
-
-	private String examType;
-
-	private Date updateTime;
-
-	private Boolean enable;
-
-	private Boolean locked;
-
-	private Boolean started;
-
-	/**
-	 * 扩展属性1
-	 */
-	private String ext1;
-
-	/**
-	 * 扩展属性2
-	 */
-	private String ext2;
-
-	/**
-	 * 扩展属性3
-	 */
-	private String ext3;
-
-	/**
-	 * 扩展属性4
-	 */
-	private String ext4;
-
-	/**
-	 * 扩展属性5
-	 */
-	private String ext5;
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public Long getStudentId() {
-		return studentId;
-	}
-
-	public void setStudentId(Long studentId) {
-		this.studentId = studentId;
-	}
-
-	public String getIdentityNumber() {
-		return identityNumber;
-	}
-
-	public void setIdentityNumber(String identityNumber) {
-		this.identityNumber = identityNumber;
-	}
-
-	public String getStudentName() {
-		return studentName;
-	}
-
-	public void setStudentName(String studentName) {
-		this.studentName = studentName;
-	}
-
-	public String getStudentCode() {
-		return studentCode;
-	}
-
-	public void setStudentCode(String studentCode) {
-		this.studentCode = studentCode;
-	}
-
-	public Long getExamId() {
-		return examId;
-	}
-
-	public void setExamId(Long examId) {
-		this.examId = examId;
-	}
-
-	public String getExamName() {
-		return examName;
-	}
-
-	public void setExamName(String examName) {
-		this.examName = examName;
-	}
-
-	public Long getRootOrgId() {
-		return rootOrgId;
-	}
-
-	public void setRootOrgId(Long rootOrgId) {
-		this.rootOrgId = rootOrgId;
-	}
-
-	public Long getOrgId() {
-		return orgId;
-	}
-
-	public void setOrgId(Long orgId) {
-		this.orgId = orgId;
-	}
-
-	public String getOrgCode() {
-		return orgCode;
-	}
-
-	public void setOrgCode(String orgCode) {
-		this.orgCode = orgCode;
-	}
-
-	public String getOrgName() {
-		return orgName;
-	}
-
-	public void setOrgName(String orgName) {
-		this.orgName = orgName;
-	}
-
-	public String getExamNumber() {
-		return examNumber;
-	}
-
-	public void setExamNumber(String examNumber) {
-		this.examNumber = examNumber;
-	}
-
-	public String getCourseCode() {
-		return courseCode;
-	}
-
-	public void setCourseCode(String courseCode) {
-		this.courseCode = courseCode;
-	}
-
-	public String getCourseName() {
-		return courseName;
-	}
-
-	public void setCourseName(String courseName) {
-		this.courseName = courseName;
-	}
-
-	public String getCourseLevel() {
-		return courseLevel;
-	}
-
-	public void setCourseLevel(String courseLevel) {
-		this.courseLevel = courseLevel;
-	}
-
-	public String getPaperType() {
-		return paperType;
-	}
-
-	public void setPaperType(String paperType) {
-		this.paperType = paperType;
-	}
-
-	public String getSpecialtyCode() {
-		return specialtyCode;
-	}
-
-	public void setSpecialtyCode(String specialtyCode) {
-		this.specialtyCode = specialtyCode;
-	}
-
-	public String getSpecialtyName() {
-		return specialtyName;
-	}
-
-	public void setSpecialtyName(String specialtyName) {
-		this.specialtyName = specialtyName;
-	}
-
-	public String getExamSite() {
-		return examSite;
-	}
-
-	public void setExamSite(String examSite) {
-		this.examSite = examSite;
-	}
-
-	public String getInfoCollector() {
-		return infoCollector;
-	}
-
-	public void setInfoCollector(String infoCollector) {
-		this.infoCollector = infoCollector;
-	}
-
-	public String getPhone() {
-		return phone;
-	}
-
-	public void setPhone(String phone) {
-		this.phone = phone;
-	}
-
-	public String getRemark() {
-		return remark;
-	}
-
-	public void setRemark(String remark) {
-		this.remark = remark;
-	}
-
-	public String getGrade() {
-		return grade;
-	}
-
-	public void setGrade(String grade) {
-		this.grade = grade;
-	}
-
-	public String getExamType() {
-		return examType;
-	}
-
-	public void setExamType(String examType) {
-		this.examType = examType;
-	}
-
-	public Date getUpdateTime() {
-		return updateTime;
-	}
-
-	public void setUpdateTime(Date updateTime) {
-		this.updateTime = updateTime;
-	}
-
-	public Boolean getEnable() {
-		return enable;
-	}
-
-	public void setEnable(Boolean enable) {
-		this.enable = enable;
-	}
-
-	public Boolean getLocked() {
-		return locked;
-	}
-
-	public void setLocked(Boolean locked) {
-		this.locked = locked;
-	}
-
-	public Boolean getStarted() {
-		return started;
-	}
-
-	public void setStarted(Boolean started) {
-		this.started = started;
-	}
-
-	public Long getCourseId() {
-		return courseId;
-	}
-
-	public void setCourseId(Long courseId) {
-		this.courseId = courseId;
-	}
-
-	public String getExt1() {
-		return ext1;
-	}
-
-	public void setExt1(String ext1) {
-		this.ext1 = ext1;
-	}
-
-	public String getExt2() {
-		return ext2;
-	}
-
-	public void setExt2(String ext2) {
-		this.ext2 = ext2;
-	}
-
-	public String getExt3() {
-		return ext3;
-	}
-
-	public void setExt3(String ext3) {
-		this.ext3 = ext3;
-	}
-
-	public String getExt4() {
-		return ext4;
-	}
-
-	public void setExt4(String ext4) {
-		this.ext4 = ext4;
-	}
-
-	public String getExt5() {
-		return ext5;
-	}
-
-	public void setExt5(String ext5) {
-		this.ext5 = ext5;
-	}
-
-}
+package cn.com.qmth.examcloud.core.examwork.api.controller.bean;
+
+import java.util.Date;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.JsonSerializable;
+
+/**
+ * 考生
+ *
+ * @author WANGWEI
+ * @date 2018年7月9日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class ExamStudentDomain implements JsonSerializable {
+
+	private static final long serialVersionUID = 757982847766860857L;
+
+	private Long id;
+
+	private Long studentId;
+
+	private String identityNumber;
+
+	private String studentName;
+
+	private String studentCode;
+
+	private Long examId;
+
+	private String examName;
+
+	private Long rootOrgId;
+
+	private Long orgId;
+
+	private String orgCode;
+
+	private String orgName;
+
+	private String examNumber;
+
+	private Long courseId;
+
+	private String courseCode;
+
+	private String courseName;
+
+	private String courseLevel;
+
+	private String paperType;
+
+	private String specialtyCode;
+
+	private String specialtyName;
+
+	private String examSite;
+
+	private String infoCollector;
+
+	private String phone;
+
+	private String remark;
+
+	private String grade;
+
+	private String examType;
+
+	private Date updateTime;
+
+	private Boolean enable;
+
+	private Boolean locked;
+
+	private Boolean started;
+
+	private String photoPath;
+
+	/**
+	 * 扩展属性1
+	 */
+	private String ext1;
+
+	/**
+	 * 扩展属性2
+	 */
+	private String ext2;
+
+	/**
+	 * 扩展属性3
+	 */
+	private String ext3;
+
+	/**
+	 * 扩展属性4
+	 */
+	private String ext4;
+
+	/**
+	 * 扩展属性5
+	 */
+	private String ext5;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getStudentId() {
+		return studentId;
+	}
+
+	public void setStudentId(Long studentId) {
+		this.studentId = studentId;
+	}
+
+	public String getIdentityNumber() {
+		return identityNumber;
+	}
+
+	public void setIdentityNumber(String identityNumber) {
+		this.identityNumber = identityNumber;
+	}
+
+	public String getStudentName() {
+		return studentName;
+	}
+
+	public void setStudentName(String studentName) {
+		this.studentName = studentName;
+	}
+
+	public String getStudentCode() {
+		return studentCode;
+	}
+
+	public void setStudentCode(String studentCode) {
+		this.studentCode = studentCode;
+	}
+
+	public Long getExamId() {
+		return examId;
+	}
+
+	public void setExamId(Long examId) {
+		this.examId = examId;
+	}
+
+	public String getExamName() {
+		return examName;
+	}
+
+	public void setExamName(String examName) {
+		this.examName = examName;
+	}
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public Long getOrgId() {
+		return orgId;
+	}
+
+	public void setOrgId(Long orgId) {
+		this.orgId = orgId;
+	}
+
+	public String getOrgCode() {
+		return orgCode;
+	}
+
+	public void setOrgCode(String orgCode) {
+		this.orgCode = orgCode;
+	}
+
+	public String getOrgName() {
+		return orgName;
+	}
+
+	public void setOrgName(String orgName) {
+		this.orgName = orgName;
+	}
+
+	public String getExamNumber() {
+		return examNumber;
+	}
+
+	public void setExamNumber(String examNumber) {
+		this.examNumber = examNumber;
+	}
+
+	public String getCourseCode() {
+		return courseCode;
+	}
+
+	public void setCourseCode(String courseCode) {
+		this.courseCode = courseCode;
+	}
+
+	public String getCourseName() {
+		return courseName;
+	}
+
+	public void setCourseName(String courseName) {
+		this.courseName = courseName;
+	}
+
+	public String getCourseLevel() {
+		return courseLevel;
+	}
+
+	public void setCourseLevel(String courseLevel) {
+		this.courseLevel = courseLevel;
+	}
+
+	public String getPaperType() {
+		return paperType;
+	}
+
+	public void setPaperType(String paperType) {
+		this.paperType = paperType;
+	}
+
+	public String getSpecialtyCode() {
+		return specialtyCode;
+	}
+
+	public void setSpecialtyCode(String specialtyCode) {
+		this.specialtyCode = specialtyCode;
+	}
+
+	public String getSpecialtyName() {
+		return specialtyName;
+	}
+
+	public void setSpecialtyName(String specialtyName) {
+		this.specialtyName = specialtyName;
+	}
+
+	public String getExamSite() {
+		return examSite;
+	}
+
+	public void setExamSite(String examSite) {
+		this.examSite = examSite;
+	}
+
+	public String getInfoCollector() {
+		return infoCollector;
+	}
+
+	public void setInfoCollector(String infoCollector) {
+		this.infoCollector = infoCollector;
+	}
+
+	public String getPhone() {
+		return phone;
+	}
+
+	public void setPhone(String phone) {
+		this.phone = phone;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public String getGrade() {
+		return grade;
+	}
+
+	public void setGrade(String grade) {
+		this.grade = grade;
+	}
+
+	public String getExamType() {
+		return examType;
+	}
+
+	public void setExamType(String examType) {
+		this.examType = examType;
+	}
+
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public Boolean getEnable() {
+		return enable;
+	}
+
+	public void setEnable(Boolean enable) {
+		this.enable = enable;
+	}
+
+	public Boolean getLocked() {
+		return locked;
+	}
+
+	public void setLocked(Boolean locked) {
+		this.locked = locked;
+	}
+
+	public Boolean getStarted() {
+		return started;
+	}
+
+	public void setStarted(Boolean started) {
+		this.started = started;
+	}
+
+	public Long getCourseId() {
+		return courseId;
+	}
+
+	public void setCourseId(Long courseId) {
+		this.courseId = courseId;
+	}
+
+	public String getExt1() {
+		return ext1;
+	}
+
+	public void setExt1(String ext1) {
+		this.ext1 = ext1;
+	}
+
+	public String getExt2() {
+		return ext2;
+	}
+
+	public void setExt2(String ext2) {
+		this.ext2 = ext2;
+	}
+
+	public String getExt3() {
+		return ext3;
+	}
+
+	public void setExt3(String ext3) {
+		this.ext3 = ext3;
+	}
+
+	public String getExt4() {
+		return ext4;
+	}
+
+	public void setExt4(String ext4) {
+		this.ext4 = ext4;
+	}
+
+	public String getExt5() {
+		return ext5;
+	}
+
+	public void setExt5(String ext5) {
+		this.ext5 = ext5;
+	}
+
+	public String getPhotoPath() {
+		return photoPath;
+	}
+
+	public void setPhotoPath(String photoPath) {
+		this.photoPath = photoPath;
+	}
+
+}