import { Injectable } from '@angular/core';
import {HttpClient} from  '@angular/common/http';
import {CommonsService} from './commons.service';
import {environment} from '../../environments/environment';

@Injectable({
  providedIn: 'root'
})
export class OrganizationService {

  constructor(
      private http: HttpClient,
      private common: CommonsService
  ) { }

  /**
   * 查询组织架构列表
   * @param paramObject 参数
   * @param callBack
   */
  getOrganizationList(companyId: number, callBack) {
    this.http.get(environment.baseUrl + 'bsOrganization/getOrganizationList?companyId=' + companyId).subscribe(data => {
      callBack(data);
    });
  }
}
