|
@@ -257,7 +257,8 @@ public class PaperController extends ControllerSupport {
|
|
|
@ApiOperation(value = "查询所有导入试卷(not in paperIds)", notes = "查询所有导入试卷(not in paperIds)")
|
|
|
@GetMapping(value = "/genPaper/huoge/{curPage}/{pageSize}")
|
|
|
public ResponseEntity<Object> getGenPapersNotInIds(@ModelAttribute PaperSearchInfo paperSearchInfo,
|
|
|
- @RequestParam String ids, @PathVariable int curPage, @PathVariable int pageSize) {
|
|
|
+ @RequestParam String ids, @PathVariable int curPage,
|
|
|
+ @PathVariable int pageSize) {
|
|
|
User user = getAccessUser();
|
|
|
UserDataRule ud = getUserDataRule(DataRuleType.COURSE);
|
|
|
paperSearchInfo.setOrgId(user.getRootOrgId().toString());
|
|
@@ -274,7 +275,8 @@ public class PaperController extends ControllerSupport {
|
|
|
ret = paperService.getGenPapers(paperSearchInfo, curPage - 1, pageSize,ud);
|
|
|
}
|
|
|
}
|
|
|
- if(ret!=null&&CollectionUtils.isNotEmpty(ret.getContent())) {
|
|
|
+ if(ret!=null&&CollectionUtils.isNotEmpty(ret.getContent())
|
|
|
+ &&paperSearchInfo.getFillCount()!=null&&paperSearchInfo.getFillCount()) {
|
|
|
setPaperQuesCountAndScore(ret.getContent());
|
|
|
}
|
|
|
return new ResponseEntity<>(ret, HttpStatus.OK);
|
|
@@ -621,7 +623,8 @@ public class PaperController extends ControllerSupport {
|
|
|
ret = paperService.getImportPapers(paperSearchInfo, curPage - 1, pageSize,ud);
|
|
|
}
|
|
|
}
|
|
|
- if(ret!=null&&CollectionUtils.isNotEmpty(ret.getContent())) {
|
|
|
+ if(ret!=null&&CollectionUtils.isNotEmpty(ret.getContent())
|
|
|
+ &&paperSearchInfo.getFillCount()!=null&&paperSearchInfo.getFillCount()) {
|
|
|
setPaperQuesCountAndScore(ret.getContent());
|
|
|
}
|
|
|
return new ResponseEntity<>(ret, HttpStatus.OK);
|
|
@@ -635,7 +638,7 @@ public class PaperController extends ControllerSupport {
|
|
|
initQuesCountAndScore(paper);
|
|
|
Map<String, Integer> quesCount = paper.getQuesCount();
|
|
|
Map<String, Double> quesScore = paper.getQuesScore();
|
|
|
- List<PaperDetailUnit> units = paperDetailUnitRepo.findByPaperOrderByNumber(paper);
|
|
|
+ List<PaperDetailUnit> units = paperDetailUnitRepo.findByPaper(paper);
|
|
|
if (units != null && units.size() > 0) {
|
|
|
for (PaperDetailUnit unit : units) {
|
|
|
if (unit.getQuestion().getPublicity() == null) {
|