@Override
 public IPersonalInfo getEmployee(int id) {
   PersonalInfoImpl condition = new PersonalInfoImpl();
   condition.setId(id);
   List<IPersonalInfo> list = CommonModel.INSTANCE.searchPersonInfo(condition, null, 0, -1);
   if (list != null && list.size() > 0) {
     return list.get(0);
   }
   return null;
 }
  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);
    }
  }
 @Override
 public List<IPersonalInfo> getEmployeese(String orgCode) {
   PersonalInfoImpl condition = new PersonalInfoImpl();
   condition.setOrgCode(orgCode);
   return CommonModel.INSTANCE.searchPersonInfo(condition, null, 0, -1);
 }