电子看板-杆塔数据接口

This commit is contained in:
cwchen 2025-04-25 13:33:43 +08:00
parent 4ad658c55e
commit 8806278fc9
2 changed files with 13 additions and 3 deletions

View File

@ -20,5 +20,9 @@ public class ProTreeVo {
private String parentId;
private String lon;
private String lat;
private List<ProTreeVo> children;
}

View File

@ -8,11 +8,15 @@
SELECT DISTINCT A.* FROM (
SELECT '0' AS id,
'全部工程' AS title,
null AS parentId
null AS parentId,
null AS lon,
null AS lat
UNION ALL
SELECT CONCAT('departId-',td.id) AS id,
td2.depart_name AS title,
'0' AS parentId
'0' AS parentId,
null AS lon,
null AS lat
FROM tb_project tp
LEFT JOIN tb_depart td ON tp.depart_id = td.id
LEFT JOIN tb_depart td2 ON td.parent_id = td2.id
@ -28,7 +32,9 @@
UNION ALL
SELECT tp.id,
tp.pro_name AS title,
CONCAT('departId-',depart_id) AS parentId
CONCAT('departId-',depart_id) AS parentId,
tp.lon AS lon,
tp.lat AS lat
FROM tb_project tp
<where>
<if test="level != '1' and departs != null and departs.size() > 0">