|
@@ -9,11 +9,13 @@ import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
|
|
import cn.com.qmth.stmms.biz.exam.query.ExamSearchQuery;
|
|
import cn.com.qmth.stmms.biz.exam.query.ExamSearchQuery;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamService;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamService;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
|
|
|
|
+import cn.com.qmth.stmms.biz.file.service.FileService;
|
|
import cn.com.qmth.stmms.biz.mark.model.PictureConfigItem;
|
|
import cn.com.qmth.stmms.biz.mark.model.PictureConfigItem;
|
|
import cn.com.qmth.stmms.common.annotation.Logging;
|
|
import cn.com.qmth.stmms.common.annotation.Logging;
|
|
import cn.com.qmth.stmms.common.annotation.RoleRequire;
|
|
import cn.com.qmth.stmms.common.annotation.RoleRequire;
|
|
import cn.com.qmth.stmms.common.domain.ApiUser;
|
|
import cn.com.qmth.stmms.common.domain.ApiUser;
|
|
import cn.com.qmth.stmms.common.enums.ExamStatus;
|
|
import cn.com.qmth.stmms.common.enums.ExamStatus;
|
|
|
|
+import cn.com.qmth.stmms.common.enums.ExamType;
|
|
import cn.com.qmth.stmms.common.enums.LogType;
|
|
import cn.com.qmth.stmms.common.enums.LogType;
|
|
import cn.com.qmth.stmms.common.enums.Role;
|
|
import cn.com.qmth.stmms.common.enums.Role;
|
|
import cn.com.qmth.stmms.common.utils.DateUtils;
|
|
import cn.com.qmth.stmms.common.utils.DateUtils;
|
|
@@ -41,6 +43,9 @@ public class ExamInfoController extends BaseApiController {
|
|
@Autowired
|
|
@Autowired
|
|
private CampusService campusService;
|
|
private CampusService campusService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private FileService fileService;
|
|
|
|
+
|
|
@RequestMapping("/version")
|
|
@RequestMapping("/version")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String version(HttpServletRequest request) {
|
|
public String version(HttpServletRequest request) {
|
|
@@ -54,6 +59,7 @@ public class ExamInfoController extends BaseApiController {
|
|
ApiUser user = RequestUtils.getApiUser(request);
|
|
ApiUser user = RequestUtils.getApiUser(request);
|
|
JSONArray array = new JSONArray();
|
|
JSONArray array = new JSONArray();
|
|
query.setSchoolId(user.getSchoolId());
|
|
query.setSchoolId(user.getSchoolId());
|
|
|
|
+ query.setType(ExamType.SCAN_IMAGE);
|
|
query.setStatus(ExamStatus.START);
|
|
query.setStatus(ExamStatus.START);
|
|
if (query.getPageSize() < 1) {
|
|
if (query.getPageSize() < 1) {
|
|
query.setPageSize(20);
|
|
query.setPageSize(20);
|
|
@@ -65,6 +71,11 @@ public class ExamInfoController extends BaseApiController {
|
|
obj.accumulate("id", exam.getId());
|
|
obj.accumulate("id", exam.getId());
|
|
obj.accumulate("name", exam.getName());
|
|
obj.accumulate("name", exam.getName());
|
|
obj.accumulate("examTime", DateUtils.formatDate(exam.getExamTime()));
|
|
obj.accumulate("examTime", DateUtils.formatDate(exam.getExamTime()));
|
|
|
|
+ if (exam.getCardType() != null) {
|
|
|
|
+ obj.accumulate("cardType", exam.getCardType().getExtName());
|
|
|
|
+ obj.accumulate("cardUrl",
|
|
|
|
+ fileService.getFileServer() + fileService.getCardUri(exam.getId(), exam.getCardType()));
|
|
|
|
+ }
|
|
array.add(obj);
|
|
array.add(obj);
|
|
}
|
|
}
|
|
return array;
|
|
return array;
|
|
@@ -95,6 +106,11 @@ public class ExamInfoController extends BaseApiController {
|
|
JSONObject obj = new JSONObject();
|
|
JSONObject obj = new JSONObject();
|
|
obj.accumulate("code", subject.getCode());
|
|
obj.accumulate("code", subject.getCode());
|
|
obj.accumulate("name", subject.getName());
|
|
obj.accumulate("name", subject.getName());
|
|
|
|
+ if (subject.getCardType() != null) {
|
|
|
|
+ obj.accumulate("cardType", subject.getCardType().getExtName());
|
|
|
|
+ obj.accumulate("cardUrl", fileService.getFileServer() + fileService
|
|
|
|
+ .getCardUri(subject.getExamId(), subject.getCode(), subject.getCardType()));
|
|
|
|
+ }
|
|
array.add(obj);
|
|
array.add(obj);
|
|
}
|
|
}
|
|
return array;
|
|
return array;
|