ting.yin hace 2 años
padre
commit
9c55e25de8

+ 2 - 3
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/dao/SubjectiveScoreDao.java

@@ -41,8 +41,7 @@ public interface SubjectiveScoreDao extends JpaRepository<SubjectiveScore, Subje
             + "(select g.pk.studentId from MarkGroupStudent g where g.pk.studentId=s.pk.studentId and g.status=?4)")
     void deleteByStudentGroupStatus(Integer examId, String subjectCode, Integer groupNumber, SubjectiveStatus status);
 
-    // @Query("select s from SubjectiveScore s where s.pk.studentId=?1 and s.uncalculate=?2 order by s.pk.mainNumber, s.pk.subNumber")
-    // List<SubjectiveScore> findByStudentIdAndUncalculate(Integer studentId,
-    // Boolean uncalculate);
+    @Query("select s from SubjectiveScore s where s.pk.studentId=?1 and s.uncalculate=?2 order by s.pk.mainNumber, s.pk.subNumber")
+    List<SubjectiveScore> findByStudentIdAndUncalculate(Integer studentId, Boolean uncalculate);
 
 }

+ 4 - 5
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/SubjectiveScoreServiceImpl.java

@@ -113,11 +113,10 @@ public class SubjectiveScoreServiceImpl extends BaseQueryService<SubjectiveScore
     @Override
     public Set<Integer> findMainNumberByStudentIdAndUncalculate(Integer studentId, Boolean uncalculate) {
         Set<Integer> mainNumbers = new HashSet<Integer>();
-        // List<SubjectiveScore> list =
-        // scoreDao.findByStudentIdAndUncalculate(studentId, uncalculate);
-        // for (SubjectiveScore subjectiveScore : list) {
-        // mainNumbers.add(subjectiveScore.getMainNumber());
-        // }
+        List<SubjectiveScore> list = scoreDao.findByStudentIdAndUncalculate(studentId, uncalculate);
+        for (SubjectiveScore subjectiveScore : list) {
+            mainNumbers.add(subjectiveScore.getMainNumber());
+        }
         return mainNumbers;
     }
 }

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/ExamController.java

