dongdingding 1 month ago
commit a24b271b58

@ -210,7 +210,7 @@
where nick_name = #{part} where nick_name = #{part}
</select> </select>
<select id="selectTaskId" resultType="java.lang.Integer"> <select id="selectTaskId" resultType="java.lang.Integer">
select id from asset_task where dwmc like concat('%',#{dwmc},'%') and type like concat('%',#{type},'%') select id from asset_task where dwmc like concat('%',#{dwmc},'%') and type like concat('%',#{type},'%') and task_status = '1'
</select> </select>
<select id="getAppSchema" resultType="com.ruoyi.common.core.domain.entity.SysDept"> <select id="getAppSchema" resultType="com.ruoyi.common.core.domain.entity.SysDept">
WITH RECURSIVE category_tree AS (-- 初始查询找出根节点或特定parentid的记录 WITH RECURSIVE category_tree AS (-- 初始查询找出根节点或特定parentid的记录
@ -222,7 +222,7 @@
LEFT JOIN sys_dept d ON b.dept_id = d.dept_id LEFT JOIN sys_dept d ON b.dept_id = d.dept_id
WHERE WHERE
d.dept_id IS NOT NULL d.dept_id IS NOT NULL
AND d.parent_id != 0
GROUP BY GROUP BY
d.dept_id, d.dept_id,
d.parent_id, d.parent_id,
@ -244,7 +244,8 @@
) SELECT ) SELECT
* *
FROM FROM
category_tree; category_tree
ORDER BY dept_id desc
</select> </select>
<select id="getEmailSchema" resultType="com.ruoyi.common.core.domain.entity.SysDept"> <select id="getEmailSchema" resultType="com.ruoyi.common.core.domain.entity.SysDept">
WITH RECURSIVE category_tree AS (-- 初始查询找出根节点或特定parentid的记录 WITH RECURSIVE category_tree AS (-- 初始查询找出根节点或特定parentid的记录
@ -256,7 +257,7 @@
LEFT JOIN sys_dept d ON b.dept_id = d.dept_id LEFT JOIN sys_dept d ON b.dept_id = d.dept_id
WHERE WHERE
d.dept_id IS NOT NULL d.dept_id IS NOT NULL
AND d.parent_id != 0
GROUP BY GROUP BY
d.dept_id, d.dept_id,
d.parent_id, d.parent_id,
@ -278,7 +279,8 @@
) SELECT ) SELECT
* *
FROM FROM
category_tree; category_tree
ORDER BY dept_id desc
</select> </select>
<select id="getMiniSchema" resultType="com.ruoyi.common.core.domain.entity.SysDept"> <select id="getMiniSchema" resultType="com.ruoyi.common.core.domain.entity.SysDept">
WITH RECURSIVE category_tree AS (-- 初始查询找出根节点或特定parentid的记录 WITH RECURSIVE category_tree AS (-- 初始查询找出根节点或特定parentid的记录
@ -290,7 +292,7 @@
LEFT JOIN sys_dept d ON b.dept_id = d.dept_id LEFT JOIN sys_dept d ON b.dept_id = d.dept_id
WHERE WHERE
d.dept_id IS NOT NULL d.dept_id IS NOT NULL
AND d.parent_id != 0
GROUP BY GROUP BY
d.dept_id, d.dept_id,
d.parent_id, d.parent_id,
@ -312,7 +314,8 @@
) SELECT ) SELECT
* *
FROM FROM
category_tree; category_tree
ORDER BY dept_id desc
</select> </select>
<select id="getGzpSchema" resultType="com.ruoyi.common.core.domain.entity.SysDept"> <select id="getGzpSchema" resultType="com.ruoyi.common.core.domain.entity.SysDept">
WITH RECURSIVE category_tree AS (-- 初始查询找出根节点或特定parentid的记录 WITH RECURSIVE category_tree AS (-- 初始查询找出根节点或特定parentid的记录
@ -324,7 +327,7 @@
LEFT JOIN sys_dept d ON b.dept_id = d.dept_id LEFT JOIN sys_dept d ON b.dept_id = d.dept_id
WHERE WHERE
d.dept_id IS NOT NULL d.dept_id IS NOT NULL
AND d.parent_id != 0
GROUP BY GROUP BY
d.dept_id, d.dept_id,
d.parent_id, d.parent_id,
@ -346,7 +349,8 @@
) SELECT ) SELECT
* *
FROM FROM
category_tree; category_tree
ORDER BY dept_id desc
</select> </select>
<select id="getWebSchema" resultType="com.ruoyi.common.core.domain.entity.SysDept"> <select id="getWebSchema" resultType="com.ruoyi.common.core.domain.entity.SysDept">
WITH RECURSIVE category_tree AS (-- 初始查询找出根节点或特定parentid的记录 WITH RECURSIVE category_tree AS (-- 初始查询找出根节点或特定parentid的记录
@ -358,29 +362,29 @@
LEFT JOIN sys_dept d ON b.dept_id = d.dept_id LEFT JOIN sys_dept d ON b.dept_id = d.dept_id
WHERE WHERE
d.dept_id IS NOT NULL d.dept_id IS NOT NULL
AND d.parent_id != 0 GROUP BY
GROUP BY d.dept_id,
d.dept_id, d.parent_id,
d.parent_id, d.ancestors,
d.ancestors, d.dept_name,
d.dept_name, d.order_num,
d.order_num, d.leader,
d.leader, d.phone,
d.phone, d.email,
d.email, d.STATUS,
d.STATUS, d.del_flag,
d.del_flag, d.create_by,
d.create_by, d.create_time UNION ALL-- 递归查询根据parentid为上级id继续查询下一级数据
d.create_time UNION ALL-- 递归查询根据parentid为上级id继续查询下一级数据 SELECT
SELECT d.*
d.* FROM
sys_dept d
JOIN category_tree ct ON d.dept_id = ct.parent_id
) SELECT
*
FROM FROM
sys_dept d category_tree
JOIN category_tree ct ON d.dept_id = ct.parent_id ORDER BY dept_id desc
) SELECT
*
FROM
category_tree;
</select> </select>
<update id="deleteUnits"> <update id="deleteUnits">

Loading…
Cancel
Save