select c.*,u.realname,u.username from t_bus_holiday c left join t_s_base_user u on c.userid = u.id where 1=1
		<#if (holidayDao.username )?? && holidayDao.username ?length gt 0>
		    /* 转正人编号 */
			and u.username like CONCAT('%', :holidayDao.username ,'%') 
		</#if>
		<#if (holidayDao.realname )?? && holidayDao.realname ?length gt 0>
		    /* 转正人名称 */
			and u.realname like CONCAT('%', :holidayDao.realname ,'%') 
		</#if>
		<#if ( holidayDao.bpmStatus )?? && holidayDao.bpmStatus ?length gt 0>
		    /* 申请状态*/
			and c.bpm_status = :holidayDao.bpmStatus
		</#if>
		<#if ( holidayDao.holidayType )?? && holidayDao.holidayType ?length gt 0>
		    /* 申请状态*/
			and c.holiday_type = :holidayDao.holidayType
		</#if>
		<#if ( holidayDao.orgIdList )?? && holidayDao.orgIdList ?size gt 0>
		    /* 所属单位*/
			and c.belong_unitid in(
			<#list holidayDao.orgIdList as item>        
			   '${item}'
			 <#if item_has_next>,</#if>
			 </#list>
			)
		</#if>
	    <#if ( holidayDao.applyDate_begin )?? && holidayDao.applyDate_begin ?length gt 0>
		    /* 申请日期 */
			and c.apply_date >= :holidayDao.applyDate_begin
		</#if>
		<#if ( holidayDao.applyDate_end )??  && holidayDao.applyDate_end ?length gt 0>
		    /* 申请日期 */
			and c.apply_date <= :holidayDao.applyDate_end
		</#if>	
		<#if ( holidayDao.holidayEtime )??>
		    /* 转正日期 */
			and to_days(c.holiday_stime) <= to_days(:holidayDao.holidayEtime)
		</#if>	
		<#if ( holidayDao.holidayStime )??>
		    /* 转正日期  */
			and to_days(c.holiday_etime) >= to_days(:holidayDao.holidayStime)
		</#if>	
		<#if ( useridList )?? && useridList ?size gt 0 && ( orgidList )?? && orgidList ? size gt 0 >
			and ((c.applicant_id in(
			<#list useridList as item>   
			   '${item}'
			 <#if item_has_next>,</#if>
			 </#list>
			)
			and c.belong_unitid in(
			<#list orgidList as item>   
			   '${item}'
			 <#if item_has_next>,</#if>
			 </#list>
			)) 
			or c.applicant_id in(
			<#list useridList1 as item>   
			   '${item}'
			 <#if item_has_next>,</#if>
			 </#list>
			)) 
			<#else>
			and c.applicant_id in(
			<#list useridList1 as item>   
			   '${item}'
			 <#if item_has_next>,</#if>
			 </#list>
			)
		</#if>
		and c.delete_flag = 0
		
		ORDER BY
			c.create_date DESC,c.holiday_stime desc