<select >
select a.*,b.* from blade_employee_basic_information a left join blade_user b on a.id=b.id where a.tenant_id=#{tenantId} and a.is_deleted=0
<if test="department !=null and department !='' ">
and a.department like '%%${department}%%'
</if>
<if test="realName !=null and realName !='' ">
and b.real_name like '%%${realName}%%'
</if>
<if test="entryDate !=null and entryDate !='' ">
and a.entry_date=#{entryDate}
</if>
<if test="dimissionType !=null and dimissionType !='' ">
and a.dimission_type=#{dimissionType}
</if>
<if test="lastWorkingDay !=null and lastWorkingDay !='' ">
and a.last_working_day=#{lastWorkingDay}
</if>
<if test="workingState !=null and workingState !='' ">
and a.working_state=#{workingState}
</if>
<if test="isSing =='1'">
and (a.contract_start_date is not null) or a.contract_start_date!=''
</if>
<if test="isSing =='0'">
and a.contract_start_date is not null or ifnull(a.contract_start_date,'')=''
</if>
<if test="dateStartTime !=null and dateStartTime !='' ">
and a.contract_start_date >= {dateStartTime}
</if>
<if test="dateEndTime !=null and dateEndTime !='' ">
and a.contract_start_date <= {dateEndTime}
</if>
<if test="endDateStart !=null and endDateStart !='' ">
and a.contract_end_date >= {endDateStart}
</if>
<if test="endDateEnd !=null and endDateEnd !='' ">
and a.contract_end_date <= {endDateEnd}
</if>
order by a.id desc
process_instance_id is null or ifnull(process_instance_id,'')=''
select * from blade_process_should_pay_invoice
where is_deleted = 0
and process_instance_id is null or ifnull(process_instance_id,'')=''
and create_user = '1273086723649093633'
order by create_time desc