Browse Source

新生报到模块

dzx 6 months ago
parent
commit
9b2fc029b2

+ 4 - 0
src/main/java/com/xjrsoft/module/student/vo/StudentReportRecordPageVo.java

@@ -40,4 +40,8 @@ public class StudentReportRecordPageVo {
     @ApiModelProperty("家长电话")
     private String parentMobile;
 
+
+    @ApiModelProperty("是否已报到(1:是 0:否)")
+    private Integer isReport;
+
 }

+ 2 - 3
src/main/resources/mapper/student/StudentReportRecordMapper.xml

@@ -38,13 +38,12 @@
     </select>
     <select id="getClassStatistics" parameterType="com.xjrsoft.module.student.dto.StudentReportRecordStatisticsDto"
             resultType="com.xjrsoft.module.student.vo.StudentReportRecordPageVo">
-        SELECT t1.id as user_id,t1.name,t1.credential_number,t1.mobile,t4.name AS stduy_status_cn,t5.telephone AS parent_mobile FROM xjr_user t1
+        SELECT t1.id as user_id,t1.name,t1.credential_number,t1.mobile,t4.name AS stduy_status_cn,t5.telephone AS parent_mobile,
+        (select count(*) from student_report_record where user_id = t1.id and base_semester_id = #{dto.baseSemesterId}) as is_report FROM xjr_user t1
         INNER JOIN base_student_school_roll t2 ON t1.id = t2.user_id
         INNER JOIN base_class t3 ON t2.class_id = t3.id
         LEFT JOIN xjr_dictionary_detail t4 ON t2.stduy_status = t4.code
         LEFT JOIN base_student_family t5 ON t5.user_id = t1.id
-        LEFT JOIN student_report_record t6 ON t1.id = t6.user_id
-        AND t6.base_semester_id = #{dto.baseSemesterId}
         WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
         AND t2.class_id = #{dto.teacherId}
         ORDER BY t1.create_date DESC, t2.create_date DESC,t3.create_date DESC