提交 a8d5665e 编写于 作者: M MaxKey

root organization node

上级 e6458bf9
...@@ -25,6 +25,13 @@ import javax.persistence.GenerationType; ...@@ -25,6 +25,13 @@ import javax.persistence.GenerationType;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
import org.apache.mybatis.jpa.persistence.JpaBaseEntity; import org.apache.mybatis.jpa.persistence.JpaBaseEntity;
/**
* root organization node,<br> id = instId or id = parentId or parentId = -1 or parentId = 0
* @author crystal.sea
*
*/
@Entity @Entity
@Table(name = "MXK_ORGANIZATIONS") @Table(name = "MXK_ORGANIZATIONS")
public class Organizations extends JpaBaseEntity implements Serializable { public class Organizations extends JpaBaseEntity implements Serializable {
......
...@@ -171,7 +171,11 @@ public class OrganizationsController { ...@@ -171,7 +171,11 @@ public class OrganizationsController {
treeNode.setLeaf(true); treeNode.setLeaf(true);
treeAttributes.addNode(treeNode); treeAttributes.addNode(treeNode);
nodeCount ++; nodeCount ++;
if(org.getId().equalsIgnoreCase(currentUser.getInstId())) { //root organization node, id = instId or id = parentId or parentId = -1 or parentId = 0
if(org.getId().equalsIgnoreCase(currentUser.getInstId())
||org.getId().equalsIgnoreCase(org.getParentId())
||org.getParentId().equalsIgnoreCase("0")
||org.getParentId().equalsIgnoreCase("-1")) {
treeNode.setExpanded(true); treeNode.setExpanded(true);
treeNode.setLeaf(false); treeNode.setLeaf(false);
treeAttributes.setRootNode(treeNode); treeAttributes.setRootNode(treeNode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册