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
     //有效期
63
     //有效期
64
     private String usertime;
64
     private String usertime;
65
 
65
 
66
+    //考号
67
+    private String examno;
68
+
66
     //创建人id
69
     //创建人id
67
     private Integer createid;
70
     private Integer createid;
68
 
71
 

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save