|
|
@@ -54,17 +54,18 @@
|
|
|
<if test="param.result!= null and param.result!= ''">
|
|
|
AND sqr.result = #{param.result}
|
|
|
</if>
|
|
|
- <if test="param.agent != null and param.agent != ''">
|
|
|
- AND (sqr.user_id = #{param.agent} or su.name = #{param.agent})
|
|
|
- </if>
|
|
|
- <if test="param.operator != null and param.operator != ''">
|
|
|
- AND sqr.operator = #{param.operator}
|
|
|
- </if>
|
|
|
+
|
|
|
+
|
|
|
<if test="param.deptId!= null and param.deptId!= ''">
|
|
|
- AND sd.id like '${param.deptId}%'
|
|
|
+ <if test="param.operator != null and param.operator != ''">
|
|
|
+ AND (sd.id like '${param.deptId}%' or sqr.operator = #{param.operator} or su.name = #{param.operator})
|
|
|
+ </if>
|
|
|
+ <if test="param.operator == null or param.operator == ''">
|
|
|
+ AND sd.id like '${param.deptId}%'
|
|
|
+ </if>
|
|
|
</if>
|
|
|
- <if test="param.action != null and param.action!= ''">
|
|
|
- AND sqr.action = #{param.action}
|
|
|
+ <if test="param.agent != null and param.agent!= ''">
|
|
|
+ AND sqr.user_id = #{param.agent}
|
|
|
</if>
|
|
|
ORDER BY sqr.create_time DESC
|
|
|
</select>
|