智慧保安后台管理-外网
钟日健
2021-10-22 f63fff71fcd7a62ad73b0b9eda614f3b1fa3badf
src/main/java/org/springblade/modules/exam/controller/ExamPaperController.java
@@ -33,6 +33,7 @@
import org.springblade.modules.exam.service.ExamPaperService;
import org.springblade.modules.exam.vo.ExamPaperSubjectVO;
import org.springblade.modules.exam.vo.ExamPaperVO;
import org.springblade.modules.exam.vo.ExamSubjectChoicesVO;
import org.springblade.modules.exam.wrapper.ExamPaperWrapper;
import org.springblade.modules.training.entity.TrainExam;
import org.springblade.modules.training.entity.TrainingRegistration;
@@ -194,8 +195,8 @@
   @GetMapping("/queryRandomSubject")
   @ApiOperationSupport(order = 8)
   @ApiOperation(value = "考试题目绑定", notes = "传入exam")
   public R<List> queryRandomSubject(@ApiParam(value = "主键集合") ExamPaper exam) {
      List<ExamPaperSubjectVO> subject = examPaperService.queryRandomSubject(exam);
   public R<List> queryRandomSubject(@ApiParam(value = "主键集合") ExamPaperVO exam) {
      List<ExamSubjectChoicesVO> subject = examPaperService.queryRandomSubject(exam);
      return R.data(subject);
   }
@@ -327,6 +328,8 @@
         }
         if (month<=9){
            months = "0" + month;
         }else {
            months = String.valueOf(month);
         }
         if (day<=9){
            days = "0" + day;
@@ -341,8 +344,8 @@
            type = "m";
         }
         //获取考试名称前缀,去除数字,字母
         String examName
            = examPaper.getExamName().replaceAll("\\s*", "").replaceAll("[^(\\u4e00-\\u9fa5)]", "").substring(0,1);
//         String examName
//            = examPaper.getExamName().replaceAll("\\s*", "").replaceAll("[^(\\u4e00-\\u9fa5)]", "").substring(0,1);
         //前缀 = 年的最后两位  + 月份(两位) + 考试名称(中文拼音)首字母(去除数字,字母) + 考试类型 + 季度拼音首字母大写(春季就是 C)
//         String result = year
@@ -370,5 +373,16 @@
   }
   /**
    * 考试中页面刷新,1查询所有的答题信息,2查询所有的已答信息  3其他信息
    * @param examPaperVO 必须包含 scoreId
    * @return
    */
   @GetMapping("/getExamRefreshInfo")
   public R getExamRefreshInfo(ExamPaperVO examPaperVO){
      return R.data(examPaperService.getExamRefreshInfo(examPaperVO));
   }
}