@@ -180,7 +180,7 @@ public class ExamController extends BaseExamController {
         // long markerCount = markerService.countByExam(exam.getId());
         long scanCount = examStudentService.countByExamIdAndUpload(examId, true);
         long markedCount = examStudentService.countByExamIdAndSubjectiveScoreListIsNotNull(examId);
-        long sheetCount = examStudentService.countSheetCountByExamId(examId);
+        long sheetCount = studentCount == 0 ? 0 : examStudentService.countSheetCountByExamId(examId);
 
         List<ExamInfoVO> voList = new ArrayList<ExamInfoVO>();
 

+ 26 - 2
stmms-web/src/main/webapp/sql/stmms_ft.sql

@@ -93,8 +93,9 @@ CREATE TABLE `b_user`
     `updated_time`              datetime    DEFAULT NULL COMMENT '修改时间',
     `access_token`              varchar(64) DEFAULT NULL COMMENT '访问令牌',
     `access_token_refresh_time` datetime    DEFAULT NULL COMMENT '访问令牌刷新时间',
-    `scan_token`              varchar(64) DEFAULT NULL COMMENT '扫描访问令牌',
-    `scan_token_invalid_time` datetime    DEFAULT NULL COMMENT '扫描访问令牌刷新时间',
+    `scan_token`              	varchar(64) DEFAULT NULL COMMENT '扫描访问令牌',
+    `scan_token_invalid_time` 	datetime    DEFAULT NULL COMMENT '扫描访问令牌刷新时间',
+    `description` 				varchar(128) DEFAULT NULL COMMENT '描述',
     PRIMARY KEY (`id`),
     UNIQUE KEY `index1` (`login_name`),
     UNIQUE KEY `index2` (`school_id`, `related_account`),
@@ -298,6 +299,7 @@ CREATE TABLE `eb_exam_student`
     `college`               varchar(64) NOT NULL COMMENT '学院',
     `class_name`            varchar(64) NOT NULL COMMENT '班级',
     `teacher`               varchar(64) NOT NULL COMMENT '任课老师',
+    `card_number` 			int (11) 	DEFAULT NULL COMMENT '题卡号',
     PRIMARY KEY (`id`),
     UNIQUE KEY `index1` (`exam_id`, `exam_number`),
     UNIQUE KEY `index2` (`exam_id`, `secret_number`),
@@ -305,7 +307,23 @@ CREATE TABLE `eb_exam_student`
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4 COMMENT ='考试考生库';
 
+# Dump of table eb_inspect_history
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `eb_inspect_history`;
 
+CREATE TABLE `eb_inspect_history` 
+(
+	`id` 		INT (11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+	`exam_id`	INT (11) NOT NULL COMMENT '考试ID',
+	`subject_code` 	VARCHAR (32) NOT NULL COMMENT '科目代码',
+	`inspect_time` 	DATETIME NOT NULL COMMENT '复核时间',
+	`inspector_id` 	INT (11) DEFAULT NULL COMMENT '复核人ID',
+	`student_id` 	INT (11) DEFAULT NULL COMMENT '考生ID',
+	PRIMARY KEY (`id`),
+	KEY `index1` (`student_id`),
+) ENGINE = INNODB 
+	DEFAULT CHARSET = utf8mb4 COMMENT = '复核记录表';
 
 # Dump of table eb_exam_subject
 # ------------------------------------------------------------
@@ -354,6 +372,7 @@ CREATE TABLE `eb_marker`
     `top_count`    int(11)     DEFAULT NULL COMMENT '评卷数上限',
     `finish_count` int(11)     DEFAULT NULL COMMENT '完成数量',
     `valid_count`  int(11)     DEFAULT NULL COMMENT '有效数量',
+    `reject_count` int(11) 	   DEFAULT NULL COMMENT '打回次数',
     `avg_score`    double      DEFAULT NULL COMMENT '平均分',
     `avg_speed`    double      DEFAULT NULL COMMENT '平均时长',
     `stdev_score`  double      DEFAULT NULL COMMENT '标准差',
@@ -447,6 +466,7 @@ CREATE TABLE `eb_subjective_score`
     `main_score`   double      NOT NULL COMMENT '大题得分',
     `score`        double      NOT NULL COMMENT '小题得分',
     `unanswered_count`   	int(11)	NOT NULL COMMENT '未作答的步骤数量',
+    `uncalculate`			tinyint (1) NOT NULL COMMENT '是否合分',
     PRIMARY KEY (`student_id`, `main_number`, `sub_number`),
     KEY `index1` (`exam_id`, `subject_code`, `main_number`, `main_score`)
 ) ENGINE = InnoDB
@@ -465,6 +485,8 @@ CREATE TABLE `eb_selective_group`
     `main_number`         int(11)     NOT NULL COMMENT '大题号',
     `selective_count`     int(11)     NOT NULL COMMENT '选做数量',
     `selective_index`     int(11)     NOT NULL COMMENT '选做分组序号',
+    `selective_part` 	  int (11) 	  NOT NULL COMMENT '选做题分区号',
+    `score_policy`		  varchar(64) DEFAULT NULL COMMENT '合分方式',
     PRIMARY KEY (`exam_id`, `subject_code`, `main_number`)
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4 COMMENT ='选做题分组表';
@@ -548,6 +570,7 @@ CREATE TABLE `m_library`
     `header_score`      double       DEFAULT NULL COMMENT '科组长总分',
     `header_score_list` text		 DEFAULT NULL COMMENT '科组长给分明细',
     `unanswered_count`  int(11)		 DEFAULT NULL COMMENT '未作答的步骤数量',
+    `reject_reason` 	varchar(128) DEFAULT NULL COMMENT '打回原因',
     PRIMARY KEY (`id`),
     KEY `index1` (`exam_id`, `subject_code`, `group_number`, `status`),
     UNIQUE KEY `index2` (`student_id`, `group_number`, `task_number`),
@@ -1015,6 +1038,7 @@ CREATE TABLE `eb_answer_card`
 	`single_page`		tinyint(1)	DEFAULT NULL COMMENT '单页模式',
 	`source`			varchar(16) NOT NULL COMMENT '来源',
 	`md5`				varchar(255) DEFAULT NULL COMMENT '文件md5',
+	`slice_config` 		text 		 DEFAULT NULL COMMENT '裁切配置',
 	`parameter`			varchar(255) DEFAULT NULL COMMENT '其他属性',
 	`remark`			varchar(255) DEFAULT NULL COMMENT '备注',
     `update_time`  		datetime     DEFAULT NULL COMMENT '修改时间',