|
@@ -106,7 +106,6 @@
|
|
left join tms_student_train_info@tms${city} t2
|
|
left join tms_student_train_info@tms${city} t2
|
|
on t1.tso_id = t2.sri_student_id
|
|
on t1.tso_id = t2.sri_student_id
|
|
<where>
|
|
<where>
|
|
- AND t1.TSO_HISTORY = '0'
|
|
|
|
AND t1.TSO_BUSITYPE in ('0', '1')
|
|
AND t1.TSO_BUSITYPE in ('0', '1')
|
|
AND t1.TSO_LOGOUT = 0
|
|
AND t1.TSO_LOGOUT = 0
|
|
<if test="coachId!=null" > AND t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC } </if>
|
|
<if test="coachId!=null" > AND t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC } </if>
|
|
@@ -123,7 +122,6 @@
|
|
select t1.TSO_ID, t1.TSO_IDCARD, t1.TSO_NAME,t1.TSO_SEX,t1.Tso_Phone,t1.TSO_APPLYDATE, t1.TSO_STATE , t1.TSO_TRAINTYPE, t1.tso_photo_path, t1.TSO_REMARK,'1' as bm_type
|
|
select t1.TSO_ID, t1.TSO_IDCARD, t1.TSO_NAME,t1.TSO_SEX,t1.Tso_Phone,t1.TSO_APPLYDATE, t1.TSO_STATE , t1.TSO_TRAINTYPE, t1.tso_photo_path, t1.TSO_REMARK,'1' as bm_type
|
|
from tms_student_info_temp@tms${city} t1
|
|
from tms_student_info_temp@tms${city} t1
|
|
<where>
|
|
<where>
|
|
- AND t1.TSO_HISTORY = '0'
|
|
|
|
AND t1.TSO_BUSITYPE in ('0', '1')
|
|
AND t1.TSO_BUSITYPE in ('0', '1')
|
|
AND t1.TSO_LOGOUT = 0
|
|
AND t1.TSO_LOGOUT = 0
|
|
<if test="coachId!=null" > AND t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC } </if>
|
|
<if test="coachId!=null" > AND t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC } </if>
|
|
@@ -147,11 +145,14 @@
|
|
left join tms_student_train_info@tms${city} t2
|
|
left join tms_student_train_info@tms${city} t2
|
|
on t1.tso_id = t2.sri_student_id
|
|
on t1.tso_id = t2.sri_student_id
|
|
<where>
|
|
<where>
|
|
- AND t1.TSO_HISTORY = '0'
|
|
|
|
AND t1.TSO_BUSITYPE in ('0', '1')
|
|
AND t1.TSO_BUSITYPE in ('0', '1')
|
|
AND t1.TSO_LOGOUT = 0
|
|
AND t1.TSO_LOGOUT = 0
|
|
<if test="field != null and field != ''"> AND (t1.Tso_Name like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.TSO_IDCARD like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.Tso_Phone like '%' || #{field,jdbcType=VARCHAR} || '%') </if>
|
|
<if test="field != null and field != ''"> AND (t1.Tso_Name like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.TSO_IDCARD like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.Tso_Phone like '%' || #{field,jdbcType=VARCHAR} || '%') </if>
|
|
- <if test="schoolId != null "> and t1.TSO_SCHOOL_ID = #{schoolId,jdbcType=NUMERIC} </if>
|
|
|
|
|
|
+ <if test="schoolId != null "> and t1.TSO_SCHOOL_ID in
|
|
|
|
+ <foreach item="sid" index="index" collection="schoolId.split(',')" open="(" separator="," close=")">
|
|
|
|
+ #{sid}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
<if test="coachId!=null" > AND t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC } </if>
|
|
<if test="coachId!=null" > AND t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC } </if>
|
|
</where>
|
|
</where>
|
|
union
|
|
union
|
|
@@ -163,11 +164,14 @@
|
|
left join tms_student_train_info@tms${city} t2
|
|
left join tms_student_train_info@tms${city} t2
|
|
on t1.tso_id = t2.sri_student_id
|
|
on t1.tso_id = t2.sri_student_id
|
|
<where>
|
|
<where>
|
|
- AND t1.TSO_HISTORY = '0'
|
|
|
|
AND t1.TSO_BUSITYPE in ('0', '1')
|
|
AND t1.TSO_BUSITYPE in ('0', '1')
|
|
AND t1.TSO_LOGOUT = 0
|
|
AND t1.TSO_LOGOUT = 0
|
|
<if test="field != null and field != ''"> AND (t1.Tso_Name like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.TSO_IDCARD like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.Tso_Phone like '%' || #{field,jdbcType=VARCHAR} || '%') </if>
|
|
<if test="field != null and field != ''"> AND (t1.Tso_Name like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.TSO_IDCARD like '%' || #{field,jdbcType=VARCHAR} || '%' or t1.Tso_Phone like '%' || #{field,jdbcType=VARCHAR} || '%') </if>
|
|
- <if test="schoolId != null "> and t1.TSO_SCHOOL_ID = #{schoolId,jdbcType=NUMERIC} </if>
|
|
|
|
|
|
+ <if test="schoolId != null "> and t1.TSO_SCHOOL_ID in
|
|
|
|
+ <foreach item="sid" index="index" collection="schoolId.split(',')" open="(" separator="," close=")">
|
|
|
|
+ #{sid}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
<if test="coachId!=null" > AND t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC } </if>
|
|
<if test="coachId!=null" > AND t1.TSO_COACHID = #{coachId,jdbcType=NUMERIC } </if>
|
|
</where>
|
|
</where>
|
|
)
|
|
)
|