Browse Source

添加学校问题,考试状态

tags/正式版本
王宁 2 years ago
parent
commit
03adea46cc

+ 3
- 0
sapi/src/main/java/com/xhkjedu/sapi/model/system/TUser.java View File

@@ -63,6 +63,9 @@ public class TUser extends BaseBean {
63 63
     //有效期
64 64
     private String usertime;
65 65
 
66
+    //考号
67
+    private String examno;
68
+
66 69
     //创建人id
67 70
     private Integer createid;
68 71
 

+ 2
- 2
sapi/src/main/java/com/xhkjedu/sapi/service/system/SchoolService.java View File

@@ -87,11 +87,11 @@ public class SchoolService {
87 87
             //添加角色模块
88 88
             roleModuleMapper.insertList(roleModules);
89 89
         } catch (DuplicateKeyException e) {
90
-            log.error("添加学校失败",e.getMessage());
90
+            log.error("添加学校失败:" + e.getMessage());
91 91
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
92 92
             throw new Exception("该管理员账号已存在");
93 93
         } catch (Exception e) {
94
-            log.error("添加学校失败",e.getMessage());
94
+            log.error("添加学校失败:" + e.getMessage());
95 95
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
96 96
             throw new Exception("添加学校失败");
97 97
         }

+ 1
- 0
sexam/src/main/java/com/xhkjedu/sexam/controller/exam/EBaseController.java View File

@@ -286,6 +286,7 @@ public class EBaseController {
286 286
         if (1 != vo.getExamstate()) return new ResultVo(0, "结束成功");
287 287
         try {
288 288
             eBaseService.updateExamStateEnd(eBase);
289
+            eReportGenerateService.generateExamReport(eBase.getExamid(), eBase.getCreateid());
289 290
             return new ResultVo(0, "结束成功");
290 291
         } catch (Exception e) {
291 292
             return new ResultVo(1, "结束失败");

+ 1
- 1
sexam/src/main/java/com/xhkjedu/sexam/model/exam/EBase.java View File

@@ -33,7 +33,7 @@ public class EBase extends BaseBean {
33 33
     //是否启用监控0未启用1启用
34 34
     private Integer monitored;
35 35
 
36
-    //考试状态0未开始1已开始2已结束
36
+    //考试状态0未开始1已开始2已结束3已生成报告
37 37
     private Integer examstate;
38 38
 
39 39
     //考试公告

+ 0
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/exam/EBaseService.java View File

@@ -265,7 +265,6 @@ public class EBaseService {
265 265
     public void updateExamStateEnd(EBase eBase) throws Exception {
266 266
         try {
267 267
             ePaperStudentMapper.updateStuscoreByExamId(eBase.getExamid());//更新未已提交未批阅完成学生得分
268
-            eReportGenerateService.generateExamReport(eBase.getExamid(), eBase.getCreateid());
269 268
             eBaseMapper.updateExamState(eBase.getExamid(),2);
270 269
 //            eBaseMapper.updateExamStateAndReportState(eBase.getExamid(),2);
271 270
             //结束考试时自动生成报告pdf,调用mq

+ 4
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportGenerateService.java View File

@@ -1,6 +1,7 @@
1 1
 package com.xhkjedu.sexam.service.report;
2 2
 
3 3
 import com.alibaba.fastjson.JSON;
4
+import com.xhkjedu.sexam.mapper.exam.EBaseMapper;
4 5
 import com.xhkjedu.sexam.mapper.exam.EClassMapper;
5 6
 import com.xhkjedu.sexam.mapper.paper.EPaperAnalyzeMapper;
6 7
 import com.xhkjedu.sexam.mapper.paper.EPaperQtypeMapper;
@@ -56,7 +57,8 @@ public class EReportGenerateService {
56 57
     private EPaperStudentQuestionMapper ePaperStudentQuestionMapper;
57 58
     @Resource
58 59
     private EPaperAnalyzeMapper ePaperAnalyzeMapper;
59
-
60
+    @Resource
61
+    private EBaseMapper eBaseMapper;
60 62
     @Resource
61 63
     private ERbaseMapper eRbaseMapper;
62 64
     @Resource
@@ -280,6 +282,7 @@ public class EReportGenerateService {
280 282
         }
281 283
         setClassGradeRankAll(examid, stunum, papers, classSubjectStudents, createid, userMap);//班级等级分布
282 284
         setAction(examid, userMap);//行为分析
285
+        eBaseMapper.updateExamState(examid,3);
283 286
     }
284 287
 
285 288
     //科目统计

Loading…
Cancel
Save