合并代码提交

This commit is contained in:
2022-11-17 15:10:16 +08:00
parent f368ebd623
commit 52645fa5b0
3 changed files with 63 additions and 62 deletions

View File

@@ -24,6 +24,8 @@ public class DeptDTO implements Serializable {
private String name; private String name;
private String code;
private String area; private String area;
private String remark; private String remark;

View File

@@ -41,7 +41,6 @@ public class Dept extends BaseEntity {
/** /**
* 部门编号 * 部门编号
*/ */
@TableField(exist=false)
private String code; private String code;
/** /**

View File

@@ -12,12 +12,12 @@
AND ${ew.sqlSegment} AND ${ew.sqlSegment}
</select> </select>
<!-- &lt;!&ndash;查询排序&ndash;&gt;--> <!-- &lt;!&ndash;查询排序&ndash;&gt;-->
<!-- <select id="getSortNum" resultType="int">--> <!-- <select id="getSortNum" resultType="int">-->
<!-- SELECT MAX(sys_dept.sort) sort--> <!-- SELECT MAX(sys_dept.sort) sort-->
<!-- FROM sys_dept sys_dept--> <!-- FROM sys_dept sys_dept-->
<!-- WHERE sys_dept.state = 1--> <!-- WHERE sys_dept.state = 1-->
<!-- </select>--> <!-- </select>-->
<select id="getIdString" resultType="String"> <select id="getIdString" resultType="String">
SELECT sys_dept.pids pids SELECT sys_dept.pids pids
@@ -30,31 +30,30 @@
SELECT SELECT
T3.*, T3.*,
T5.id area, T5.id area,
T5.name areaName T5.NAME areaName
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
UNION
SELECT
T3.*,
T5.id area,
T5.NAME areaName
FROM
sys_dept T3,
sys_area T5
WHERE
t3.area = t5.id
and T3.id = #{id}
AND t3.State = 1
</select> </select>
<select id="getAllDeptTree" resultType="DeptAllTreeVO"> <select id="getAllDeptTree" resultType="DeptAllTreeVO">
@@ -125,6 +124,7 @@
T3.pid, T3.pid,
T3.pids, T3.pids,
T3.NAME, T3.NAME,
T3.code,
T3.type, T3.type,
T5.NAME area , T5.NAME area ,
T3.Remark, T3.Remark,