and b.teacher_id=#{reqSearchScClaTimeRule.teacherId}
</if>
<iftest="reqSearchScClaTimeRule.filterHoliday != null and reqSearchScClaTimeRule.filterHoliday == true">
and b.filter_holiday='1'
</if>
<iftest="reqSearchScClaTimeRule.filterHoliday != null and reqSearchScClaTimeRule.filterHoliday == false">
and b.filter_holiday='0'
</if>
<iftest="reqSearchScClaTimeRule.beginDate != null and reqSearchScClaTimeRule.beginDate != ''">
and (#{reqSearchScClaTimeRule.beginDate} between b.begin_date and b.end_date
or #{reqSearchScClaTimeRule.endDate} between b.begin_date and b.end_date
or b.begin_date between #{reqSearchScClaTimeRule.beginDate} and #{reqSearchScClaTimeRule.endDate}
or exists(select 1 from sc_cla_time ct where b.rule_id=ct.rule_id and ct.source='1' and ct.cla_date between #{reqSearchScClaTimeRule.beginDate} and #{reqSearchScClaTimeRule.endDate} ))