Browse Source

增加单独时长

mingfu 2 weeks ago
parent
commit
b036b74c15

+ 2 - 2
back-ui/vite.config.js

@@ -3,8 +3,8 @@ import path from 'path'
 import createVitePlugins from './vite/plugins'
 import tailwindcss from '@tailwindcss/vite'
 
-// const baseUrl = 'http://localhost:8080' // 后端接口
-const baseUrl = 'https://dz.shineking.top/prod-api' // 后端接口
+const baseUrl = 'http://localhost:8080' // 后端接口
+// const baseUrl = 'https://dz.shineking.top/prod-api' // 后端接口
 
 // https://vitejs.dev/config/
 export default defineConfig(({ mode, command }) => {

+ 1 - 1
ie-admin/src/main/java/com/ruoyi/web/controller/learn/LearnTeacherController.java

@@ -103,7 +103,7 @@ public class LearnTeacherController extends BaseController {
     @ApiOperation("班级生成统计")
     public AjaxResult classStatistic(TestPaperVO.TestPaperBuildReq req)
     {
-        return AjaxResult.success(learnTeacherService.getClassesBuildStats(req, SecurityUtils.getUserId()));
+        return AjaxResult.success(learnTeacherService.getClassesBuildStats(req, SecurityUtils.getLoginUser().getUser().getUserTypeId()));
     }
 
 

+ 1 - 0
ie-admin/src/main/java/com/ruoyi/web/service/ExamService.java

@@ -353,6 +353,7 @@ public class ExamService {
         answer.setMark(null != question.getIsMark() && question.getIsMark());
         answer.setNotKnow(null != question.getIsNotKnow() && question.getIsNotKnow());
         answer.setState(question.calcState(stdAnswer, answerSheet.getIsDone()));
+        answer.setDuration(question.getDuration());
         if (answerSheet.getIsDone()) {
             answer.setScore(answer.getState() == 1 ? stdAnswer.getTotalScore() : 0);
             answer.setScoreRate(answer.getScore() * 100 / stdAnswer.getTotalScore());

+ 2 - 0
ie-system/src/main/java/com/ruoyi/learn/domain/PaperVO.java

@@ -84,6 +84,8 @@ public class PaperVO {
         Integer totalScore;
         @ApiModelProperty("学生得分")
         Integer score;
+        @ApiModelProperty("做题时长")
+        private Long duration;
 
         List<QuestionAnswer> subQuestions;