@Override
 public List<IOrganization> getSubOrganization(String orgCode) {
   List<IOrganization> subList = new ArrayList<IOrganization>();
   for (IOrganization org : this.allItems) {
     if (org.getOrgCode().equals(orgCode)) {
       subList.add(org);
     }
   }
   return subList;
 }
  public OrganizationServiceImpl() {
    OrganizationImpl searchCriteria = new OrganizationImpl();
    this.allItems = CommonModel.INSTANCE.searchSubOrganizationInfo(searchCriteria, null, 0, -1);
    for (IOrganization item : allItems) {
      if (item.getParentId() == 0) {
        this.root = item;
        break;
      }
    }
    if (this.root == null) {
      return;
    }

    LegalOrganizationInfoImpl searchCondition1 = new LegalOrganizationInfoImpl();
    searchCondition1.setOrgId(this.root.getId());
    List list = CommonModel.INSTANCE.searchOrgaLegalInfo(searchCondition1, null, 0, 1);
    if (list.size() > 0) {
      this.legalInfo = (ILegalOrganizationInfo) list.get(0);
    }
  }