فهرست منبع

Merge branch 'stmms_ft_dev' of http://git.qmth.com.cn/luoshi/stmms-ft.git into test_20181225

ting.yin 6 سال پیش
والد
کامیت
d2b2bb4e80

+ 84 - 82
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/dao/ExamSubjectDao.java

@@ -1,82 +1,84 @@
-package cn.com.qmth.stmms.biz.exam.dao;
-
-import java.util.List;
-import java.util.Set;
-
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Modifying;
-import org.springframework.data.jpa.repository.Query;
-import org.springframework.data.repository.PagingAndSortingRepository;
-
-import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
-import cn.com.qmth.stmms.biz.exam.model.ExamSubjectPK;
-import cn.com.qmth.stmms.common.enums.ExamSubjectStatus;
-
-public interface ExamSubjectDao
-        extends PagingAndSortingRepository<ExamSubject, ExamSubjectPK>, JpaSpecificationExecutor<ExamSubject> {
-
-    @Query("select s from ExamSubject s where s.pk.examId=?1")
-    public List<ExamSubject> findByExamId(int examId);
-
-    @Query("select s.level from ExamSubject s where s.pk.examId=?1 and s.level is not null group by s.level")
-    public List<String> findDistinctLevel(int examId);
-
-    @Query("select s.category from ExamSubject s where s.pk.examId=?1 and s.category is not null group by s.category")
-    public List<String> findDistinctCategory(int examId);
-
-    @Query("select count(s) from ExamSubject s where s.pk.examId=?1")
-    public long countByExamId(int examId);
-
-    @Query("select s from ExamSubject s where s.pk.examId=?1 and s.pk.code=?2")
-    public ExamSubject findByExamIdAndCode(int examId, String code);
-
-    @Query("select s from ExamSubject s where s.pk.examId=?1 and s.uploadCount>?2")
-    public List<ExamSubject> findByExamIdAndUploadCountGt(int examId, int uploadCount);
-
-    @Query("select s from ExamSubject s where s.pk.examId=?1 and s.status=?2 and s.uploadCount>?3")
-    public List<ExamSubject> findByExamIdAndStatusAndUploadCountGt(int examId, ExamSubjectStatus status,
-            int uploadCount);
-
-    @Query("select s from ExamSubject s where s.pk.examId=?1 and s.status in ?2")
-    public List<ExamSubject> findByExamIdAndStatus(int examId, Set<ExamSubjectStatus> status);
-
-    @Query("select s from ExamSubject s where s.status in ?1")
-    public List<ExamSubject> findByStatus(Set<ExamSubjectStatus> status);
-
-    @Query("select count(s) from ExamSubject s where s.pk.examId=?1 and s.status in ?2")
-    public long countByExamIdAndStatus(int examId, Set<ExamSubjectStatus> status);
-
-    @Modifying
-    @Query("update ExamSubject s set s.status=?2 where s.pk.examId=?1")
-    public void updateStatusByExamId(int examId, ExamSubjectStatus status);
-
-    @Modifying
-    @Query("update ExamSubject s set s.totalScore=s.objectiveScore+s.subjectiveScore where s.pk.examId=?1")
-    public void updateTotalScoreByExamId(int examId);
-
-    @Modifying
-    @Query("update ExamSubject s set s.totalScore=s.objectiveScore+s.subjectiveScore where s.pk.examId=?1 and s.pk.code=?2")
-    public void updateTotalScoreByExamIdAndCode(int examId, String code);
-
-    @Modifying
-    @Query("update ExamSubject s set s.objectiveScore=?3 where s.pk.examId=?1 and s.pk.code=?2")
-    public void updateObjectiveScore(int examId, String code, double score);
-
-    @Modifying
-    @Query("update ExamSubject s set s.subjectiveScore=?3 where s.pk.examId=?1 and s.pk.code=?2")
-    public void updateSubjectiveScore(int examId, String code, double score);
-
-    @Modifying
-    @Query("delete ExamSubject s where s.pk.examId=?1")
-    void deleteByExamId(int examId);
-
-    @Modifying
-    @Query("update ExamSubject s set s.uploadCount=(select count(s) from ExamStudent es where es.examId=?1 "
-            + "and es.subjectCode=?2 and es.upload=true and es.absent=false) where s.pk.examId=?1 and s.pk.code=?2")
-    public void updateUploadByExamIdAndCode(Integer examId, String subjectCode);
-
-    @Modifying
-    @Query("update ExamSubject s set s.uploadCount=(select count(s) from ExamStudent es where es.examId=?1 "
-            + "and es.subjectCode=s.pk.code and es.upload=true and es.absent=false) where s.pk.examId=?1")
-    public void updateUploadByExamId(Integer examId);
-}
+package cn.com.qmth.stmms.biz.exam.dao;
+
+import java.util.List;
+import java.util.Set;
+
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.PagingAndSortingRepository;
+
+import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
+import cn.com.qmth.stmms.biz.exam.model.ExamSubjectPK;
+import cn.com.qmth.stmms.common.enums.ExamSubjectStatus;
+
+public interface ExamSubjectDao
+        extends PagingAndSortingRepository<ExamSubject, ExamSubjectPK>, JpaSpecificationExecutor<ExamSubject> {
+
+    @Query("select s from ExamSubject s where s.pk.examId=?1")
+    public List<ExamSubject> findByExamId(int examId);
+
+    @Query("select s.level from ExamSubject s where s.pk.examId=?1 and s.level is not null group by s.level")
+    public List<String> findDistinctLevel(int examId);
+
+    @Query("select s.category from ExamSubject s where s.pk.examId=?1 and s.category is not null group by s.category")
+    public List<String> findDistinctCategory(int examId);
+
+    @Query("select count(s) from ExamSubject s where s.pk.examId=?1")
+    public long countByExamId(int examId);
+
+    @Query("select s from ExamSubject s where s.pk.examId=?1 and s.pk.code=?2")
+    public ExamSubject findByExamIdAndCode(int examId, String code);
+
+    @Query("select s from ExamSubject s where s.pk.examId=?1 and s.uploadCount>?2")
+    public List<ExamSubject> findByExamIdAndUploadCountGt(int examId, int uploadCount);
+
+    @Query("select s from ExamSubject s where s.pk.examId=?1 and s.status=?2 and s.uploadCount>?3")
+    public List<ExamSubject> findByExamIdAndStatusAndUploadCountGt(int examId, ExamSubjectStatus status,
+            int uploadCount);
+
+    @Query("select s from ExamSubject s where s.pk.examId=?1 and s.status in ?2")
+    public List<ExamSubject> findByExamIdAndStatus(int examId, Set<ExamSubjectStatus> status);
+
+    @Query("select s from ExamSubject s where s.status in ?1")
+    public List<ExamSubject> findByStatus(Set<ExamSubjectStatus> status);
+
+    @Query("select count(s) from ExamSubject s where s.pk.examId=?1 and s.status in ?2")
+    public long countByExamIdAndStatus(int examId, Set<ExamSubjectStatus> status);
+
+    @Modifying
+    @Query("update ExamSubject s set s.status=?2 where s.pk.examId=?1")
+    public void updateStatusByExamId(int examId, ExamSubjectStatus status);
+
+    @Modifying
+    @Query("update ExamSubject s set s.totalScore=s.objectiveScore+s.subjectiveScore where s.pk.examId=?1")
+    public void updateTotalScoreByExamId(int examId);
+
+    @Modifying
+    @Query("update ExamSubject s set s.totalScore=s.objectiveScore+s.subjectiveScore where s.pk.examId=?1 and s.pk.code=?2")
+    public void updateTotalScoreByExamIdAndCode(int examId, String code);
+
+    @Modifying
+    @Query("update ExamSubject s set s.objectiveScore=?3 where s.pk.examId=?1 and s.pk.code=?2")
+    public void updateObjectiveScore(int examId, String code, double score);
+
+    @Modifying
+    @Query("update ExamSubject s set s.subjectiveScore=?3 where s.pk.examId=?1 and s.pk.code=?2")
+    public void updateSubjectiveScore(int examId, String code, double score);
+
+    @Modifying
+    @Query("delete ExamSubject s where s.pk.examId=?1")
+    void deleteByExamId(int examId);
+
+    @Modifying
+    @Query("update ExamSubject s set s.uploadCount=(select count(s) from ExamStudent es where es.examId=?1 "
+            + "and es.subjectCode=?2 and es.upload=true and es.absent=false and es.breach=false) "
+            + "where s.pk.examId=?1 and s.pk.code=?2")
+    public void updateUploadByExamIdAndCode(Integer examId, String subjectCode);
+
+    @Modifying
+    @Query("update ExamSubject s set s.uploadCount=(select count(s) from ExamStudent es where es.examId=?1 "
+            + "and es.subjectCode=s.pk.code and es.upload=true and es.absent=false and es.breach=false) "
+            + "where s.pk.examId=?1")
+    public void updateUploadByExamId(Integer examId);
+}

