修改部门信息集合
This commit is contained in:
@@ -124,33 +124,21 @@
|
||||
T3.pid,
|
||||
T3.pids,
|
||||
T3.NAME,
|
||||
T3.code,
|
||||
T3.CODE,
|
||||
T5.id,
|
||||
T3.type,
|
||||
T5.NAME area,
|
||||
T3.Remark,
|
||||
T3.sort
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
@codes AS _ids,
|
||||
(
|
||||
SELECT @codes := GROUP_CONCAT( id ) FROM sys_dept WHERE FIND_IN_SET( pid, @codes ) ) AS T1
|
||||
FROM
|
||||
sys_dept s,
|
||||
( SELECT @codes := #{id} ) T4
|
||||
WHERE
|
||||
@codes IS NOT NULL
|
||||
<if test="type != null">
|
||||
AND s.type in
|
||||
<foreach collection="type" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
) T2,
|
||||
sys_dept T3,
|
||||
sys_area T5
|
||||
WHERE
|
||||
FIND_IN_SET( T3.id, T2._ids )
|
||||
FIND_IN_SET( #{id}, T3.pids )
|
||||
and t3.type in
|
||||
<foreach collection="type" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND t3.area = t5.id
|
||||
AND t3.State = 1
|
||||
Order by T3.sort asc
|
||||
|
||||
Reference in New Issue
Block a user