Explorar el Código

数据库字段调整:courseId

deason hace 6 años
padre
commit
90ba672323

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

@@ -39,6 +39,7 @@ public class CoursePaper extends IdEntity {
      */
     @Column(length = 50)
     private String courseCode;
+    private Long courseId;
     /**
      * 课程名称
      */
@@ -89,6 +90,14 @@ public class CoursePaper extends IdEntity {
         this.paperId = paperId;
     }
 
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
     public String getCourseCode() {
         return courseCode;
     }

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

@@ -38,6 +38,7 @@ public class CourseStatistic extends IdEntity {
      */
     @Column(length = 50)
     private String courseCode;
+    private Long courseId;
     /**
      * 课程名称
      */
@@ -73,6 +74,14 @@ public class CourseStatistic extends IdEntity {
         this.coursePaperId = coursePaperId;
     }
 
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
     public String getCourseCode() {
         return courseCode;
     }

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

@@ -34,6 +34,7 @@ public class ObjectiveQuestionStructure extends IdEntity {
     //@ExcelProperty(name = "课程代码", index = 0)
     @Column(length = 50)
     private String courseCode;
+    private Long courseId;
     /**
      * 课程名称
      */
@@ -98,6 +99,14 @@ public class ObjectiveQuestionStructure extends IdEntity {
         this.paperId = paperId;
     }
 
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
     public String getCourseCode() {
         return courseCode;
     }

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

@@ -34,6 +34,7 @@ public class SubjectiveQuestionStructure extends IdEntity {
     //@ExcelProperty(name = "科目代码", index = 0)
     @Column(length = 50)
     private String courseCode;
+    private Long courseId;
     /**
      * 课程名称
      */
@@ -90,6 +91,14 @@ public class SubjectiveQuestionStructure extends IdEntity {
         this.paperId = paperId;
     }
 
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
     public String getCourseCode() {
         return courseCode;
     }

+ 123 - 121
examcloud-core-print-dao/src/main/resources/db-schema.sql

@@ -1,187 +1,189 @@
-
 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,
+  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_id       bigint(20)          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;
+) 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,
+  id              bigint(20) NOT NULL AUTO_INCREMENT,
+  creation_time   datetime            DEFAULT NULL,
+  update_time     datetime            DEFAULT NULL,
+  course_id       bigint(20)          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;
+) 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,
+  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;
+) 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,
+  id            bigint(20) NOT NULL AUTO_INCREMENT,
+  creation_time datetime            DEFAULT NULL,
+  update_time   datetime            DEFAULT NULL,
+  answer        varchar(50)         DEFAULT NULL,
+  course_id     bigint(20)          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;
+) 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,
+  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;
+) 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,
+  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;
+) 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,
+  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;
+) 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,
+  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;
+) 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,
+  id            bigint(20) NOT NULL AUTO_INCREMENT,
+  creation_time datetime            DEFAULT NULL,
+  update_time   datetime            DEFAULT NULL,
+  course_id     bigint(20)          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;
+) 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,
+  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;
-
+) ENGINE = InnoDB DEFAULT CHARSET = utf8;