diff --git a/src/com/engine/sship/service/impl/OrgChartServiceImpl.java b/src/com/engine/sship/service/impl/OrgChartServiceImpl.java index b0cca9f..e40c0c8 100644 --- a/src/com/engine/sship/service/impl/OrgChartServiceImpl.java +++ b/src/com/engine/sship/service/impl/OrgChartServiceImpl.java @@ -105,7 +105,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService { boolean isExsit = selectIdsByRole(roleId, rolelevel); if (isExsit || (user.getUID() == 1)) { //ShareHolder唯一 - rs.executeQuery("select id,departmentmark from hrmdepartmentvirtual where supdepid = 0 and virtualtype = ?",virtualType); + rs.executeQuery("select id,departmentmark from hrmdepartmentvirtual where supdepid = 0 and virtualtype = ? order by showorder",virtualType); rs.next(); String id = Util.null2String(rs.getString("id")); build = TreeDataVO.builder() @@ -138,7 +138,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService { private List getVirtualSubDept(String supdepid,String virtualType) { RecordSet rs = new RecordSet(); List voList = new ArrayList<>(); - rs.executeQuery("select id,departmentmark from hrmdepartmentvirtual where supdepid <> '' and supdepid = ? and virtualtype = ?",supdepid,virtualType); + rs.executeQuery("select id,departmentmark from hrmdepartmentvirtual where supdepid <> '' and supdepid = ? and virtualtype = ? order by showorder",supdepid,virtualType); while (rs.next()) { String id = Util.null2String(rs.getString("id")); ChartChildrensVO build = ChartChildrensVO.builder()