Kaynağa Gözat

Merge remote-tracking branch 'origin/dev_v2.1.0' into dev_v2.1.0

wangliang 4 yıl önce
ebeveyn
işleme
a2bb0fb606

+ 12 - 3
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/result/InspectCollegeResult.java

@@ -21,8 +21,9 @@ public class InspectCollegeResult {
     private String studentCode;
     @ExcelProperty(name = "姓名", width = 30, index = 7)
     private String name;
+    private Boolean current;
     @ExcelProperty(name = "考试类型", width = 30, index = 8)
-    private String current;
+    private String currentStr;
     @ExcelProperty(name = "总分", width = 30, index = 9)
     private Integer assignedScore;
     private String clazzCode;
@@ -91,11 +92,11 @@ public class InspectCollegeResult {
         this.name = name;
     }
 
-    public String getCurrent() {
+    public Boolean getCurrent() {
         return current;
     }
 
-    public void setCurrent(String current) {
+    public void setCurrent(Boolean current) {
         this.current = current;
     }
 
@@ -146,4 +147,12 @@ public class InspectCollegeResult {
     public void setTeacherName(String teacherName) {
         this.teacherName = teacherName;
     }
+
+    public String getCurrentStr() {
+        return currentStr;
+    }
+
+    public void setCurrentStr(String currentStr) {
+        this.currentStr = currentStr;
+    }
 }

+ 12 - 3
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/result/TeachCollegeResult.java

@@ -21,8 +21,9 @@ public class TeachCollegeResult {
     private String studentCode;
     @ExcelProperty(name = "姓名", width = 30, index = 7)
     private String name;
+    private Boolean current;
     @ExcelProperty(name = "考试类型", width = 30, index = 8)
-    private String current;
+    private String currentStr;
     @ExcelProperty(name = "客观总分", width = 30, index = 9)
     private String objectiveScore;
     @ExcelProperty(name = "主观总分", width = 30, index = 10)
@@ -97,11 +98,11 @@ public class TeachCollegeResult {
         this.name = name;
     }
 
-    public String getCurrent() {
+    public Boolean getCurrent() {
         return current;
     }
 
-    public void setCurrent(String current) {
+    public void setCurrent(Boolean current) {
         this.current = current;
     }
 
@@ -176,4 +177,12 @@ public class TeachCollegeResult {
     public void setTeacherName(String teacherName) {
         this.teacherName = teacherName;
     }
+
+    public String getCurrentStr() {
+        return currentStr;
+    }
+
+    public void setCurrentStr(String currentStr) {
+        this.currentStr = currentStr;
+    }
 }

+ 60 - 58
teachcloud-report-business/src/main/resources/mapper/TBExamStudentMapper.xml

@@ -73,58 +73,59 @@
     <select id="listTeachCollegeResult"
             resultType="com.qmth.teachcloud.report.business.bean.result.TeachCollegeResult">
         SELECT
-        d.semester,
-        d.exam_name examName,
-        a.course_code courseCode,
-        a.course_name courseName,
-        a.ticket_number ticketNumber,
-        a.student_code studentCode,
-        a.name,
-        case a.student_current when true then '应届' else '非应届' end as current,
-        b.objective_score objectiveScore,
-        b.subjective_score subjectiveScore,
-        b.total_score totalScore,
-        c.assigned_score assignedScore,
-        e.clazz_code clazzCode,
-        e.clazz_name clazzName,
-        f.name teachCollegeName,
-        g.name inspectCollegeName,
-        h.real_name teacherName
+            d.semester,
+            d.exam_name examName,
+            a.course_code courseCode,
+            a.course_name courseName,
+            a.ticket_number ticketNumber,
+            a.student_code studentCode,
+            a.name,
+            a.student_current `current`,
+            case a.student_current when true then '应届' else '非应届' end as currentStr,
+            round(b.objective_score, 1) objectiveScore,
+            round(b.subjective_score, 1) subjectiveScore,
+            round(b.total_score, 1) totalScore,
+            round(c.assigned_score, 1) assignedScore,
+            e.clazz_code clazzCode,
+            e.clazz_name clazzName,
+            f.name teachCollegeName,
+            g.name inspectCollegeName,
+            h.real_name teacherName
         FROM
-        t_b_exam_student a
+            t_b_exam_student a
         LEFT JOIN
-        t_b_exam_record b ON a.id = b.exam_student_id
+            t_b_exam_record b ON a.id = b.exam_student_id
         LEFT JOIN
-        t_a_exam_course_record c ON b.id = c.exam_record_id
+            t_a_exam_course_record c ON b.id = c.exam_record_id
         LEFT JOIN
-        t_b_exam d ON a.exam_id = d.id
+            t_b_exam d ON a.exam_id = d.id
         LEFT JOIN
-        t_b_school_clazz e ON a.clazz_id = e.id
+            t_b_school_clazz e ON a.clazz_id = e.id
         LEFT JOIN
-        sys_org f ON a.teach_college_id = f.id
+            sys_org f ON a.teach_college_id = f.id
         LEFT JOIN
-        sys_org g ON a.inspect_college_id = g.id
+            sys_org g ON a.inspect_college_id = g.id
         LEFT JOIN
-        sys_user h ON a.teacher_id = h.id
+            sys_user h ON a.teacher_id = h.id
         <where>
             and d.school_id = #{schoolId}
             <if test="semester != null and semester != ''">
                 and d.semester = #{semester}
             </if>
             <if test="examId != null">
-                and a.exam_id = = #{examId}
+                and a.exam_id = #{examId}
             </if>
             <if test="courseCode != null and courseCode != ''">
-                and a.course_code = = #{courseCode}
+                and a.course_code = #{courseCode}
             </if>
             <if test="current != null">
-                and a.student_current = = #{current}
+                and a.student_current = #{current}
             </if>
             <if test="inspectCollegeId != null">
-                and a.inspect_college_id = = #{inspectCollegeId}
+                and a.inspect_college_id = #{inspectCollegeId}
             </if>
             <if test="teacherId != null">
-                and a.teacher_id = = #{teacherId}
+                and a.teacher_id = #{teacherId}
             </if>
             <if test="studentParam != null and studentParam != ''">
                 and (a.ticket_number like concat('%' ,#{studentParam}, '%')
@@ -136,55 +137,56 @@
     <select id="listInspectCollegeResult"
             resultType="com.qmth.teachcloud.report.business.bean.result.InspectCollegeResult">
         SELECT
-        d.semester,
-        d.exam_name examName,
-        a.course_code courseCode,
-        a.course_name courseName,
-        a.ticket_number ticketNumber,
-        a.student_code studentCode,
-        a.name,
-        case a.student_current when true then '应届' else '非应届' end as current,
-        c.assigned_score assignedScore,
-        e.clazz_code clazzCode,
-        e.clazz_name clazzName,
-        f.name teachCollegeName,
-        g.name inspectCollegeName,
-        h.real_name teacherName
+            d.semester,
+            d.exam_name examName,
+            a.course_code courseCode,
+            a.course_name courseName,
+            a.ticket_number ticketNumber,
+            a.student_code studentCode,
+            a.name,
+            a.student_current `current`,
+            case a.student_current when true then '应届' else '非应届' end as currentStr,
+            round(c.assigned_score, 1) assignedScore,
+            e.clazz_code clazzCode,
+            e.clazz_name clazzName,
+            f.name teachCollegeName,
+            g.name inspectCollegeName,
+            h.real_name teacherName
         FROM
-        t_b_exam_student a
+            t_b_exam_student a
         LEFT JOIN
-        t_b_exam_record b ON a.id = b.exam_student_id
+            t_b_exam_record b ON a.id = b.exam_student_id
         LEFT JOIN
-        t_a_exam_course_record c ON b.id = c.exam_record_id
+            t_a_exam_course_record c ON b.id = c.exam_record_id
         LEFT JOIN
-        t_b_exam d ON a.exam_id = d.id
+            t_b_exam d ON a.exam_id = d.id
         LEFT JOIN
-        t_b_school_clazz e ON a.clazz_id = e.id
+            t_b_school_clazz e ON a.clazz_id = e.id
         LEFT JOIN
-        sys_org f ON a.teach_college_id = f.id
+            sys_org f ON a.teach_college_id = f.id
         LEFT JOIN
-        sys_org g ON a.inspect_college_id = g.id
+            sys_org g ON a.inspect_college_id = g.id
         LEFT JOIN
-        sys_user h ON a.teacher_id = h.id
+            sys_user h ON a.teacher_id = h.id
         <where>
             and d.school_id = #{schoolId}
             <if test="semester != null and semester != ''">
                 and d.semester = #{semester}
             </if>
             <if test="examId != null">
-                and a.exam_id = = #{examId}
+                and a.exam_id = #{examId}
             </if>
             <if test="courseCode != null and courseCode != ''">
-                and a.course_code = = #{courseCode}
+                and a.course_code = #{courseCode}
             </if>
             <if test="current != null">
-                and a.student_current = = #{current}
+                and a.student_current = #{current}
             </if>
-            <if test="inspectCollegeId != null">
-                and a.teach_college_id = = #{teachCollegeId}
+            <if test="teachCollegeId != null">
+                and a.teach_college_id = #{teachCollegeId}
             </if>
             <if test="teacherId != null">
-                and a.teacher_id = = #{teacherId}
+                and a.teacher_id = #{teacherId}
             </if>
             <if test="studentParam != null and studentParam != ''">
                 and (a.ticket_number like concat('%' ,#{studentParam}, '%')

+ 21 - 21
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/TBExamStudentController.java

@@ -48,11 +48,11 @@ public class TBExamStudentController {
     public Result listTeachCollegeResult(
             @ApiParam(value = "学期", required = true) @RequestParam String semester,
             @ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
-            @ApiParam(value = "课程代码", required = true) @RequestParam String courseCode,
-            @ApiParam(value = "考试类型", required = true) @RequestParam Boolean current,
-            @ApiParam(value = "考查学院ID", required = true) @RequestParam Long inspectCollegeId,
-            @ApiParam(value = "教师ID", required = true) @RequestParam Long teacherId,
-            @ApiParam(value = "模糊查询", required = true) @RequestParam String studentParam,
+            @ApiParam(value = "课程代码", required = true) @RequestParam(required = false) String courseCode,
+            @ApiParam(value = "考试类型", required = true) @RequestParam(required = false) Boolean current,
+            @ApiParam(value = "考查学院ID", required = true) @RequestParam(required = false) Long inspectCollegeId,
+            @ApiParam(value = "教师ID", required = true) @RequestParam(required = false) Long teacherId,
+            @ApiParam(value = "模糊查询", required = true) @RequestParam(required = false) String studentParam,
             @ApiParam(value = "分页页码", required = true) @RequestParam Integer pageNumber,
             @ApiParam(value = "分页数量", required = true) @RequestParam Integer pageSize) {
         return ResultUtil.ok(tbExamStudentService.listTeachCollegeResult(semester, examId, courseCode, current, inspectCollegeId, teacherId, studentParam, pageNumber, pageSize));
@@ -91,26 +91,26 @@ public class TBExamStudentController {
     public void exportTeachCollegeResult(
             @ApiParam(value = "学期", required = true) @RequestParam String semester,
             @ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
-            @ApiParam(value = "课程代码", required = true) @RequestParam String courseCode,
-            @ApiParam(value = "考试类型", required = true) @RequestParam Boolean current,
-            @ApiParam(value = "考查学院ID", required = true) @RequestParam Long inspectCollegeId,
-            @ApiParam(value = "教师ID", required = true) @RequestParam Long teacherId,
-            @ApiParam(value = "模糊查询", required = true) @RequestParam String studentParam,
+            @ApiParam(value = "课程代码", required = true) @RequestParam(required = false) String courseCode,
+            @ApiParam(value = "考试类型", required = true) @RequestParam(required = false) Boolean current,
+            @ApiParam(value = "考查学院ID", required = true) @RequestParam(required = false) Long inspectCollegeId,
+            @ApiParam(value = "教师ID", required = true) @RequestParam(required = false) Long teacherId,
+            @ApiParam(value = "模糊查询", required = true) @RequestParam(required = false) String studentParam,
             HttpServletResponse response) throws Exception {
         tbExamStudentService.exportTeachCollegeResult(semester, examId, courseCode, current, inspectCollegeId, teacherId, studentParam, response);
     }
 
     @ApiOperation(value = "考查成绩查询")
-    @RequestMapping(value = "/listInspectCollegeResult", method = RequestMethod.POST)
+    @RequestMapping(value = "/list_inspect_college_result", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "开课成绩查询信息", response = TBExamStudentResult.class)})
     public Result listInspectCollegeResult(
             @ApiParam(value = "学期", required = true) @RequestParam String semester,
             @ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
-            @ApiParam(value = "课程代码", required = true) @RequestParam String courseCode,
-            @ApiParam(value = "考试类型", required = true) @RequestParam Boolean current,
-            @ApiParam(value = "开课学院ID", required = true) @RequestParam Long teachCollegeId,
-            @ApiParam(value = "教师ID", required = true) @RequestParam Long teacherId,
-            @ApiParam(value = "模糊查询", required = true) @RequestParam String studentParam,
+            @ApiParam(value = "课程代码", required = true) @RequestParam(required = false) String courseCode,
+            @ApiParam(value = "考试类型", required = true) @RequestParam(required = false) Boolean current,
+            @ApiParam(value = "开课学院ID", required = true) @RequestParam(required = false) Long teachCollegeId,
+            @ApiParam(value = "教师ID", required = true) @RequestParam(required = false) Long teacherId,
+            @ApiParam(value = "模糊查询", required = true) @RequestParam(required = false) String studentParam,
             @ApiParam(value = "分页页码", required = true) @RequestParam Integer pageNumber,
             @ApiParam(value = "分页数量", required = true) @RequestParam Integer pageSize) {
         return ResultUtil.ok(tbExamStudentService.listInspectCollegeResult(semester, examId, courseCode, current, teachCollegeId, teacherId, studentParam, pageNumber, pageSize));
@@ -122,11 +122,11 @@ public class TBExamStudentController {
     public void exportInspectCollegeResult(
             @ApiParam(value = "学期", required = true) @RequestParam String semester,
             @ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
-            @ApiParam(value = "课程代码", required = true) @RequestParam String courseCode,
-            @ApiParam(value = "考试类型", required = true) @RequestParam Boolean current,
-            @ApiParam(value = "开课学院ID", required = true) @RequestParam Long teachCollegeId,
-            @ApiParam(value = "教师ID", required = true) @RequestParam Long teacherId,
-            @ApiParam(value = "模糊查询", required = true) @RequestParam String studentParam,
+            @ApiParam(value = "课程代码", required = true) @RequestParam(required = false) String courseCode,
+            @ApiParam(value = "考试类型", required = true) @RequestParam(required = false) Boolean current,
+            @ApiParam(value = "开课学院ID", required = true) @RequestParam(required = false) Long teachCollegeId,
+            @ApiParam(value = "教师ID", required = true) @RequestParam(required = false) Long teacherId,
+            @ApiParam(value = "模糊查询", required = true) @RequestParam(required = false) String studentParam,
             HttpServletResponse response) throws Exception {
         tbExamStudentService.exportInspectCollegeResult(semester, examId, courseCode, current, teachCollegeId, teacherId, studentParam, response);
     }