部门接口,字典树接口调整

This commit is contained in:
cdf
2024-05-29 13:40:40 +08:00
parent 619821efc8
commit 8726fdee27
20 changed files with 530 additions and 466 deletions

View File

@@ -30,6 +30,9 @@ public class PvTerminalTreeVO {
@ApiModelProperty(name = "code",value = "单位编号")
private String code;
@ApiModelProperty(name = "level",value = "层级 1.全国 2.省级 3.市级 4.县级")
private Integer level;
@ApiModelProperty(name = "children",value = "子级")

View File

@@ -166,7 +166,10 @@
<select id="allDeptList" resultType="PvTerminalTreeVO">
select id,name,pid,pids,code from sys_dept where state = 1 order by sort
select
id,name,pid,pids,code,
LENGTH( pids ) - LENGTH(REPLACE ( pids, ',', '' )) +1 as `level`
from sys_dept where state = 1 order by sort
</select>