+ 6 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/MarkGroupService.java

@@ -30,4 +30,10 @@ public interface MarkGroupService {
 
     void resetBuildTime(int examId, String subjectCode);
 
+	void updateDoubleRate(int examId, String subjectCode, Integer number,
+			Double doubleRate);
+
+	void updateArbitrateThreshold(int examId, String subjectCode,
+			Integer number, Double arbitrateThreshold);
+
 }

+ 17 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/MarkGroupServiceImpl.java

@@ -93,4 +93,21 @@ public class MarkGroupServiceImpl extends BaseQueryService<MarkGroup> implements
         return groupDao.countByExamId(examId);
     }
 
+	@Override
+	public void updateDoubleRate(int examId, String subjectCode,
+			Integer number, Double doubleRate) {
+		MarkGroup group  = findOne(examId, subjectCode, number); 
+		group.setDoubleRate(doubleRate);
+		save(group);
+	}
+
+	@Override
+	public void updateArbitrateThreshold(int examId, String subjectCode,
+			Integer number, Double arbitrateThreshold) {
+		MarkGroup group  = findOne(examId, subjectCode, number); 
+		group.setArbitrateThreshold(arbitrateThreshold);
+		save(group);
+		
+	}
+
 }

+ 4 - 2
stmms-web/src/main/java/cn/com/qmth/stmms/admin/dto/SubjectiveQuestionDTO.java

