@@ -100,7 +100,7 @@
and a.parent_id = 0
and a.project_id = b.id
and b.is_deleted = 0
- union ALL
+ union
SELECT id, c.wbs_name, 1 as wbsType FROM m_wbs_info c where c.is_deleted = 0
)d where 1=1
<if test="wbstype!=null and wbstype!=''">
@@ -163,6 +163,7 @@
AND dept.project_id = #{wbsId}
/* AND dept.type = 1
AND status = 1*/
+ GROUP BY dept.id
ORDER BY dept.sort
</select>