wangliang 11 сар өмнө
parent
commit
cf170811ee

+ 23 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/statistics/PrintCountResult.java

@@ -29,6 +29,12 @@ public class PrintCountResult implements Serializable {
     @ExcelProperty(name = "课程(代码)", width = 20, index = 1)
     private String courseNameCode;
 
+    @ApiModelProperty(value = "课程名称")
+    private String courseName;
+
+    @ApiModelProperty(value = "课程代码")
+    private String courseCode;
+
     @ApiModelProperty(value = "试卷编号")
     @ExcelProperty(name = "试卷编号", width = 20, index = 2)
     private String paperNumber;
@@ -105,7 +111,7 @@ public class PrintCountResult implements Serializable {
     }
 
     public String getCourseNameCode() {
-        return courseNameCode;
+        return courseName + "(" + courseCode + ")";
     }
 
     public void setCourseNameCode(String courseNameCode) {
@@ -239,4 +245,20 @@ public class PrintCountResult implements Serializable {
     public void setFinishStatusStr(String finishStatusStr) {
         this.finishStatusStr = finishStatusStr;
     }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
 }

+ 23 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/statistics/ScanCountResult.java

@@ -28,6 +28,12 @@ public class ScanCountResult implements Serializable {
     @ExcelProperty(name = "课程(代码)", width = 20, index = 2)
     private String courseNameCode;
 
+    @ApiModelProperty(value = "课程名称")
+    private String courseName;
+
+    @ApiModelProperty(value = "课程代码")
+    private String courseCode;
+
     @ApiModelProperty(value = "试卷编号")
     @ExcelProperty(name = "试卷编号", width = 20, index = 3)
     private String paperNumber;
@@ -75,7 +81,7 @@ public class ScanCountResult implements Serializable {
     }
 
     public String getCourseNameCode() {
-        return courseNameCode;
+        return courseName + "(" + courseCode + ")";
     }
 
     public void setCourseNameCode(String courseNameCode) {
@@ -161,4 +167,20 @@ public class ScanCountResult implements Serializable {
     public void setScanUploadRateStr(String scanUploadRateStr) {
         this.scanUploadRateStr = scanUploadRateStr;
     }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
 }

+ 6 - 10
distributed-print-business/src/main/resources/mapper/ExamTaskMapper.xml

@@ -1327,7 +1327,8 @@
         (
         select distinct
         et.id,
-        GROUP_CONCAT(distinct bc.name, '(', bc.code, ')') as courseNameCode,
+        bc.name as courseName,
+        bc.code as courseCode,
         et.paper_number as paperNumber,
         replace(substring_index(substring_index(convert((etd.paper_attachment_ids ->>'$[*].cardId') using utf8), ']', 1), '[',-1), '"', '') as cardId,
         so.name as college,
@@ -1384,8 +1385,7 @@
                     </foreach>
                 </if>
             </if>
-        </where>
-        group by et.id,bc.name,bc.code,et.paper_number) t
+        </where>) t
         left join exam_card ec on ec.id = t.cardId
         <where>
             <if test="cardType != null and cardType != ''">
@@ -1424,7 +1424,8 @@
         distinct
         mp.id,
         so.name as college,
-        GROUP_CONCAT(distinct bc.name, '(', bc.code, ')') as courseNameCode,
+        bc.name as courseName,
+        bc.code as courseCode,
         mp.paper_number as paperNumber,
         replace(substring_index(substring_index(convert((etd.paper_attachment_ids ->>'$[*].cardId') using utf8), ']', 1), '[',-1), '"', '') as cardId,
         IFNULL(mp.student_count, 0) as studentCount,
@@ -1476,12 +1477,7 @@
                     </foreach>
                 </if>
             </if>
-        </where>
-        group by
-        mp.id,
-        bc.name,
-        bc.code,
-        mp.paper_number) t
+        </where>) t
         left join exam_card ec on ec.id = t.cardId
         <where>
             <if test="cardType != null and cardType != ''">