//获取组织编号 //public string getDepartCode(string _account) //{ // string _departCode = ""; // XmlDocument _api = XmlProvider.Document("api"); // _api.Load("http://bpm.qgj.cn/api/bpmapi.asmx/GetUserDepartPath?profile=" + _account); // foreach(XmlNode _section in _api.DocumentElement.SelectNodes("Member")) // { // string _ouPath = _section.SelectSingleNode("Code").InnerText; // if (_ouPath.CompareTo("0002") == 1) // { // _departCode = "0002"; // } // } // return _departCode; //} //钉钉接口获取组织架构 public string getOUCode(string _account) { GetUserInfo user = new GetUserInfo(_account); if (user.getOUCode("0002").Contains("0002")) { return("0002"); } else if (user.getOUCode("0012").Contains("0012")) { return("0012"); } else { return(""); } }
//获取领导账号 public string getDepart(string _apply) { GetUserInfo user = new GetUserInfo(_apply); return((string)Provider.Invoke("CLDD.Providers.ToolDol.getDepartAccount", new object[] { this.context }, new object[] { user.getOUCode("0002") })); }