yonge 4 yıl önce
ebeveyn
işleme
bb2d62b2df

+ 31 - 9
mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentAttendanceQueryInfo.java

@@ -12,14 +12,20 @@ import com.ym.mec.common.page.QueryInfo;
 public class StudentAttendanceQueryInfo extends QueryInfo {
 
     @ApiModelProperty(value = "学生ID",required = false)
-    private Long studentID;
+    private Integer studentID;
+    
+    @ApiModelProperty(value = "老师编号",required = false)
+    private Integer teacherId;
 
     @ApiModelProperty(value = "乐团ID")
     private Long musicGroupId;
     
     @ApiModelProperty(value = "课程组类型")
     private String groupType;
-
+    
+    @ApiModelProperty(value = "课程类型")
+    private String courseScheduleType;
+    
     @ApiModelProperty(value = "班级ID")
     private Long classGroupId;
 
@@ -48,15 +54,31 @@ public class StudentAttendanceQueryInfo extends QueryInfo {
         this.filterStatus = filterStatus;
     }
 
-    public Long getStudentID() {
-        return studentID;
-    }
+    public Integer getStudentID() {
+		return studentID;
+	}
 
-    public void setStudentID(Long studentID) {
-        this.studentID = studentID;
-    }
+	public void setStudentID(Integer studentID) {
+		this.studentID = studentID;
+	}
+
+	public Integer getTeacherId() {
+		return teacherId;
+	}
+
+	public void setTeacherId(Integer teacherId) {
+		this.teacherId = teacherId;
+	}
+
+	public String getCourseScheduleType() {
+		return courseScheduleType;
+	}
+
+	public void setCourseScheduleType(String courseScheduleType) {
+		this.courseScheduleType = courseScheduleType;
+	}
 
-    public Long getMusicGroupId() {
+	public Long getMusicGroupId() {
         return musicGroupId;
     }
 

+ 13 - 1
mec-biz/src/main/resources/config/mybatis/StudentAttendanceMapper.xml

@@ -500,6 +500,12 @@
         	<if test="studentID != null">
         		and sa.user_id_ = #{studentID}
         	</if>
+        	<if test="courseScheduleType != null">
+        		and cs.type_ = #{courseScheduleType}
+        	</if>
+        	<if test="teacherId != null">
+        		and sa.teacher_id_ = #{teacherId}
+        	</if>
         	<if test="status != null">
         		and sa.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
         	</if>
@@ -515,7 +521,7 @@
     </select>
     
     <select id="countStudentAttendance" resultType="java.lang.Integer">
-        SELECT COUNT(sa.id_) FROM student_attendance sa
+        SELECT COUNT(sa.id_) FROM student_attendance sa left join course_schedule cs on sa.course_schedule_id_ = cs.id_
         <where>
         	<if test="courseScheduleId != null">
         		sa.course_schedule_id_ = #{courseScheduleId}
@@ -523,6 +529,12 @@
         	<if test="studentID != null">
         		and sa.user_id_ = #{studentID}
         	</if>
+        	<if test="courseScheduleType != null">
+        		and cs.type_ = #{courseScheduleType}
+        	</if>
+        	<if test="teacherId != null">
+        		and sa.teacher_id_ = #{teacherId}
+        	</if>
         	<if test="status != null">
         		and sa.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
         	</if>