Commit 44728780 by 徐高华

sql

parent 3e043139
......@@ -293,7 +293,10 @@
<if test="departmentIds != null and departmentIds.size() > 0">
left join tab_haoban_staff_department_related b on a.staff_id = b.staff_id and b.status_flag = 1
</if>
where a.status_flag = 1 and a.wx_enterprise_id = #{wxEnterpriseId}
where a.wx_enterprise_id = #{wxEnterpriseId}
<if test="occupy == null or 1!=occupy">
a.status_flag = 1
</if>
<if test="keyword != null and keyword != ''">
and (a.staff_name like CONCAT('%',#{keyword},'%') or a.phone_number like CONCAT('%',#{keyword},'%'))
</if>
......@@ -315,11 +318,11 @@
<!-- 其他占用 -->
<if test="occupy != null and 1==occupy">
and a.status_flag = 1 and a.update_time >= DATE_FORMAT(NOW(),'%Y-%m-%d') and a.active_status = 1
and a.status_flag = 0 and a.update_time >= DATE_FORMAT(NOW(),'%Y-%m-%d') and a.active_status = 1
</if>
<!-- -->
<if test="occupy != null and 2==occupy">
and ( a.status_flag = 0 or a.expire_time <![CDATA[<]]> now() )
and ( a.active_status = 0 or a.expire_time <![CDATA[<]]> now() )
</if>
<!-- 许可状态 0 未激活,1 正常有效,2 即将过期,3 已过期,可多传,按‘,’隔开 -->
<if test="null != permitState and '' != permitState">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment