|
@@ -97,6 +97,7 @@
|
|
<resultMap id="teacherPersonalAttendance" type="com.ym.mec.biz.dal.dto.TeacherPersonalAttendanceDto">
|
|
<resultMap id="teacherPersonalAttendance" type="com.ym.mec.biz.dal.dto.TeacherPersonalAttendanceDto">
|
|
<result column="class_date_" property="classDate"/>
|
|
<result column="class_date_" property="classDate"/>
|
|
<result column="start_class_time_" property="startClassTime"/>
|
|
<result column="start_class_time_" property="startClassTime"/>
|
|
|
|
+ <result column="class_date_" property="classDate"/>
|
|
<result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
<result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
<result column="name_" property="name"/>
|
|
<result column="name_" property="name"/>
|
|
<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
@@ -108,48 +109,39 @@
|
|
<if test="teacherId != null">
|
|
<if test="teacherId != null">
|
|
and ta.teacher_id_ = #{teacherId}
|
|
and ta.teacher_id_ = #{teacherId}
|
|
</if>
|
|
</if>
|
|
- <if test="musicGroupId != null">
|
|
|
|
- and ta.music_group_id_ = #{musicGroupId}
|
|
|
|
|
|
+ <if test="courseStartDate != null">
|
|
|
|
+ and cs.class_date_ >= #{courseStartDate}
|
|
</if>
|
|
</if>
|
|
- <if test="classGroupId != null">
|
|
|
|
- and ta.class_group_id_ = #{classGroupId}
|
|
|
|
|
|
+ <if test="courseEndDate != null">
|
|
|
|
+ and cs.class_date_ <= #{courseEndDate}
|
|
</if>
|
|
</if>
|
|
- <if test="attendanceStatus != null">
|
|
|
|
- and ta.sign_in_status_ = #{attendanceStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
|
|
|
+ <if test="signInStatus != null">
|
|
|
|
+ and ta.sign_in_status_ = #{signInStatus}
|
|
</if>
|
|
</if>
|
|
- <if test="classGroupType != null">
|
|
|
|
- and cg.type_ = #{classGroupType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
|
|
|
+ <if test="courseScheduleType != null">
|
|
|
|
+ and cs.type_ = #{courseScheduleType}
|
|
</if>
|
|
</if>
|
|
<if test="classGroupName != null">
|
|
<if test="classGroupName != null">
|
|
- and cg.name_ like CONCAT('%',#{classGroupName},'%')
|
|
|
|
|
|
+ and cs.name_ like CONCAT('%',#{classGroupName},'%')
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="getTeacherPersonalAttendances" parameterType="map" resultMap="teacherPersonalAttendance">
|
|
<select id="getTeacherPersonalAttendances" parameterType="map" resultMap="teacherPersonalAttendance">
|
|
SELECT
|
|
SELECT
|
|
- cs.class_date_,
|
|
|
|
- cs.start_class_time_,
|
|
|
|
- cg.name_,
|
|
|
|
- cg.type_,
|
|
|
|
- ta.sign_in_status_ status_,
|
|
|
|
- ta.remark_
|
|
|
|
|
|
+ cs.class_date_,cs.start_class_time_,cs.name_,cs.type_,
|
|
|
|
+ ta.sign_in_status_ status_,ta.remark_
|
|
FROM
|
|
FROM
|
|
teacher_attendance ta
|
|
teacher_attendance ta
|
|
LEFT JOIN course_schedule cs ON ta.course_schedule_id_=cs.id_
|
|
LEFT JOIN course_schedule cs ON ta.course_schedule_id_=cs.id_
|
|
- LEFT JOIN class_group cg ON ta.class_group_id_=cg.id_
|
|
|
|
<include refid="queryCondition"/>
|
|
<include refid="queryCondition"/>
|
|
ORDER BY class_date_ DESC
|
|
ORDER BY class_date_ DESC
|
|
<include refid="global.limit"/>
|
|
<include refid="global.limit"/>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getTeacherPersonalAttendancesCount" resultType="int">
|
|
<select id="getTeacherPersonalAttendancesCount" resultType="int">
|
|
- SELECT
|
|
|
|
- count(ta.id_)
|
|
|
|
- FROM
|
|
|
|
- teacher_attendance ta
|
|
|
|
|
|
+ SELECT count(ta.id_) FROM teacher_attendance ta
|
|
LEFT JOIN course_schedule cs ON ta.course_schedule_id_=cs.id_
|
|
LEFT JOIN course_schedule cs ON ta.course_schedule_id_=cs.id_
|
|
- LEFT JOIN class_group cg ON ta.class_group_id_=cg.id_
|
|
|
|
<include refid="queryCondition"/>
|
|
<include refid="queryCondition"/>
|
|
</select>
|
|
</select>
|
|
|
|
|