|
@@ -1,14 +1,25 @@
|
|
package cn.com.qmth.examcloud.core.questions.api;
|
|
package cn.com.qmth.examcloud.core.questions.api;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.Arrays;
|
|
|
|
-import java.util.HashSet;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
-import java.util.Set;
|
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
-import java.util.stream.Stream;
|
|
|
|
-
|
|
|
|
|
|
+import cn.com.qmth.examcloud.commons.base.exception.StatusException;
|
|
|
|
+import cn.com.qmth.examcloud.commons.base.util.JsonUtil;
|
|
|
|
+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.questions.api.bean.ParsePaper;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.base.BeanCopierUtil;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.base.StringSimilarityUtils;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.base.enums.PaperType;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.base.question.enums.QuesStructType;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.dao.PaperRepo;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.dao.entity.Paper;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.dao.entity.PaperSearchInfo;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.dao.entity.Question;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.service.PaperService;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.service.QuesService;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.service.bean.dto.PaperDetailExp;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.service.bean.dto.PaperDetailUnitExp;
|
|
|
|
+import cn.com.qmth.examcloud.core.questions.service.bean.dto.PaperExp;
|
|
|
|
+import com.google.gson.Gson;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -18,48 +29,23 @@ import org.springframework.data.domain.PageImpl;
|
|
import org.springframework.http.HttpStatus;
|
|
import org.springframework.http.HttpStatus;
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
|
-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.ResponseBody;
|
|
|
|
|
|
+import org.springframework.ui.Model;
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
-import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
-import com.google.gson.Gson;
|
|
|
|
-
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.dao.PaperRepo;
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.service.bean.dto.PaperDetailExp;
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.service.bean.dto.PaperDetailUnitExp;
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.service.bean.dto.PaperExp;
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.dao.entity.Paper;
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.dao.entity.PaperSearchInfo;
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.service.PaperService;
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.dao.entity.Question;
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.service.QuesService;
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.base.BeanCopierUtil;
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.base.StringSimilarityUtils;
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.base.enums.PaperType;
|
|
|
|
-import cn.com.qmth.examcloud.core.questions.base.question.enums.QuesStructType;
|
|
|
|
-import cn.com.qmth.examcloud.commons.base.exception.StatusException;
|
|
|
|
-import cn.com.qmth.examcloud.commons.base.util.JsonUtil;
|
|
|
|
-import cn.com.qmth.examcloud.commons.web.security.bean.User;
|
|
|
|
-import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
|
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
+import java.util.stream.Stream;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Created by songyue on 16/12/28.
|
|
* Created by songyue on 16/12/28.
|
|
* updated by weiwenhai on 2018.9.28
|
|
* updated by weiwenhai on 2018.9.28
|
|
|
|
+ *
|
|
* @code 160
|
|
* @code 160
|
|
*/
|
|
*/
|
|
@Controller
|
|
@Controller
|
|
@RequestMapping("${api_cqb}/")
|
|
@RequestMapping("${api_cqb}/")
|
|
-public class PaperController extends ControllerSupport{
|
|
|
|
|
|
+public class PaperController extends ControllerSupport {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
PaperService paperService;
|
|
PaperService paperService;
|
|
@@ -120,9 +106,9 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "查询所有导入试卷", notes = "查询所有导入试卷")
|
|
@ApiOperation(value = "查询所有导入试卷", notes = "查询所有导入试卷")
|
|
@GetMapping(value = "/importPaper/{curPage}/{pageSize}")
|
|
@GetMapping(value = "/importPaper/{curPage}/{pageSize}")
|
|
public ResponseEntity<Object> getImportPapers(@ModelAttribute PaperSearchInfo paperSearchInfo,
|
|
public ResponseEntity<Object> getImportPapers(@ModelAttribute PaperSearchInfo paperSearchInfo,
|
|
- @PathVariable int curPage,
|
|
|
|
- @PathVariable int pageSize) {
|
|
|
|
- User user = getAccessUser();
|
|
|
|
|
|
+ @PathVariable int curPage,
|
|
|
|
+ @PathVariable int pageSize) {
|
|
|
|
+ User user = getAccessUser();
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
return new ResponseEntity<Object>(paperService.getImportPapers(paperSearchInfo, curPage, pageSize), HttpStatus.OK);
|
|
return new ResponseEntity<Object>(paperService.getImportPapers(paperSearchInfo, curPage, pageSize), HttpStatus.OK);
|
|
}
|
|
}
|
|
@@ -131,7 +117,7 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "查询所有待审核和审核不通过的导入试卷", notes = "查询所有待审核和审核不通过的导入试卷")
|
|
@ApiOperation(value = "查询所有待审核和审核不通过的导入试卷", notes = "查询所有待审核和审核不通过的导入试卷")
|
|
@GetMapping(value = "/importPaperNotSuccess/{curPage}/{pageSize}")
|
|
@GetMapping(value = "/importPaperNotSuccess/{curPage}/{pageSize}")
|
|
public ResponseEntity<Object> getImportPapersNotSuccess(@ModelAttribute PaperSearchInfo paperSearchInfo, @PathVariable int curPage, @PathVariable int pageSize) {
|
|
public ResponseEntity<Object> getImportPapersNotSuccess(@ModelAttribute PaperSearchInfo paperSearchInfo, @PathVariable int curPage, @PathVariable int pageSize) {
|
|
- User user = getAccessUser();
|
|
|
|
|
|
+ User user = getAccessUser();
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
return new ResponseEntity<Object>(paperService.getImportPapersNotSuccess(paperSearchInfo, curPage, pageSize),
|
|
return new ResponseEntity<Object>(paperService.getImportPapersNotSuccess(paperSearchInfo, curPage, pageSize),
|
|
HttpStatus.OK);
|
|
HttpStatus.OK);
|
|
@@ -141,7 +127,7 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "根据条件查询导入试卷", notes = "根据条件查询导入试卷")
|
|
@ApiOperation(value = "根据条件查询导入试卷", notes = "根据条件查询导入试卷")
|
|
@GetMapping(value = "/getImportPaper")
|
|
@GetMapping(value = "/getImportPaper")
|
|
public ResponseEntity<List<Paper>> getImportPapersBySearch(@ModelAttribute PaperSearchInfo paperSearchInfo) {
|
|
public ResponseEntity<List<Paper>> getImportPapersBySearch(@ModelAttribute PaperSearchInfo paperSearchInfo) {
|
|
- User user = getAccessUser();
|
|
|
|
|
|
+ User user = getAccessUser();
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
return new ResponseEntity<List<Paper>>(paperService.getImportPapersBySearch(paperSearchInfo), HttpStatus.OK);
|
|
return new ResponseEntity<List<Paper>>(paperService.getImportPapersBySearch(paperSearchInfo), HttpStatus.OK);
|
|
}
|
|
}
|
|
@@ -150,7 +136,7 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "根据条件查询已组试卷", notes = "根据条件查询已组试卷")
|
|
@ApiOperation(value = "根据条件查询已组试卷", notes = "根据条件查询已组试卷")
|
|
@GetMapping(value = "/getGenPaper")
|
|
@GetMapping(value = "/getGenPaper")
|
|
public ResponseEntity<List<Paper>> getGenPapersBySearch(@ModelAttribute PaperSearchInfo paperSearchInfo) {
|
|
public ResponseEntity<List<Paper>> getGenPapersBySearch(@ModelAttribute PaperSearchInfo paperSearchInfo) {
|
|
- User user = getAccessUser();
|
|
|
|
|
|
+ User user = getAccessUser();
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
return new ResponseEntity<List<Paper>>(paperService.getGenPapersBySearch(paperSearchInfo), HttpStatus.OK);
|
|
return new ResponseEntity<List<Paper>>(paperService.getGenPapersBySearch(paperSearchInfo), HttpStatus.OK);
|
|
}
|
|
}
|
|
@@ -167,15 +153,13 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "查询所有已组试卷", notes = "查询所有已组试卷")
|
|
@ApiOperation(value = "查询所有已组试卷", notes = "查询所有已组试卷")
|
|
@GetMapping(value = "/genPaper/{curPage}/{pageSize}")
|
|
@GetMapping(value = "/genPaper/{curPage}/{pageSize}")
|
|
public ResponseEntity<Object> getGenPapers(@ModelAttribute PaperSearchInfo paperSearchInfo,
|
|
public ResponseEntity<Object> getGenPapers(@ModelAttribute PaperSearchInfo paperSearchInfo,
|
|
- @PathVariable int curPage, @PathVariable int pageSize) {
|
|
|
|
- User user = getAccessUser();
|
|
|
|
|
|
+ @PathVariable int curPage, @PathVariable int pageSize) {
|
|
|
|
+ User user = getAccessUser();
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
return new ResponseEntity<Object>(paperService.getGenPapers(paperSearchInfo, curPage, pageSize), HttpStatus.OK);
|
|
return new ResponseEntity<Object>(paperService.getGenPapers(paperSearchInfo, curPage, pageSize), HttpStatus.OK);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
- *
|
|
|
|
- * @param request
|
|
|
|
* @param paperSearchInfo
|
|
* @param paperSearchInfo
|
|
* @param ids
|
|
* @param ids
|
|
* @param curPage
|
|
* @param curPage
|
|
@@ -185,12 +169,12 @@ public class PaperController extends ControllerSupport{
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@ApiOperation(value = "查询所有导入试卷(not in paperIds)", notes = "查询所有导入试卷(not in paperIds)")
|
|
@ApiOperation(value = "查询所有导入试卷(not in paperIds)", notes = "查询所有导入试卷(not in paperIds)")
|
|
@GetMapping(value = "/genPaper/{ids}/{curPage}/{pageSize}")
|
|
@GetMapping(value = "/genPaper/{ids}/{curPage}/{pageSize}")
|
|
- public ResponseEntity<Object> getGenPapersNotInIds(@ModelAttribute PaperSearchInfo paperSearchInfo,
|
|
|
|
- @PathVariable String[] ids, @PathVariable int curPage, @PathVariable int pageSize) {
|
|
|
|
- User user = getAccessUser();
|
|
|
|
|
|
+ public ResponseEntity<Object> getGenPapersNotInIds(@ModelAttribute PaperSearchInfo paperSearchInfo,
|
|
|
|
+ @PathVariable String[] ids, @PathVariable int curPage, @PathVariable int pageSize) {
|
|
|
|
+ User user = getAccessUser();
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
if (ids != null && ids.length > 0) {
|
|
if (ids != null && ids.length > 0) {
|
|
- return new ResponseEntity<Object>(paperService.getPapersNotInIds(paperSearchInfo, ids, curPage, pageSize,PaperType.GENERATE),
|
|
|
|
|
|
+ return new ResponseEntity<Object>(paperService.getPapersNotInIds(paperSearchInfo, ids, curPage, pageSize, PaperType.GENERATE),
|
|
HttpStatus.OK);
|
|
HttpStatus.OK);
|
|
} else {
|
|
} else {
|
|
return new ResponseEntity<Object>(paperService.getGenPapers(paperSearchInfo, curPage, pageSize), HttpStatus.OK);
|
|
return new ResponseEntity<Object>(paperService.getGenPapers(paperSearchInfo, curPage, pageSize), HttpStatus.OK);
|
|
@@ -271,7 +255,7 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "获取卷库考试试卷", notes = "获取卷库考试试卷")
|
|
@ApiOperation(value = "获取卷库考试试卷", notes = "获取卷库考试试卷")
|
|
@GetMapping(value = "/paper/list/{examId}/{courseCode}/{groupCode}")
|
|
@GetMapping(value = "/paper/list/{examId}/{courseCode}/{groupCode}")
|
|
public List<Paper> listPaperById(@PathVariable String examId, @PathVariable String courseCode,
|
|
public List<Paper> listPaperById(@PathVariable String examId, @PathVariable String courseCode,
|
|
- @PathVariable String groupCode) {
|
|
|
|
|
|
+ @PathVariable String groupCode) {
|
|
return paperService.listExamPapers(Long.parseLong(examId), courseCode, groupCode);
|
|
return paperService.listExamPapers(Long.parseLong(examId), courseCode, groupCode);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -288,7 +272,7 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "新增考试试卷", notes = "新增考试试卷")
|
|
@ApiOperation(value = "新增考试试卷", notes = "新增考试试卷")
|
|
@PostMapping(value = "/paper/join/{examId}/{courseCode}/{groupCode}/{paperId}")
|
|
@PostMapping(value = "/paper/join/{examId}/{courseCode}/{groupCode}/{paperId}")
|
|
public ResponseEntity<Object> joinExamPaper(@PathVariable String examId, @PathVariable String courseCode,
|
|
public ResponseEntity<Object> joinExamPaper(@PathVariable String examId, @PathVariable String courseCode,
|
|
- @PathVariable String groupCode, @PathVariable String paperId) {
|
|
|
|
|
|
+ @PathVariable String groupCode, @PathVariable String paperId) {
|
|
paperService.joinToExamPaper(Long.parseLong(examId), courseCode, groupCode, paperId);
|
|
paperService.joinToExamPaper(Long.parseLong(examId), courseCode, groupCode, paperId);
|
|
return new ResponseEntity<Object>(HttpStatus.OK);
|
|
return new ResponseEntity<Object>(HttpStatus.OK);
|
|
}
|
|
}
|
|
@@ -306,7 +290,7 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "删除考试试卷", notes = "删除考试试卷")
|
|
@ApiOperation(value = "删除考试试卷", notes = "删除考试试卷")
|
|
@DeleteMapping(value = "/paper/release/{examId}/{courseCode}/{groupCode}/{paperId}")
|
|
@DeleteMapping(value = "/paper/release/{examId}/{courseCode}/{groupCode}/{paperId}")
|
|
public ResponseEntity<Object> releaseExamPaper(@PathVariable String examId, @PathVariable String courseCode,
|
|
public ResponseEntity<Object> releaseExamPaper(@PathVariable String examId, @PathVariable String courseCode,
|
|
- @PathVariable String groupCode, @PathVariable String paperId) {
|
|
|
|
|
|
+ @PathVariable String groupCode, @PathVariable String paperId) {
|
|
|
|
|
|
paperService.releaseExamPaper(Long.parseLong(examId), courseCode, groupCode, paperId);
|
|
paperService.releaseExamPaper(Long.parseLong(examId), courseCode, groupCode, paperId);
|
|
return new ResponseEntity<Object>(HttpStatus.OK);
|
|
return new ResponseEntity<Object>(HttpStatus.OK);
|
|
@@ -338,7 +322,7 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "删除考试试卷类型", notes = "删除考试试卷类型")
|
|
@ApiOperation(value = "删除考试试卷类型", notes = "删除考试试卷类型")
|
|
@DeleteMapping(value = "/paper/groupCode/{examId}/{courseCode}/{groupCode}")
|
|
@DeleteMapping(value = "/paper/groupCode/{examId}/{courseCode}/{groupCode}")
|
|
public ResponseEntity<Object> deleteGroup(@PathVariable String examId, @PathVariable String courseCode,
|
|
public ResponseEntity<Object> deleteGroup(@PathVariable String examId, @PathVariable String courseCode,
|
|
- @PathVariable String groupCode) {
|
|
|
|
|
|
+ @PathVariable String groupCode) {
|
|
paperService.deletGroupCode(Long.parseLong(examId), courseCode, groupCode);
|
|
paperService.deletGroupCode(Long.parseLong(examId), courseCode, groupCode);
|
|
return new ResponseEntity<Object>(HttpStatus.OK);
|
|
return new ResponseEntity<Object>(HttpStatus.OK);
|
|
}
|
|
}
|
|
@@ -353,7 +337,7 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "删除导入试卷中的试题", notes = "删除导入试卷中的试题")
|
|
@ApiOperation(value = "删除导入试卷中的试题", notes = "删除导入试卷中的试题")
|
|
@DeleteMapping(value = "/paper/deleteQuestion/{questionId}")
|
|
@DeleteMapping(value = "/paper/deleteQuestion/{questionId}")
|
|
public ResponseEntity<Object> deleteImportPaperQuestion(@PathVariable String questionId) {
|
|
public ResponseEntity<Object> deleteImportPaperQuestion(@PathVariable String questionId) {
|
|
- User user = getAccessUser();
|
|
|
|
|
|
+ User user = getAccessUser();
|
|
List<String> paperNames = paperService.deleteImportQuestionById(questionId, user);
|
|
List<String> paperNames = paperService.deleteImportQuestionById(questionId, user);
|
|
return new ResponseEntity<Object>(paperNames, HttpStatus.OK);
|
|
return new ResponseEntity<Object>(paperNames, HttpStatus.OK);
|
|
}
|
|
}
|
|
@@ -370,8 +354,8 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "向导入试卷中的新增试题", notes = "向导入试卷中的新增试题")
|
|
@ApiOperation(value = "向导入试卷中的新增试题", notes = "向导入试卷中的新增试题")
|
|
@PostMapping(value = "/paper/addQuestion/{paperId}/{paperDetailId}")
|
|
@PostMapping(value = "/paper/addQuestion/{paperId}/{paperDetailId}")
|
|
public ResponseEntity<Object> insertQuestionToPaper(@PathVariable String paperId,
|
|
public ResponseEntity<Object> insertQuestionToPaper(@PathVariable String paperId,
|
|
- @PathVariable String paperDetailId, @RequestBody Question question) {
|
|
|
|
- User user = getAccessUser();
|
|
|
|
|
|
+ @PathVariable String paperDetailId, @RequestBody Question question) {
|
|
|
|
+ User user = getAccessUser();
|
|
return new ResponseEntity<Object>(paperService.insertQuestionToPaper(paperId, paperDetailId, question, user),
|
|
return new ResponseEntity<Object>(paperService.insertQuestionToPaper(paperId, paperDetailId, question, user),
|
|
HttpStatus.OK);
|
|
HttpStatus.OK);
|
|
|
|
|
|
@@ -443,6 +427,7 @@ public class PaperController extends ControllerSupport{
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据试题获取试卷名称
|
|
* 根据试题获取试卷名称
|
|
|
|
+ *
|
|
* @param
|
|
* @param
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -463,24 +448,25 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "查询用于选题的试题列表", notes = "查询用于选题的试题列表")
|
|
@ApiOperation(value = "查询用于选题的试题列表", notes = "查询用于选题的试题列表")
|
|
@GetMapping(value = "/paper/listQuestion/{paperId}/{curPage}/{pageSize}")
|
|
@GetMapping(value = "/paper/listQuestion/{paperId}/{curPage}/{pageSize}")
|
|
public ResponseEntity<Object> listQuestionforSelect(@PathVariable String paperId,
|
|
public ResponseEntity<Object> listQuestionforSelect(@PathVariable String paperId,
|
|
- @PathVariable int curPage,
|
|
|
|
- @PathVariable int pageSize,
|
|
|
|
- @RequestParam(name = "quesType") String quesType,
|
|
|
|
- @RequestParam(name = "quesBody") String quesBody) {
|
|
|
|
- User user = getAccessUser();
|
|
|
|
- if(user == null){
|
|
|
|
- return new ResponseEntity<Object>(new PageImpl<Question>(new ArrayList<Question>()),HttpStatus.OK);
|
|
|
|
|
|
+ @PathVariable int curPage,
|
|
|
|
+ @PathVariable int pageSize,
|
|
|
|
+ @RequestParam(name = "quesType") String quesType,
|
|
|
|
+ @RequestParam(name = "quesBody") String quesBody) {
|
|
|
|
+ User user = getAccessUser();
|
|
|
|
+ if (user == null) {
|
|
|
|
+ return new ResponseEntity<Object>(new PageImpl<Question>(new ArrayList<Question>()), HttpStatus.OK);
|
|
}
|
|
}
|
|
QuesStructType quesStructType = null;
|
|
QuesStructType quesStructType = null;
|
|
if (StringUtils.isNotEmpty(quesType)) {
|
|
if (StringUtils.isNotEmpty(quesType)) {
|
|
- quesStructType = QuesStructType.valueOf(quesType);
|
|
|
|
|
|
+ quesStructType = QuesStructType.valueOf(quesType);
|
|
}
|
|
}
|
|
- Page<Question> questionPageList = paperService.listQuestionforSelect(paperId,curPage,pageSize,quesStructType,user,quesBody);
|
|
|
|
- return new ResponseEntity<Object>(questionPageList,HttpStatus.OK);
|
|
|
|
|
|
+ Page<Question> questionPageList = paperService.listQuestionforSelect(paperId, curPage, pageSize, quesStructType, user, quesBody);
|
|
|
|
+ return new ResponseEntity<Object>(questionPageList, HttpStatus.OK);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 向试卷中某道大题插入多道试题(已存在的试题)
|
|
* 向试卷中某道大题插入多道试题(已存在的试题)
|
|
|
|
+ *
|
|
* @param paperId
|
|
* @param paperId
|
|
* @param paperDetailId
|
|
* @param paperDetailId
|
|
* @param questions
|
|
* @param questions
|
|
@@ -490,15 +476,14 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "向导入试卷中的新增试题", notes = "向导入试卷中的新增试题")
|
|
@ApiOperation(value = "向导入试卷中的新增试题", notes = "向导入试卷中的新增试题")
|
|
@PostMapping(value = "/paper/selectQuestions/{paperId}/{paperDetailId}")
|
|
@PostMapping(value = "/paper/selectQuestions/{paperId}/{paperDetailId}")
|
|
public ResponseEntity<Object> selectQuestionsToPaper(@PathVariable String paperId,
|
|
public ResponseEntity<Object> selectQuestionsToPaper(@PathVariable String paperId,
|
|
- @PathVariable String paperDetailId, @RequestBody List<Question> questions) {
|
|
|
|
- User user = getAccessUser();
|
|
|
|
|
|
+ @PathVariable String paperDetailId, @RequestBody List<Question> questions) {
|
|
|
|
+ User user = getAccessUser();
|
|
return new ResponseEntity<Object>(paperService.selectQuestionsToPaper(paperId, paperDetailId, questions, user),
|
|
return new ResponseEntity<Object>(paperService.selectQuestionsToPaper(paperId, paperDetailId, questions, user),
|
|
HttpStatus.OK);
|
|
HttpStatus.OK);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @param request
|
|
|
|
* @param paperSearchInfo
|
|
* @param paperSearchInfo
|
|
* @param ids
|
|
* @param ids
|
|
* @param curPage
|
|
* @param curPage
|
|
@@ -509,11 +494,11 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "查询所有导入试卷(not in paperIds)", notes = "查询所有导入试卷(not in paperIds)")
|
|
@ApiOperation(value = "查询所有导入试卷(not in paperIds)", notes = "查询所有导入试卷(not in paperIds)")
|
|
@GetMapping(value = "/importPaper/{ids}/{curPage}/{pageSize}")
|
|
@GetMapping(value = "/importPaper/{ids}/{curPage}/{pageSize}")
|
|
public ResponseEntity<Object> getImportPapersNotInIds(@ModelAttribute PaperSearchInfo paperSearchInfo, @PathVariable String[] ids, @PathVariable int curPage,
|
|
public ResponseEntity<Object> getImportPapersNotInIds(@ModelAttribute PaperSearchInfo paperSearchInfo, @PathVariable String[] ids, @PathVariable int curPage,
|
|
- @PathVariable int pageSize) {
|
|
|
|
- User user = getAccessUser();
|
|
|
|
|
|
+ @PathVariable int pageSize) {
|
|
|
|
+ User user = getAccessUser();
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
if (ids != null && ids.length > 0) {
|
|
if (ids != null && ids.length > 0) {
|
|
- return new ResponseEntity<Object>(paperService.getPapersNotInIds(paperSearchInfo, ids, curPage, pageSize,PaperType.IMPORT),
|
|
|
|
|
|
+ return new ResponseEntity<Object>(paperService.getPapersNotInIds(paperSearchInfo, ids, curPage, pageSize, PaperType.IMPORT),
|
|
HttpStatus.OK);
|
|
HttpStatus.OK);
|
|
} else {
|
|
} else {
|
|
return new ResponseEntity<Object>(paperService.getImportPapers(paperSearchInfo, curPage, pageSize), HttpStatus.OK);
|
|
return new ResponseEntity<Object>(paperService.getImportPapers(paperSearchInfo, curPage, pageSize), HttpStatus.OK);
|
|
@@ -521,8 +506,6 @@ public class PaperController extends ControllerSupport{
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- *
|
|
|
|
- * @param request
|
|
|
|
* @param paperSearchInfo
|
|
* @param paperSearchInfo
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -530,7 +513,7 @@ public class PaperController extends ControllerSupport{
|
|
@ApiOperation(value = "查询该课程的所有导入试卷", notes = "查询该课程的所有导入试卷")
|
|
@ApiOperation(value = "查询该课程的所有导入试卷", notes = "查询该课程的所有导入试卷")
|
|
@GetMapping(value = "/importPaper/course")
|
|
@GetMapping(value = "/importPaper/course")
|
|
public ResponseEntity<Object> getImportPapersByCourseNo(@ModelAttribute PaperSearchInfo paperSearchInfo) {
|
|
public ResponseEntity<Object> getImportPapersByCourseNo(@ModelAttribute PaperSearchInfo paperSearchInfo) {
|
|
- User user = getAccessUser();
|
|
|
|
|
|
+ User user = getAccessUser();
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
paperService.formatPaperSearchInfo(paperSearchInfo);
|
|
paperService.formatPaperSearchInfo(paperSearchInfo);
|
|
Paper importPaper = BeanCopierUtil.copyProperties(paperSearchInfo, Paper.class);
|
|
Paper importPaper = BeanCopierUtil.copyProperties(paperSearchInfo, Paper.class);
|
|
@@ -538,129 +521,159 @@ public class PaperController extends ControllerSupport{
|
|
return new ResponseEntity<Object>(paperRepo.findAll(Example.of(importPaper)), HttpStatus.OK);
|
|
return new ResponseEntity<Object>(paperRepo.findAll(Example.of(importPaper)), HttpStatus.OK);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 使用原卷
|
|
* 使用原卷
|
|
- * @param request
|
|
|
|
|
|
+ *
|
|
* @param paperIds
|
|
* @param paperIds
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@ApiOperation(value = "复制导入试卷为组卷", notes = "复制导入试卷为组卷")
|
|
@ApiOperation(value = "复制导入试卷为组卷", notes = "复制导入试卷为组卷")
|
|
@PutMapping(value = "/useBasePaper/{paperIds}")
|
|
@PutMapping(value = "/useBasePaper/{paperIds}")
|
|
- public ResponseEntity<Object> useBasePaper(@PathVariable String paperIds){
|
|
|
|
- User user = getAccessUser();
|
|
|
|
- try{
|
|
|
|
- String[] paperIdArray = paperIds.split(",");
|
|
|
|
- for(int i = 0;i<paperIdArray.length;i++){
|
|
|
|
- Paper oldpaper = paperRepo.findOne(paperIdArray[i]);
|
|
|
|
- boolean result = paperService.checkPaperName(oldpaper.getName(),PaperType.GENERATE,user.getRootOrgId()+"");
|
|
|
|
- if(!result){
|
|
|
|
- throw new StatusException("Q-160565","考试试卷:"+oldpaper.getName()+"已经存在");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- paperService.useBasePaper(paperIds, user.getDisplayName());
|
|
|
|
- return new ResponseEntity<Object>(HttpStatus.OK);
|
|
|
|
- }catch(Exception e){
|
|
|
|
- throw new StatusException("Q-160537",e.getMessage());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ public ResponseEntity<Object> useBasePaper(@PathVariable String paperIds) {
|
|
|
|
+ User user = getAccessUser();
|
|
|
|
+ try {
|
|
|
|
+ String[] paperIdArray = paperIds.split(",");
|
|
|
|
+ for (int i = 0; i < paperIdArray.length; i++) {
|
|
|
|
+ Paper oldpaper = paperRepo.findOne(paperIdArray[i]);
|
|
|
|
+ boolean result = paperService.checkPaperName(oldpaper.getName(), PaperType.GENERATE, user.getRootOrgId() + "");
|
|
|
|
+ if (!result) {
|
|
|
|
+ throw new StatusException("Q-160565", "考试试卷:" + oldpaper.getName() + "已经存在");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ paperService.useBasePaper(paperIds, user.getDisplayName());
|
|
|
|
+ return new ResponseEntity<Object>(HttpStatus.OK);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ throw new StatusException("Q-160537", e.getMessage());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 上传音频文件检查
|
|
* 上传音频文件检查
|
|
|
|
+ *
|
|
* @param paperId
|
|
* @param paperId
|
|
* @param filesName
|
|
* @param filesName
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- @ApiOperation(value="上传音频文件检查",notes="上传音频文件检查")
|
|
|
|
- @PostMapping(value="/checkRadioFile/{paperId}")
|
|
|
|
- public ResponseEntity<Object> checkRadioFile(@PathVariable String paperId,@RequestBody List<String> filesName){
|
|
|
|
- Map<String, String> errorMessage = paperService.checkRadioFile(paperId, filesName);
|
|
|
|
- return new ResponseEntity<Object>(errorMessage,HttpStatus.OK);
|
|
|
|
|
|
+ @ApiOperation(value = "上传音频文件检查", notes = "上传音频文件检查")
|
|
|
|
+ @PostMapping(value = "/checkRadioFile/{paperId}")
|
|
|
|
+ public ResponseEntity<Object> checkRadioFile(@PathVariable String paperId, @RequestBody List<String> filesName) {
|
|
|
|
+ Map<String, String> errorMessage = paperService.checkRadioFile(paperId, filesName);
|
|
|
|
+ return new ResponseEntity<Object>(errorMessage, HttpStatus.OK);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- @ApiOperation(value="上传音频文件", notes="上传音频文件")
|
|
|
|
- @PostMapping(value="/uploadRadio/{paperId}")
|
|
|
|
- public ResponseEntity<Object> uploadRadio(List<MultipartFile> files,@PathVariable String paperId){
|
|
|
|
- User user = getAccessUser();
|
|
|
|
- try {
|
|
|
|
- paperService.uploadRadio(files, paperId, user);
|
|
|
|
- return new ResponseEntity<Object>(HttpStatus.OK);
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- return new ResponseEntity<Object>(e.getMessage(),HttpStatus.INTERNAL_SERVER_ERROR);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ @ApiOperation(value = "上传音频文件", notes = "上传音频文件")
|
|
|
|
+ @PostMapping(value = "/uploadRadio/{paperId}")
|
|
|
|
+ public ResponseEntity<Object> uploadRadio(List<MultipartFile> files, @PathVariable String paperId) {
|
|
|
|
+ User user = getAccessUser();
|
|
|
|
+ try {
|
|
|
|
+ paperService.uploadRadio(files, paperId, user);
|
|
|
|
+ return new ResponseEntity<Object>(HttpStatus.OK);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ return new ResponseEntity<Object>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "预览试卷页面")
|
|
|
|
+ @GetMapping(value = "/paper/pdf/{paperId}")
|
|
|
|
+ public String viewPaper(Model model, @PathVariable String paperId) {
|
|
|
|
+ PaperExp paper;
|
|
|
|
+ try {
|
|
|
|
+ paper = paperService.getPaperDto(paperId);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error(e.getMessage());
|
|
|
|
+ throw new StatusException("500", "试卷信息不存在!");
|
|
|
|
+ }
|
|
|
|
+ model.addAttribute("htmlList", JsonUtil.toJson(ParsePaper.convertPaperHtml(paper)));
|
|
|
|
+ model.addAttribute("courseName", paper.getCourseName());
|
|
|
|
+ model.addAttribute("courseNo", paper.getCourseNo());
|
|
|
|
+ return "paper";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "预览试卷答案页面")
|
|
|
|
+ @GetMapping(value = "/paper/answer/pdf/{paperId}")
|
|
|
|
+ public String viewPaperAnswer(Model model, @PathVariable String paperId) {
|
|
|
|
+ PaperExp paper;
|
|
|
|
+ try {
|
|
|
|
+ paper = paperService.getPaperDto(paperId);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ throw new StatusException("500", "试卷信息不存在!");
|
|
|
|
+ }
|
|
|
|
+ model.addAttribute("htmlList", JsonUtil.toJson(ParsePaper.convertAnswerHtml(paper)));
|
|
|
|
+ model.addAttribute("courseNo", paper.getCourseNo());
|
|
|
|
+ model.addAttribute("courseName", paper.getCourseName());
|
|
|
|
+ return "paperAnswer";
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 根据id获取试卷的html片段集合
|
|
* 根据id获取试卷的html片段集合
|
|
- * @return
|
|
|
|
*/
|
|
*/
|
|
- @ApiOperation(value="根据id获取试卷的html片段集合", notes="根据id获取试卷的html片段集合")
|
|
|
|
- @GetMapping(value="/paper/pdf/{paperId}")
|
|
|
|
- public ModelAndView getPaperPDFById(@PathVariable String paperId){
|
|
|
|
- ModelAndView view = new ModelAndView("paper");
|
|
|
|
- Map<String, Object> mag;
|
|
|
|
- try {
|
|
|
|
- mag = paperService.getPaperPDF(paperId,"paper");
|
|
|
|
- view.addObject("htmlList", JsonUtil.toJson(mag.get("htmlList")));
|
|
|
|
- view.addObject("courseName", mag.get("courseName"));
|
|
|
|
- view.addObject("courseNo", mag.get("courseNo"));
|
|
|
|
- return view;
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- return view;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ /*@ApiOperation(value = "根据id获取试卷的html片段集合", notes = "根据id获取试卷的html片段集合")
|
|
|
|
+ @GetMapping(value = "/paper/pdf/{paperId}")
|
|
|
|
+ public ModelAndView getPaperPDFById(@PathVariable String paperId) {
|
|
|
|
+ ModelAndView view = new ModelAndView("paper_bak");
|
|
|
|
+ Map<String, Object> mag;
|
|
|
|
+ try {
|
|
|
|
+ mag = paperService.getPaperPDF(paperId, "paper");
|
|
|
|
+ view.addObject("htmlList", JsonUtil.toJson(mag.get("htmlList")));
|
|
|
|
+ view.addObject("courseName", mag.get("courseName"));
|
|
|
|
+ view.addObject("courseNo", mag.get("courseNo"));
|
|
|
|
+ return view;
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ return view;
|
|
|
|
+ }
|
|
|
|
+ }*/
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 根据id获取试卷答案的html片段集合
|
|
* 根据id获取试卷答案的html片段集合
|
|
- * @return
|
|
|
|
*/
|
|
*/
|
|
- @ApiOperation(value="根据id获取试卷的html片段集合", notes="根据id获取试卷的html片段集合")
|
|
|
|
- @GetMapping(value="/paper/answer/pdf/{paperId}")
|
|
|
|
- public ModelAndView getPaperAnswerPDFById(@PathVariable String paperId){
|
|
|
|
- ModelAndView view = new ModelAndView("answer");
|
|
|
|
- Map<String, Object> mag;
|
|
|
|
- try {
|
|
|
|
- mag = paperService.getPaperPDF(paperId,"answer");
|
|
|
|
- view.addObject("htmlList", JsonUtil.toJson(mag.get("htmlList")));
|
|
|
|
- view.addObject("courseName", mag.get("courseName"));
|
|
|
|
- view.addObject("courseNo", mag.get("courseNo"));
|
|
|
|
- return view;
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- return view;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @ApiOperation(value="传送到印刷平台", notes="传送到印刷平台")
|
|
|
|
- @GetMapping(value="/sendPrint/{paperId}/{examId}/{orgId}")
|
|
|
|
|
|
+ /*@ApiOperation(value = "根据id获取试卷的html片段集合", notes = "根据id获取试卷的html片段集合")
|
|
|
|
+ @GetMapping(value = "/paper/answer/pdf/{paperId}")
|
|
|
|
+ public ModelAndView getPaperAnswerPDFById(@PathVariable String paperId) {
|
|
|
|
+ ModelAndView view = new ModelAndView("paperAnswer_bak");
|
|
|
|
+ Map<String, Object> mag;
|
|
|
|
+ try {
|
|
|
|
+ mag = paperService.getPaperPDF(paperId, "answer");
|
|
|
|
+ view.addObject("htmlList", JsonUtil.toJson(mag.get("htmlList")));
|
|
|
|
+ view.addObject("courseName", mag.get("courseName"));
|
|
|
|
+ view.addObject("courseNo", mag.get("courseNo"));
|
|
|
|
+ return view;
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ return view;
|
|
|
|
+ }
|
|
|
|
+ }*/
|
|
|
|
+ @ApiOperation(value = "传送到印刷平台", notes = "传送到印刷平台")
|
|
|
|
+ @GetMapping(value = "/sendPrint/{paperId}/{examId}/{orgId}")
|
|
public ResponseEntity<Object> sendPrint(@PathVariable String paperId,
|
|
public ResponseEntity<Object> sendPrint(@PathVariable String paperId,
|
|
- @PathVariable String orgId,
|
|
|
|
- @PathVariable String examId){
|
|
|
|
- paperService.sendPrint(paperId,orgId,examId);
|
|
|
|
- return new ResponseEntity<Object>(HttpStatus.OK);
|
|
|
|
|
|
+ @PathVariable String orgId,
|
|
|
|
+ @PathVariable String examId) {
|
|
|
|
+ paperService.sendPrint(paperId, orgId, examId);
|
|
|
|
+ return new ResponseEntity<Object>(HttpStatus.OK);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- @ApiOperation(value="根绝试卷id查询不同类型,题的数量")
|
|
|
|
- @GetMapping(value="/paper/questionNumbers/{paperId}/{publicityType}/{difficultyType}")
|
|
|
|
|
|
+ @ApiOperation(value = "根绝试卷id查询不同类型,题的数量")
|
|
|
|
+ @GetMapping(value = "/paper/questionNumbers/{paperId}/{publicityType}/{difficultyType}")
|
|
public ResponseEntity<Object> questionNumbers(@PathVariable String paperId,
|
|
public ResponseEntity<Object> questionNumbers(@PathVariable String paperId,
|
|
- @PathVariable Integer publicityType,
|
|
|
|
- @PathVariable Integer difficultyType){
|
|
|
|
- int total = paperService.getQuestionTypeNumbers(paperId, publicityType, difficultyType);
|
|
|
|
- return new ResponseEntity<Object>(total,HttpStatus.OK);
|
|
|
|
|
|
+ @PathVariable Integer publicityType,
|
|
|
|
+ @PathVariable Integer difficultyType) {
|
|
|
|
+ int total = paperService.getQuestionTypeNumbers(paperId, publicityType, difficultyType);
|
|
|
|
+ return new ResponseEntity<Object>(total, HttpStatus.OK);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- @ApiOperation(value="根绝试卷id查询不同类型,题的数量")
|
|
|
|
- @GetMapping(value="/paper/questionScores/{paperId}/{publicityType}/{difficultyType}")
|
|
|
|
|
|
+ @ApiOperation(value = "根绝试卷id查询不同类型,题的数量")
|
|
|
|
+ @GetMapping(value = "/paper/questionScores/{paperId}/{publicityType}/{difficultyType}")
|
|
public ResponseEntity<Object> questionScores(@PathVariable String paperId,
|
|
public ResponseEntity<Object> questionScores(@PathVariable String paperId,
|
|
- @PathVariable Integer publicityType,
|
|
|
|
- @PathVariable Integer difficultyType){
|
|
|
|
- double total = paperService.getQuestionTypeScore(paperId, publicityType, difficultyType);
|
|
|
|
- return new ResponseEntity<Object>(total,HttpStatus.OK);
|
|
|
|
|
|
+ @PathVariable Integer publicityType,
|
|
|
|
+ @PathVariable Integer difficultyType) {
|
|
|
|
+ double total = paperService.getQuestionTypeScore(paperId, publicityType, difficultyType);
|
|
|
|
+ return new ResponseEntity<Object>(total, HttpStatus.OK);
|
|
}
|
|
}
|
|
}
|
|
}
|