Parcourir la source

数据库字段调整

deason il y a 6 ans
Parent
commit
4f423e0b39

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

@@ -30,11 +30,6 @@ public class CoursePaper extends IdEntity {
      * 考试ID
      */
     private Long examId;
-    /**
-     * 试卷ID
-     */
-    @Column(length = 50)
-    private String paperId;
     /**
      * 课程ID
      */
@@ -49,6 +44,11 @@ public class CoursePaper extends IdEntity {
      */
     @Column(length = 50)
     private String courseName;
+    /**
+     * 试卷ID
+     */
+    @Column(length = 50)
+    private String paperId;
     /**
      * 试卷名称
      */
@@ -86,14 +86,6 @@ public class CoursePaper extends IdEntity {
         this.examId = examId;
     }
 
-    public String getPaperId() {
-        return paperId;
-    }
-
-    public void setPaperId(String paperId) {
-        this.paperId = paperId;
-    }
-
     public Long getCourseId() {
         return courseId;
     }
@@ -118,6 +110,14 @@ public class CoursePaper extends IdEntity {
         this.courseName = courseName;
     }
 
+    public String getPaperId() {
+        return paperId;
+    }
+
+    public void setPaperId(String paperId) {
+        this.paperId = paperId;
+    }
+
     public String getPaperName() {
         return paperName;
     }

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

@@ -30,10 +30,6 @@ public class CourseStatistic extends IdEntity {
      * 考试ID
      */
     private Long examId;
-    /**
-     * 绑定试卷ID(表ec_prt_course_paper的ID)
-     */
-    private Long coursePaperId;
     /**
      * 课程ID
      */
@@ -53,6 +49,20 @@ public class CourseStatistic extends IdEntity {
      */
     @Column(length = 50)
     private String paperType;
+    /**
+     * 绑定的课程试卷ID
+     * (表ec_prt_course_paper的ID)
+     */
+    private Long coursePaperId;
+    /**
+     * @See PaperBindingStatus.java
+     * 试卷绑定状态
+     */
+    private Integer bindingStatus;
+    /**
+     * 考生人数
+     */
+    private Integer totalStudent;
 
     public Long getOrgId() {
         return orgId;
@@ -70,14 +80,6 @@ public class CourseStatistic extends IdEntity {
         this.examId = examId;
     }
 
-    public Long getCoursePaperId() {
-        return coursePaperId;
-    }
-
-    public void setCoursePaperId(Long coursePaperId) {
-        this.coursePaperId = coursePaperId;
-    }
-
     public Long getCourseId() {
         return courseId;
     }
@@ -110,4 +112,28 @@ public class CourseStatistic extends IdEntity {
         this.paperType = paperType;
     }
 
+    public Long getCoursePaperId() {
+        return coursePaperId;
+    }
+
+    public void setCoursePaperId(Long coursePaperId) {
+        this.coursePaperId = coursePaperId;
+    }
+
+    public Integer getBindingStatus() {
+        return bindingStatus;
+    }
+
+    public void setBindingStatus(Integer bindingStatus) {
+        this.bindingStatus = bindingStatus;
+    }
+
+    public Integer getTotalStudent() {
+        return totalStudent;
+    }
+
+    public void setTotalStudent(Integer totalStudent) {
+        this.totalStudent = totalStudent;
+    }
+
 }

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

@@ -0,0 +1,144 @@
+/*
+ * *************************************************
+ * Copyright (c) 2018 QMTH. All Rights Reserved.
+ * Created by Deason on 2018-11-02 17:35:31.
+ * *************************************************
+ */
+
+package cn.com.qmth.examcloud.core.print.entity;
+
+import cn.com.qmth.examcloud.core.print.common.IdEntity;
+
+import javax.persistence.Entity;
+import javax.persistence.Index;
+import javax.persistence.Table;
+
+/**
+ * 印刷统计信息
+ */
+@Entity
+@Table(name = "ec_prt_project_statistic", indexes = {
+        @Index(name = "INDEX_PRT_PROJECT_STATISTIC_01", columnList = "orgId,examId", unique = true)})
+public class ProjectStatistic extends IdEntity {
+    /**
+     * 学校机构ID
+     */
+    private Long orgId;
+    /**
+     * 考试ID
+     */
+    private Long examId;
+    /**
+     * 人科次
+     */
+    private Integer totalStudent;
+    /**
+     * 课程数量
+     */
+    private Integer totalCourse;
+    /**
+     * 试卷数量
+     */
+    private Integer totalPaper;
+    /**
+     * 试卷袋数
+     */
+    private Integer totalPkg;
+    /**
+     * 常规 印刷数量A3
+     */
+    private Integer normalA3;
+    /**
+     * 常规 印刷数量A4
+     */
+    private Integer normalA4;
+    /**
+     * 备份 印刷数量A4
+     */
+    private Integer backupA3;
+    /**
+     * 备份 印刷数量A4
+     */
+    private Integer backupA4;
+
+    public Long getOrgId() {
+        return orgId;
+    }
+
+    public void setOrgId(Long orgId) {
+        this.orgId = orgId;
+    }
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public Integer getTotalStudent() {
+        return totalStudent;
+    }
+
+    public void setTotalStudent(Integer totalStudent) {
+        this.totalStudent = totalStudent;
+    }
+
+    public Integer getTotalCourse() {
+        return totalCourse;
+    }
+
+    public void setTotalCourse(Integer totalCourse) {
+        this.totalCourse = totalCourse;
+    }
+
+    public Integer getTotalPaper() {
+        return totalPaper;
+    }
+
+    public void setTotalPaper(Integer totalPaper) {
+        this.totalPaper = totalPaper;
+    }
+
+    public Integer getTotalPkg() {
+        return totalPkg;
+    }
+
+    public void setTotalPkg(Integer totalPkg) {
+        this.totalPkg = totalPkg;
+    }
+
+    public Integer getNormalA3() {
+        return normalA3;
+    }
+
+    public void setNormalA3(Integer normalA3) {
+        this.normalA3 = normalA3;
+    }
+
+    public Integer getNormalA4() {
+        return normalA4;
+    }
+
+    public void setNormalA4(Integer normalA4) {
+        this.normalA4 = normalA4;
+    }
+
+    public Integer getBackupA3() {
+        return backupA3;
+    }
+
+    public void setBackupA3(Integer backupA3) {
+        this.backupA3 = backupA3;
+    }
+
+    public Integer getBackupA4() {
+        return backupA4;
+    }
+
+    public void setBackupA4(Integer backupA4) {
+        this.backupA4 = backupA4;
+    }
+
+}

+ 0 - 35
examcloud-core-print-dao/src/main/java/cn/com/qmth/examcloud/core/print/enums/CoursePaperStatus.java

@@ -1,35 +0,0 @@
-/*
- * *************************************************
- * Copyright (c) 2018 QMTH. All Rights Reserved.
- * Created by Deason on 2018-10-17 16:28:20.
- * *************************************************
- */
-
-package cn.com.qmth.examcloud.core.print.enums;
-
-/**
- * 课程试卷状态
- */
-public enum CoursePaperStatus {
-
-    NONE("无"),
-
-    EXIST("已有"),
-
-    NOT_FORMULATED("未指定");
-
-    private String desc;
-
-    CoursePaperStatus(String desc) {
-        this.desc = desc;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-
-}

+ 40 - 0
examcloud-core-print-dao/src/main/java/cn/com/qmth/examcloud/core/print/enums/PaperBindingStatus.java

@@ -0,0 +1,40 @@
+/*
+ * *************************************************
+ * Copyright (c) 2018 QMTH. All Rights Reserved.
+ * Created by Deason on 2018-10-17 16:28:20.
+ * *************************************************
+ */
+
+package cn.com.qmth.examcloud.core.print.enums;
+
+/**
+ * 课程试卷绑定状态
+ */
+public enum PaperBindingStatus {
+    无(0),
+    已有(1),
+    未指定(2);
+
+    private int index;
+
+    public static String getNameByIndex(Integer index) {
+        if (index == null) {
+            return null;
+        }
+        for (PaperBindingStatus type : PaperBindingStatus.values()) {
+            if (type.getIndex() == index) {
+                return type.name();
+            }
+        }
+        return null;
+    }
+
+    PaperBindingStatus(int index) {
+        this.index = index;
+    }
+
+    public int getIndex() {
+        return index;
+    }
+
+}

+ 18 - 0
examcloud-core-print-dao/src/main/java/cn/com/qmth/examcloud/core/print/repository/ProjectStatisticRepository.java

@@ -0,0 +1,18 @@
+/*
+ * *************************************************
+ * Copyright (c) 2018 QMTH. All Rights Reserved.
+ * Created by Deason on 2018-11-02 17:44:58.
+ * *************************************************
+ */
+
+package cn.com.qmth.examcloud.core.print.repository;
+
+import cn.com.qmth.examcloud.core.print.entity.ProjectStatistic;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface ProjectStatisticRepository extends JpaRepository<ProjectStatistic, Long>, JpaSpecificationExecutor<ProjectStatistic> {
+
+}