|
@@ -60,6 +60,7 @@ import cn.com.qmth.examcloud.examwork.api.request.GetExamPropertyListReq;
|
|
|
import cn.com.qmth.examcloud.examwork.api.request.GetExamPropertyReq;
|
|
|
import cn.com.qmth.examcloud.examwork.api.request.GetExamReq;
|
|
|
import cn.com.qmth.examcloud.examwork.api.request.GetExamStudentPropertyValueListReq;
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.GetExamsByIdListReq;
|
|
|
import cn.com.qmth.examcloud.examwork.api.request.GetOngoingExamListReq;
|
|
|
import cn.com.qmth.examcloud.examwork.api.request.LockExamStudentsReq;
|
|
|
import cn.com.qmth.examcloud.examwork.api.request.SaveExamReq;
|
|
@@ -74,6 +75,7 @@ import cn.com.qmth.examcloud.examwork.api.response.GetExamPropertyListResp;
|
|
|
import cn.com.qmth.examcloud.examwork.api.response.GetExamPropertyResp;
|
|
|
import cn.com.qmth.examcloud.examwork.api.response.GetExamResp;
|
|
|
import cn.com.qmth.examcloud.examwork.api.response.GetExamStudentPropertyValueListResp;
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.GetExamsByIdListResp;
|
|
|
import cn.com.qmth.examcloud.examwork.api.response.GetOngoingExamListResp;
|
|
|
import cn.com.qmth.examcloud.examwork.api.response.LockExamStudentsResp;
|
|
|
import cn.com.qmth.examcloud.examwork.api.response.SaveExamResp;
|
|
@@ -84,6 +86,7 @@ import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
/**
|
|
|
+ * {@link StatusException} 状态码范围:012XXX<br>
|
|
|
* 考试云服务
|
|
|
*
|
|
|
* @author WANGWEI
|
|
@@ -730,4 +733,39 @@ public class ExamCloudServiceProvider extends ControllerSupport implements ExamC
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "按ID查询考试", notes = "")
|
|
|
+ @PostMapping("getExamsByIdList")
|
|
|
+ @Override
|
|
|
+ public GetExamsByIdListResp getExamsByIdList(@RequestBody GetExamsByIdListReq req) {
|
|
|
+ List<Long> examIdList = req.getExamIdList();
|
|
|
+ List<ExamBean> list = Lists.newArrayList();
|
|
|
+ for (Long cur : examIdList) {
|
|
|
+ ExamEntity exam = GlobalHelper.getEntity(examRepo, cur, ExamEntity.class);
|
|
|
+ if (null == exam) {
|
|
|
+ throw new StatusException("012001", "no exam [id=" + cur + "]");
|
|
|
+ }
|
|
|
+
|
|
|
+ ExamBean bean = new ExamBean();
|
|
|
+
|
|
|
+ bean.setId(exam.getId());
|
|
|
+ bean.setBeginTime(exam.getBeginTime());
|
|
|
+ bean.setDuration(exam.getDuration());
|
|
|
+ bean.setEnable(exam.getEnable());
|
|
|
+ bean.setEndTime(exam.getEndTime());
|
|
|
+ bean.setExamTimes(exam.getExamTimes());
|
|
|
+ bean.setExamType(exam.getExamType().name());
|
|
|
+ bean.setName(exam.getName());
|
|
|
+ bean.setCode(exam.getCode());
|
|
|
+ bean.setRemark(exam.getRemark());
|
|
|
+ bean.setRootOrgId(exam.getRootOrgId());
|
|
|
+ bean.setExamLimit(exam.getExamLimit());
|
|
|
+
|
|
|
+ list.add(bean);
|
|
|
+ }
|
|
|
+
|
|
|
+ GetExamsByIdListResp resp = new GetExamsByIdListResp();
|
|
|
+ resp.setExamList(list);
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
+
|
|
|
}
|