|
|
@@ -99,7 +99,9 @@
|
|
|
<if test="company != null and company != ''">and t.company like concat('%', #{company}, '%')</if>
|
|
|
<if test="conAbstract != null and conAbstract != ''">and t.con_abstract like concat('%', #{conAbstract}, '%')</if>
|
|
|
<if test="status != null ">and t.status = #{status}</if>
|
|
|
- <if test="deptId != null ">and t.dept_id = #{deptId}</if>
|
|
|
+ <if test="deptId != null and deptId !=''"> <!-- 部门id-->
|
|
|
+ and ( t.dept_id in (SELECT dt.dept_id FROM sys_dept dt WHERE find_in_set(#{deptId} ,ancestors )) or t.dept_id = #{deptId} )
|
|
|
+ </if>
|
|
|
<if test="deptName != null ">and t.dept_name = #{deptName}</if>
|
|
|
<if test="userId != null ">and t.user_id = #{userId}</if>
|
|
|
<if test="createBy != null and createBy != ''">and t.create_by like concat('%', #{createBy}, '%')</if>
|