deason 6 سال پیش
والد
کامیت
63d410cab9

+ 31 - 0
examcloud-core-print-common/pom.xml

@@ -80,5 +80,36 @@
                 </exclusion>
             </exclusions>
         </dependency>
+        <!-- easyPoi start -->
+        <!--<dependency>
+            <groupId>cn.afterturn</groupId>
+            <artifactId>easypoi-base</artifactId>
+            <version>3.3.0</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.google.guava</groupId>
+                    <artifactId>guava</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.commons</groupId>
+                    <artifactId>commons-lang3</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-codec</groupId>
+                    <artifactId>commons-codec</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>cn.afterturn</groupId>
+            <artifactId>easypoi-web</artifactId>
+            <version>3.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.afterturn</groupId>
+            <artifactId>easypoi-annotation</artifactId>
+            <version>3.3.0</version>
+        </dependency>-->
+        <!-- easyPoi end -->
     </dependencies>
 </project>

+ 1 - 0
examcloud-core-print-dao/src/main/java/cn/com/qmth/examcloud/core/print/entity/CoursePaper.java

@@ -52,6 +52,7 @@ public class CoursePaper extends IdEntity {
     /**
      * 试卷P数(1P为1面,1张纸为2P)
      */
+    @Column(name = "paper_p")
     private Integer paperP;
     /**
      * 试卷文件URL

+ 187 - 1
examcloud-core-print-dao/src/main/resources/db-schema.sql

@@ -1 +1,187 @@
-/* todo */
+
+DROP TABLE IF EXISTS ec_prt_course_paper;
+CREATE TABLE ec_prt_course_paper (
+  id bigint(20) NOT NULL AUTO_INCREMENT,
+  creation_time datetime DEFAULT NULL,
+  update_time datetime DEFAULT NULL,
+  answer_file_url varchar(200) DEFAULT NULL,
+  course_code varchar(50) DEFAULT NULL,
+  course_name varchar(50) DEFAULT NULL,
+  exam_id bigint(20) DEFAULT NULL,
+  org_id bigint(20) DEFAULT NULL,
+  paper_file_url varchar(200) DEFAULT NULL,
+  paper_id varchar(50) DEFAULT NULL,
+  paper_name varchar(50) DEFAULT NULL,
+  paper_p int(11) DEFAULT NULL,
+  PRIMARY KEY (id),
+  KEY INDEX_PRT_COURSE_PAPER_01 (org_id),
+  KEY INDEX_PRT_COURSE_PAPER_02 (exam_id),
+  KEY INDEX_PRT_COURSE_PAPER_03 (course_code)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+DROP TABLE IF EXISTS ec_prt_course_statistic;
+CREATE TABLE ec_prt_course_statistic (
+  id bigint(20) NOT NULL AUTO_INCREMENT,
+  creation_time datetime DEFAULT NULL,
+  update_time datetime DEFAULT NULL,
+  course_code varchar(50) DEFAULT NULL,
+  course_name varchar(50) DEFAULT NULL,
+  course_paper_id bigint(20) DEFAULT NULL,
+  exam_id bigint(20) DEFAULT NULL,
+  org_id bigint(20) DEFAULT NULL,
+  paper_type varchar(50) DEFAULT NULL,
+  PRIMARY KEY (id),
+  KEY INDEX_PRT_COURSE_STATISTIC_01 (org_id),
+  KEY INDEX_PRT_COURSE_STATISTIC_02 (exam_id),
+  KEY INDEX_PRT_COURSE_STATISTIC_03 (course_paper_id)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+DROP TABLE IF EXISTS ec_prt_exam_structure;
+CREATE TABLE ec_prt_exam_structure (
+  id bigint(20) NOT NULL AUTO_INCREMENT,
+  creation_time datetime DEFAULT NULL,
+  update_time datetime DEFAULT NULL,
+  exam_id bigint(20) DEFAULT NULL,
+  exam_name varchar(50) DEFAULT NULL,
+  exam_type varchar(50) DEFAULT NULL,
+  org_id bigint(20) DEFAULT NULL,
+  org_name varchar(50) DEFAULT NULL,
+  school_id bigint(20) DEFAULT NULL,
+  school_name varchar(50) DEFAULT NULL,
+  PRIMARY KEY (id),
+  KEY INDEX_PRT_EXAM_STRUCTURE_01 (org_id),
+  KEY INDEX_PRT_EXAM_STRUCTURE_02 (exam_id),
+  KEY INDEX_PRT_EXAM_STRUCTURE_03 (school_id)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+DROP TABLE IF EXISTS ec_prt_objective_question_structure;
+CREATE TABLE ec_prt_objective_question_structure (
+  id bigint(20) NOT NULL AUTO_INCREMENT,
+  creation_time datetime DEFAULT NULL,
+  update_time datetime DEFAULT NULL,
+  answer varchar(50) DEFAULT NULL,
+  course_code varchar(50) DEFAULT NULL,
+  course_name varchar(50) DEFAULT NULL,
+  exam_id bigint(20) DEFAULT NULL,
+  paper_id varchar(50) DEFAULT NULL,
+  paper_name varchar(50) DEFAULT NULL,
+  paper_type varchar(50) DEFAULT NULL,
+  question_type varchar(50) DEFAULT NULL,
+  section_num int(11) DEFAULT NULL,
+  unit_num int(11) DEFAULT NULL,
+  unit_score double DEFAULT NULL,
+  PRIMARY KEY (id),
+  KEY INDEX_PRT_OBJECTIVE_QUESTION_01 (exam_id)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+DROP TABLE IF EXISTS ec_prt_project;
+CREATE TABLE ec_prt_project (
+  id bigint(20) NOT NULL AUTO_INCREMENT,
+  creation_time datetime DEFAULT NULL,
+  update_time datetime DEFAULT NULL,
+  completed bit(1) DEFAULT NULL,
+  exam_id bigint(20) DEFAULT NULL,
+  exam_name varchar(50) DEFAULT NULL,
+  mail_end_time datetime DEFAULT NULL,
+  mail_start_time datetime DEFAULT NULL,
+  org_id bigint(20) DEFAULT NULL,
+  org_name varchar(50) DEFAULT NULL,
+  pm_id bigint(20) DEFAULT NULL,
+  pm_name varchar(50) DEFAULT NULL,
+  prepare_end_time datetime DEFAULT NULL,
+  prepare_start_time datetime DEFAULT NULL,
+  print_end_time datetime DEFAULT NULL,
+  print_start_time datetime DEFAULT NULL,
+  supplier_id bigint(20) DEFAULT NULL,
+  supplier_name varchar(50) DEFAULT NULL,
+  PRIMARY KEY (id),
+  KEY INDEX_PRT_PROJECT_01 (org_id),
+  KEY INDEX_PRT_PROJECT_02 (exam_id)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+DROP TABLE IF EXISTS ec_prt_project_backup_setting;
+CREATE TABLE ec_prt_project_backup_setting (
+  id bigint(20) NOT NULL AUTO_INCREMENT,
+  creation_time datetime DEFAULT NULL,
+  update_time datetime DEFAULT NULL,
+  group_type varchar(255) DEFAULT NULL,
+  pkg_max double DEFAULT NULL,
+  pkg_min double DEFAULT NULL,
+  pkg_percent double DEFAULT NULL,
+  pkg_single_max double DEFAULT NULL,
+  pkg_single_min double DEFAULT NULL,
+  pkg_single_percent double DEFAULT NULL,
+  project_id bigint(20) DEFAULT NULL,
+  PRIMARY KEY (id),
+  KEY INDEX_PRT_PROJECT_BACKUP_01 (project_id)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+DROP TABLE IF EXISTS ec_prt_project_other_setting;
+CREATE TABLE ec_prt_project_other_setting (
+  id bigint(20) NOT NULL AUTO_INCREMENT,
+  creation_time datetime DEFAULT NULL,
+  update_time datetime DEFAULT NULL,
+  project_id bigint(20) DEFAULT NULL,
+  remark varchar(1000) DEFAULT NULL,
+  PRIMARY KEY (id),
+  KEY INDEX_PRT_PROJECT_OTHER_01 (project_id)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+DROP TABLE IF EXISTS ec_prt_question_statistic;
+CREATE TABLE ec_prt_question_statistic (
+  id bigint(20) NOT NULL AUTO_INCREMENT,
+  creation_time datetime DEFAULT NULL,
+  update_time datetime DEFAULT NULL,
+  exam_structure_id bigint(20) DEFAULT NULL,
+  question_total int(11) DEFAULT NULL,
+  question_type varchar(50) DEFAULT NULL,
+  PRIMARY KEY (id),
+  KEY INDEX_PRT_QUESTION_STATISTIC_01 (exam_structure_id)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+DROP TABLE IF EXISTS ec_prt_subjective_question_structure;
+CREATE TABLE ec_prt_subjective_question_structure (
+  id bigint(20) NOT NULL AUTO_INCREMENT,
+  creation_time datetime DEFAULT NULL,
+  update_time datetime DEFAULT NULL,
+  course_code varchar(50) DEFAULT NULL,
+  course_name varchar(50) DEFAULT NULL,
+  exam_id bigint(20) DEFAULT NULL,
+  paper_id varchar(50) DEFAULT NULL,
+  paper_name varchar(50) DEFAULT NULL,
+  paper_type varchar(255) DEFAULT NULL,
+  section_name varchar(100) DEFAULT NULL,
+  section_num int(11) DEFAULT NULL,
+  unit_num int(11) DEFAULT NULL,
+  unit_score double DEFAULT NULL,
+  PRIMARY KEY (id),
+  KEY INDEX_PRT_SUBJECTIVE_QUESTION_01 (exam_id)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+DROP TABLE IF EXISTS ec_prt_template;
+CREATE TABLE ec_prt_template (
+  id bigint(20) NOT NULL AUTO_INCREMENT,
+  creation_time datetime DEFAULT NULL,
+  update_time datetime DEFAULT NULL,
+  exam_id bigint(20) DEFAULT NULL,
+  exam_name varchar(50) DEFAULT NULL,
+  file_name varchar(50) DEFAULT NULL,
+  order_num int(11) DEFAULT NULL,
+  org_id bigint(20) DEFAULT NULL,
+  org_name varchar(50) DEFAULT NULL,
+  template_type varchar(50) DEFAULT NULL,
+  template_url varchar(200) DEFAULT NULL,
+  PRIMARY KEY (id),
+  KEY INDEX_PRT_TEMPLATE_01 (org_id),
+  KEY INDEX_PRT_TEMPLATE_02 (exam_id)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+

+ 1 - 1
examcloud-core-print-starter/src/main/resources/application-dev.properties

@@ -1,5 +1,5 @@
 # datasource config
-spring.datasource.url=jdbc:mysql://db-host:3306/exam_cloud_kf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true
+spring.datasource.url=jdbc:mysql://localhost:3306/exam_cloud_kf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true
 spring.datasource.username=root
 spring.datasource.password=root
 spring.jpa.hibernate.ddl-auto=update