|
@@ -9,6 +9,7 @@
|
|
|
<resultMap type="com.ym.mec.biz.dal.entity.Teacher" id="Teacher">
|
|
|
<result column="id_" property="id"/>
|
|
|
<result column="organ_id_" property="organId"/>
|
|
|
+ <result column="teacher_organ_id_" property="teacherOrganId"/>
|
|
|
<result column="organ_name_" property="organName"/>
|
|
|
<result column="job_type_" property="jobType"/>
|
|
|
<result column="job_nature_" property="jobNature"/>
|
|
@@ -208,7 +209,7 @@
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
|
<select id="queryPage" resultMap="Teacher" parameterType="map">
|
|
|
- SELECT t.id_,su.real_name_,su.lock_flag_,t.subject_id_,su.phone_,su.organ_id_,
|
|
|
+ SELECT t.id_,su.real_name_,su.lock_flag_,t.subject_id_,su.phone_,t.organ_id_ teacher_organ_id_,t.organ_id_,
|
|
|
t.job_nature_,t.is_probation_period_,GROUP_CONCAT(s.name_) subject_name_,su.del_flag_
|
|
|
FROM teacher t LEFT JOIN sys_user su ON t.id_ = su.id_
|
|
|
LEFT JOIN `subject` s ON FIND_IN_SET(s.id_,t.subject_id_)
|
|
@@ -230,21 +231,15 @@
|
|
|
<if test="lockFlag != null">
|
|
|
AND su.lock_flag_ = #{lockFlag}
|
|
|
</if>
|
|
|
- <if test="subjectId != null">
|
|
|
- AND FIND_IN_SET(#{subjectId},t.subject_id_)
|
|
|
- </if>
|
|
|
- <if test="organId != null">
|
|
|
- AND FIND_IN_SET(t.organ_id_,#{organId})
|
|
|
+ <if test="teacherId != null">
|
|
|
+ AND t.id_ IN
|
|
|
+ <foreach collection="teacherId" separator="," open="(" close=")" item="item">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
</if>
|
|
|
<if test="search != null">
|
|
|
AND (su.real_name_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
|
|
|
</if>
|
|
|
- <if test="jobNature != null">
|
|
|
- AND t.job_nature_ = #{jobNature}
|
|
|
- </if>
|
|
|
- <if test="isProbationPeriod != null">
|
|
|
- AND t.is_probation_period_ = #{isProbationPeriod}
|
|
|
- </if>
|
|
|
</sql>
|
|
|
|
|
|
<!-- 根据证件号查询老师 -->
|
|
@@ -528,7 +523,7 @@
|
|
|
</sql>
|
|
|
|
|
|
<select id="queryOrganTeacherNum" resultType="map">
|
|
|
- select count(*) total,sum(case when job_nature_ = 'PART_TIME' then 1 else 0 end) part_time_num_,sum(case when
|
|
|
+ select count(*) total,sum(case when job_nature_ = 'PART_TIME' then 1 else 0 end) part_time_num_,sum(case whfen
|
|
|
job_nature_ = 'FULL_TIME' then 1 else 0 end) full_time_num_ from teacher
|
|
|
<where>
|
|
|
<if test="organId != null">
|
|
@@ -536,4 +531,19 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+ <select id="findByFlowOrganRange" resultMap="Teacher">
|
|
|
+ SELECT id_,CONCAT(IF(flow_organ_range_ IS NULL OR flow_organ_range_ = '',0,flow_organ_range_),",",
|
|
|
+ IF(organ_id_ IS NULL OR organ_id_ = '',0,organ_id_)) flow_organ_range_ FROM teacher t
|
|
|
+ <where>
|
|
|
+ <if test="subjectId != null">
|
|
|
+ AND FIND_IN_SET(#{subjectId},t.subject_id_)
|
|
|
+ </if>
|
|
|
+ <if test="jobNature != null">
|
|
|
+ AND t.job_nature_ = #{jobNature}
|
|
|
+ </if>
|
|
|
+ <if test="isProbationPeriod != null">
|
|
|
+ AND t.is_probation_period_ = #{isProbationPeriod}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|