@@ -56,8 +56,9 @@ public class SubjectiveQuestionDTO implements QuestionDTO {
         setTotalScore(question.getTotalScore());
         setIntervalScore(question.getIntervalScore());
         setPicList(group != null ? group.getPicList() : "");
-        setDoubleRate(group != null && group.getDoubleRate() !=null ? group.getDoubleRate() : 0d);
-        setArbitrateThreshold(group != null && group.getArbitrateThreshold() !=null? group.getArbitrateThreshold() : 0d);
+        setDoubleRate(group != null && group.getDoubleRate() != null ? group.getDoubleRate() : 0d);
+        setArbitrateThreshold(
+                group != null && group.getArbitrateThreshold() != null ? group.getArbitrateThreshold() : 0d);
         setScorePolicy(group != null && group.getScorePolicy() != null ? group.getScorePolicy().getValue()
                 : ScorePolicy.AVG.getValue());
     }
@@ -77,6 +78,7 @@ public class SubjectiveQuestionDTO implements QuestionDTO {
         question.setPicList(picList);
         question.setDoubleRate(doubleRate);
         question.setArbitrateThreshold(arbitrateThreshold);
+        question.setScorePolicy(scorePolicy);
         return question;
     }
 

+ 2 - 3
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/MarkGroupController.java

@@ -277,12 +277,11 @@ public class MarkGroupController extends BaseExamController {
                 groupService.updateTitle(examId, subjectCode, number, title);
             }
             if (doubleRate != null) {
-                group.setDoubleRate(doubleRate);
+            	groupService.updateDoubleRate(examId, subjectCode, number, doubleRate);
             }
             if (arbitrateThreshold != null) {
-                group.setArbitrateThreshold(arbitrateThreshold);
+            	groupService.updateArbitrateThreshold(examId, subjectCode, number, arbitrateThreshold);
             }
-            groupService.save(group);
             // advance update
             ScorePolicy policy = scorePolicy != null ? ScorePolicy.findByValue(scorePolicy) : null;
             List<Double> scores = buildDoubleList(scoreList);

