|
@@ -84,28 +84,40 @@
|
|
|
-- 数据权限匹配
|
|
-- 数据权限匹配
|
|
|
<choose>
|
|
<choose>
|
|
|
<when test="query.manager != null and !query.manager">
|
|
<when test="query.manager != null and !query.manager">
|
|
|
- <if test="query.isMain == 0">
|
|
|
|
|
- <if test="query.entList != null and query.entList.size() > 0">
|
|
|
|
|
- and (
|
|
|
|
|
- d.top_ent_id in
|
|
|
|
|
- <foreach collection="query.entList" item="authUserId" open="(" close=")" separator=",">
|
|
|
|
|
- #{authUserId}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ <if test="query.isMain == 1">
|
|
|
|
|
+ <if test="query.entList != null and query.entList.size() > 0 and query.entType != null">
|
|
|
|
|
+ <if test="query.entType == 1">
|
|
|
|
|
+ and
|
|
|
|
|
+ e.top_ent_id in
|
|
|
|
|
+ <foreach collection="query.entList" item="authUserId" open="(" close=")" separator=",">
|
|
|
|
|
+ #{authUserId}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.entType == 2">
|
|
|
|
|
+ and
|
|
|
|
|
+ d.top_ent_id in
|
|
|
|
|
+ <foreach collection="query.entList" item="authUserId" open="(" close=")" separator=",">
|
|
|
|
|
+ #{authUserId}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
</if>
|
|
</if>
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="query.isMain == 1">
|
|
|
|
|
- <if test="query.entId != null">
|
|
|
|
|
- and (d.top_ent_id = #{query.entId}
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ <if test="query.isMain == 0">
|
|
|
|
|
+ <if test="query.entId != null and query.entType != null">
|
|
|
|
|
+ <if test="query.entType == 1">
|
|
|
|
|
+ and e.top_ent_id = #{query.entId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.entType == 2">
|
|
|
|
|
+ and d.top_ent_id = #{query.entId}
|
|
|
|
|
+ </if>
|
|
|
</if>
|
|
</if>
|
|
|
</if>
|
|
</if>
|
|
|
</when>
|
|
</when>
|
|
|
</choose>
|
|
</choose>
|
|
|
- <if test="query.buyEntId !=null">
|
|
|
|
|
|
|
+ <if test="query.buyEntId != null">
|
|
|
and d.ent_id = #{query.buyEntId}
|
|
and d.ent_id = #{query.buyEntId}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="query.saleEntId !=null">
|
|
|
|
|
|
|
+ <if test="query.saleEntId != null">
|
|
|
and e.ent_id = #{query.saleEntId}
|
|
and e.ent_id = #{query.saleEntId}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="query.status != null">
|
|
<if test="query.status != null">
|
|
@@ -442,20 +454,32 @@
|
|
|
a.del_flag = 0
|
|
a.del_flag = 0
|
|
|
<choose>
|
|
<choose>
|
|
|
<when test="query.manager != null and !query.manager">
|
|
<when test="query.manager != null and !query.manager">
|
|
|
- <if test="query.isMain == 0">
|
|
|
|
|
- <if test="query.entList != null and query.entList.size() > 0">
|
|
|
|
|
- and (
|
|
|
|
|
- d.top_ent_id in
|
|
|
|
|
- <foreach collection="query.entList" item="authUserId" open="(" close=")" separator=",">
|
|
|
|
|
- #{authUserId}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ <if test="query.isMain == 1">
|
|
|
|
|
+ <if test="query.entList != null and query.entList.size() > 0 and query.entType != null">
|
|
|
|
|
+ <if test="query.entType == 1">
|
|
|
|
|
+ and
|
|
|
|
|
+ e.top_ent_id in
|
|
|
|
|
+ <foreach collection="query.entList" item="authUserId" open="(" close=")" separator=",">
|
|
|
|
|
+ #{authUserId}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.entType == 2">
|
|
|
|
|
+ and
|
|
|
|
|
+ d.top_ent_id in
|
|
|
|
|
+ <foreach collection="query.entList" item="authUserId" open="(" close=")" separator=",">
|
|
|
|
|
+ #{authUserId}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
</if>
|
|
</if>
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="query.isMain == 1">
|
|
|
|
|
- <if test="query.entId != null">
|
|
|
|
|
- and (d.top_ent_id = #{query.entId}
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ <if test="query.isMain == 0">
|
|
|
|
|
+ <if test="query.entId != null and query.entType != null">
|
|
|
|
|
+ <if test="query.entType == 1">
|
|
|
|
|
+ and e.top_ent_id = #{query.entId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.entType == 2">
|
|
|
|
|
+ and d.top_ent_id = #{query.entId}
|
|
|
|
|
+ </if>
|
|
|
</if>
|
|
</if>
|
|
|
</if>
|
|
</if>
|
|
|
</when>
|
|
</when>
|