|
|
@ -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的记录
|
|
|
@ -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的记录
|
|
|
@ -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的记录
|
|
|
@ -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的记录
|
|
|
@ -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
|
|
|
|
|
|
|
|
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">
|
|
|
|