+ 360 - 0
stmms-web/src/main/webapp/sql/stmms_ft.sql

@@ -0,0 +1,360 @@
+# ************************************************************
+# Database: stmms_fenti
+# Generation Time: 2017-10-31 06:43:10 +0000
+# ************************************************************
+
+
+# Dump of table b_campus
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `b_campus`;
+
+CREATE TABLE `b_campus` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `school_id` int(11) NOT NULL COMMENT '学校ID',
+  `name` varchar(64) NOT NULL DEFAULT '' COMMENT '名称',
+  `province` varchar(16) DEFAULT '' COMMENT '省份',
+  `city` varchar(16) DEFAULT '' COMMENT '城市',
+  `district` varchar(16) DEFAULT NULL COMMENT '地区',
+  `address` varchar(128) DEFAULT NULL COMMENT '地址',
+  `phone` varchar(32) DEFAULT NULL COMMENT '电话',
+  `description` varchar(256) DEFAULT NULL COMMENT '学校描述',
+  PRIMARY KEY (`id`),
+  KEY `index1` (`school_id`,`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='学习中心表';
+
+
+
+# Dump of table b_school
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `b_school`;
+
+CREATE TABLE `b_school` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(64) NOT NULL COMMENT '名称',
+  `province` varchar(16) NOT NULL DEFAULT '' COMMENT '省份',
+  `city` varchar(16) NOT NULL DEFAULT '' COMMENT '城市',
+  `address` varchar(128) DEFAULT NULL COMMENT '地址',
+  `phone` varchar(32) DEFAULT NULL COMMENT '电话',
+  `logo_url` varchar(64) DEFAULT NULL COMMENT '图片地址',
+  `description` varchar(256) DEFAULT NULL COMMENT '描述',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否禁用',
+  `time_create` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '创建时间',
+  `time_modified` datetime DEFAULT NULL COMMENT '修改时间',
+  PRIMARY KEY (`id`),
+  KEY `area` (`province`,`city`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='学校表';
+
+
+
+# Dump of table b_tag
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `b_tag`;
+
+CREATE TABLE `b_tag` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(128) NOT NULL DEFAULT '' COMMENT '标记类型',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+LOCK TABLES `b_tag` WRITE;
+
+INSERT INTO `b_tag` (`id`, `name`)
+VALUES
+	(1,'试卷雷同'),
+	(2,'科目错误'),
+	(3,'贴错条码');
+
+UNLOCK TABLES;
+
+
+# Dump of table b_user
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `b_user`;
+
+CREATE TABLE `b_user` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `login_name` varchar(64) NOT NULL COMMENT '登录名',
+  `name` varchar(64) NOT NULL COMMENT '名称',
+  `password` varchar(128) NOT NULL COMMENT '密码',
+  `role` varchar(16) NOT NULL DEFAULT '' COMMENT '角色',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
+  `school_id` int(11) DEFAULT '0' COMMENT '所属学校ID',
+  `subject_code` varchar(32) DEFAULT NULL COMMENT '绑定科目代码',
+  `last_login_time` datetime DEFAULT NULL COMMENT '最后一次登录时间',
+  `last_login_ip` varchar(64) DEFAULT NULL COMMENT '最后一次登录IP',
+  `created_time` datetime NOT NULL COMMENT '创建时间',
+  `updated_time` datetime DEFAULT NULL COMMENT '修改时间',
+  PRIMARY KEY (`id`),
+  KEY `login_name` (`login_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户表';
+
+LOCK TABLES `b_user` WRITE;
+
+INSERT INTO `b_user` (`id`, `login_name`, `name`, `password`, `role`, `enable`, `school_id`, `subject_code`, `last_login_time`, `last_login_ip`, `created_time`, `updated_time`)
+VALUES
+	(1,'admin','超级管理员','f4f49b97cf567ca04b9bffdfc11d59ee','SYS_ADMIN',1,0,NULL,'2017-09-25 10:07:37','192.168.1.94','2013-10-16 18:11:51','2017-09-25 10:07:37');
+
+UNLOCK TABLES;
+
+
+# Dump of table eb_exam
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `eb_exam`;
+
+CREATE TABLE `eb_exam` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `name` varchar(64) NOT NULL COMMENT '考试名称',
+  `school_id` int(11) NOT NULL COMMENT '学校ID',
+  `exam_time` datetime NOT NULL COMMENT '考试时间',
+  `status` varchar(16) NOT NULL DEFAULT '0' COMMENT '状态',
+  `description` varchar(128) DEFAULT NULL COMMENT '描述',
+  `creator_id` int(11) NOT NULL COMMENT '创建人',
+  `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '创建时间',
+  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+  `force_special_tag` tinyint(1) NOT NULL COMMENT '强制标记',
+  PRIMARY KEY (`id`),
+  KEY `index1` (`school_id`,`create_time`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考试表';
+
+
+
+# Dump of table eb_exam_package
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `eb_exam_package`;
+
+CREATE TABLE `eb_exam_package` (
+  `exam_id` int(11) NOT NULL COMMENT '考试ID',
+  `code` varchar(128) NOT NULL DEFAULT '' COMMENT '试卷袋编号',
+  `pic_count` int(11) NOT NULL COMMENT '上传图片数量',
+  PRIMARY KEY (`exam_id`,`code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+# Dump of table eb_exam_question
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `eb_exam_question`;
+
+CREATE TABLE `eb_exam_question` (
+  `exam_id` int(11) NOT NULL COMMENT '考试ID',
+  `subject_code` varchar(32) NOT NULL DEFAULT '' COMMENT '科目代码',
+  `main_number` int(11) NOT NULL COMMENT '大题号',
+  `sub_number` int(11) NOT NULL COMMENT '小题号',
+  `is_objective` tinyint(1) NOT NULL COMMENT '是否客观题',
+  `main_title` varchar(32) NOT NULL DEFAULT '' COMMENT '大题名称',
+  `answer` varchar(16) DEFAULT NULL COMMENT '正确答案',
+  `total_score` double NOT NULL COMMENT '满分',
+  `interval_score` double NOT NULL COMMENT '评卷间隔分',
+  `full_count` int(11) DEFAULT NULL COMMENT '满分人数',
+  `total_count` int(11) DEFAULT NULL COMMENT '总人数',
+  `zero_count` int(11) DEFAULT NULL COMMENT '零分人数',
+  PRIMARY KEY (`exam_id`,`subject_code`,`is_objective`,`main_number`,`sub_number`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+# Dump of table eb_exam_student
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `eb_exam_student`;
+
+CREATE TABLE `eb_exam_student` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `exam_id` int(11) NOT NULL DEFAULT '0' COMMENT '考试ID',
+  `school_id` int(11) NOT NULL COMMENT '学校ID',
+  `campus_name` varchar(128) NOT NULL DEFAULT '0' COMMENT '学习中心名称',
+  `subject_code` varchar(32) NOT NULL DEFAULT '' COMMENT '科目代码',
+  `subject_name` varchar(32) NOT NULL DEFAULT '0' COMMENT '科目名称',
+  `exam_number` varchar(64) NOT NULL COMMENT '准考证号',
+  `student_code` varchar(64) NOT NULL DEFAULT '' COMMENT '学号',
+  `name` varchar(32) NOT NULL DEFAULT '' COMMENT '姓名',
+  `package_code` varchar(128) DEFAULT NULL COMMENT '试卷袋编号',
+  `exam_site` varchar(255) DEFAULT NULL COMMENT '考点',
+  `exam_room` varchar(255) DEFAULT NULL COMMENT '考场',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  `batch_code` varchar(32) DEFAULT NULL COMMENT '扫描批次号',
+  `sheet_count` int(11) NOT NULL COMMENT '原图数量',
+  `slice_count` int(11) NOT NULL COMMENT '小图数量',
+  `answers` text COMMENT '客观题识别结果',
+  `is_upload` tinyint(1) NOT NULL COMMENT '是否已上传',
+  `is_absent` tinyint(1) NOT NULL COMMENT '是否缺考',
+  `is_exception` tinyint(1) NOT NULL COMMENT '是否数据异常',
+  `upload_time` datetime DEFAULT NULL COMMENT '上传时间',
+  `objective_score` double DEFAULT NULL COMMENT '客观总分',
+  `subjective_score` double DEFAULT NULL COMMENT '主观总分',
+  `objective_score_list` text COMMENT '客观得分明细',
+  `subjective_score_list` text COMMENT '主观得分明细',
+  `subject_level` varchar(128) DEFAULT NULL COMMENT '层次',
+  `subject_category` varchar(128) DEFAULT NULL COMMENT '专业类型',
+  PRIMARY KEY (`id`),
+  KEY `index1` (`exam_id`,`exam_number`),
+  KEY `index2` (`exam_id`,`student_code`),
+  KEY `index3` (`exam_id`,`subject_code`,`upload_time`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考试考生库';
+
+
+
+# Dump of table eb_exam_subject
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `eb_exam_subject`;
+
+CREATE TABLE `eb_exam_subject` (
+  `exam_id` int(11) NOT NULL COMMENT '考试ID',
+  `code` varchar(32) NOT NULL DEFAULT '' COMMENT '科目代码',
+  `name` varchar(32) NOT NULL DEFAULT '' COMMENT '科目名称',
+  `level` varchar(128) DEFAULT NULL COMMENT '层次',
+  `category` varchar(128) DEFAULT NULL COMMENT '专业类型',
+  `status` int(11) NOT NULL COMMENT '状态',
+  `objective_score` double NOT NULL COMMENT '客观题满分',
+  `subjective_score` double NOT NULL COMMENT '主观题满分',
+  `total_score` double NOT NULL COMMENT '全卷满分',
+  `upload_count` int(11) NOT NULL COMMENT '已上传人数',
+  `has_answer` tinyint(1) NOT NULL COMMENT '是否上传答案',
+  `has_paper` tinyint(1) NOT NULL COMMENT '是否上传试卷',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`exam_id`,`code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+# Dump of table eb_export_imglist
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `eb_export_imglist`;
+
+CREATE TABLE `eb_export_imglist` (
+  `exam_id` int(11) NOT NULL,
+  `exam_number` varchar(50) COLLATE utf8_bin NOT NULL,
+  `Remark` varchar(255) COLLATE utf8_bin DEFAULT NULL,
+  PRIMARY KEY (`exam_id`,`exam_number`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;
+
+
+
+# Dump of table eb_mark_group
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `eb_mark_group`;
+
+CREATE TABLE `eb_mark_group` (
+  `exam_id` int(11) NOT NULL COMMENT '考试ID',
+  `subject_code` varchar(32) NOT NULL DEFAULT '' COMMENT '科目代码',
+  `number` int(11) NOT NULL COMMENT '大题号',
+  `title` varchar(128) NOT NULL DEFAULT '' COMMENT '名称',
+  `pic_list` varchar(128) NOT NULL DEFAULT '' COMMENT '小图序号',
+  `total_score` double NOT NULL COMMENT '满分',
+  `build_time` datetime DEFAULT NULL COMMENT '最后生成任务时间',
+  `library_count` int(11) NOT NULL COMMENT '任务总量',
+  `marked_count` int(11) NOT NULL COMMENT '已评数量',
+  `left_count` int(11) NOT NULL COMMENT '剩余数量',
+  `arbitrate_threshold` double DEFAULT NULL COMMENT '仲裁阈值',
+  `double_rate` double DEFAULT NULL COMMENT '双评比例',
+  `score_policy` varchar(255) DEFAULT NULL COMMENT '合分策略',
+  PRIMARY KEY (`exam_id`,`subject_code`,`number`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+# Dump of table eb_marker
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `eb_marker`;
+
+CREATE TABLE `eb_marker` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `exam_id` int(11) NOT NULL COMMENT '考试ID',
+  `subject_code` varchar(12) NOT NULL DEFAULT '' COMMENT '科目代码',
+  `group_number` int(11) NOT NULL COMMENT '大题号',
+  `login_name` varchar(128) NOT NULL DEFAULT '' COMMENT '登录名',
+  `name` varchar(32) NOT NULL DEFAULT '' COMMENT '姓名',
+  `password` varchar(128) NOT NULL DEFAULT '' COMMENT '密码',
+  `enable` tinyint(1) NOT NULL COMMENT '是否禁用',
+  `mode` varchar(16) DEFAULT NULL COMMENT '评卷模式',
+  `last_login_ip` varchar(64) DEFAULT NULL COMMENT '上次登录IP',
+  `last_login_time` datetime DEFAULT NULL COMMENT '上次登录时间',
+  PRIMARY KEY (`id`),
+  KEY `index1` (`login_name`),
+  KEY `index2` (`exam_id`,`subject_code`,`group_number`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='评卷员表';
+
+
+
+# Dump of table m_library
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `m_library`;
+
+CREATE TABLE `m_library` (
+  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `exam_id` int(11) NOT NULL COMMENT '考试ID',
+  `subject_code` varchar(32) NOT NULL DEFAULT '' COMMENT '科目代码',
+  `group_number` int(11) NOT NULL COMMENT '大题号',
+  `campus_id` int(11) NOT NULL COMMENT '学习中心ID',
+  `student_id` int(11) NOT NULL COMMENT '考生ID',
+  `exam_number` varchar(128) NOT NULL DEFAULT '' COMMENT '准考证号',
+  `marker_id` int(11) DEFAULT NULL COMMENT '评卷员ID',
+  `marker_time` datetime DEFAULT NULL COMMENT '评卷时间',
+  `marker_score` double DEFAULT NULL COMMENT '评卷总分',
+  `marker_score_list` varchar(256) DEFAULT NULL COMMENT '评卷给分明细',
+  `tags` varchar(255) DEFAULT NULL COMMENT '评卷标记',
+  `status` int(11) NOT NULL COMMENT '状态',
+  `header_id` int(11) DEFAULT NULL COMMENT '科组长ID',
+  `header_score` double DEFAULT NULL COMMENT '科组长总分',
+  `header_score_list` varchar(255) DEFAULT NULL COMMENT '科组长给分明细',
+  `header_time` datetime DEFAULT NULL COMMENT '科组长评卷时间',
+  `task_number` int(11) DEFAULT NULL COMMENT '任务号',
+  PRIMARY KEY (`id`),
+  KEY `index2` (`exam_id`,`subject_code`,`group_number`,`status`),
+  KEY `index1` (`student_id`,`group_number`),
+  KEY `index3` (`marker_id`,`status`,`marker_time`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+
+# Dump of table m_track
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `m_track`;
+
+CREATE TABLE `m_track` (
+  `library_id` int(11) NOT NULL COMMENT '任务ID',
+  `student_id` int(11) NOT NULL COMMENT '考生ID',
+  `question_number` varchar(128) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '完整题号',
+  `number` int(11) NOT NULL COMMENT '序号',
+  `exam_id` int(11) NOT NULL COMMENT '考试ID',
+  `subject_code` varchar(32) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '科目代码',
+  `group_number` int(11) NOT NULL COMMENT '大题题号',
+  `marker_id` int(11) NOT NULL COMMENT '评卷员ID',
+  `position_x` double NOT NULL COMMENT 'X轴坐标',
+  `position_y` double NOT NULL COMMENT 'Y轴坐标',
+  `score` double NOT NULL COMMENT '给分',
+  PRIMARY KEY (`library_id`,`number`,`question_number`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+
+# Dump of table s_score_rate
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `s_score_rate`;
+CREATE TABLE `s_score_rate` (
+  `campus_name` varchar(255) NOT NULL COMMENT '学习中心名称',
+  `exam_id` int(11) NOT NULL COMMENT '考试ID',
+  `main_number` int(11) NOT NULL COMMENT '大题题号',
+  `is_objective` tinyint(1) NOT NULL COMMENT '是否客观题',
+  `sub_number` int(11) NOT NULL COMMENT '小题 ',
+  `subject_code` varchar(255) NOT NULL COMMENT '科目代码',
+  `avg_score` double DEFAULT NULL COMMENT '平均分',
+  `main_title` varchar(255) DEFAULT NULL COMMENT '大题名称',
+  `total_score` double DEFAULT NULL COMMENT '总分',
+  PRIMARY KEY (`campus_name`,`exam_id`,`main_number`,`is_objective`,`sub_number`,`subject_code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+SET FOREIGN_KEY_CHECKS = 1;