修改部门信息集合

This commit is contained in:
wr
2023-04-27 16:37:00 +08:00
parent 1c0173a15b
commit f292b3101e

View File

@@ -124,33 +124,21 @@
T3.pid, T3.pid,
T3.pids, T3.pids,
T3.NAME, T3.NAME,
T3.code, T3.CODE,
T5.id,
T3.type, T3.type,
T5.NAME area, T5.NAME area,
T3.Remark, T3.Remark,
T3.sort T3.sort
FROM 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_dept T3,
sys_area T5 sys_area T5
WHERE 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.area = t5.id
AND t3.State = 1 AND t3.State = 1
Order by T3.sort asc Order by T3.sort asc