From d3a871c81b7d3fe63422af54fe53ba27dd2b1bb4 Mon Sep 17 00:00:00 2001 From: 王 垚 <1402714037@qq.com> Date: 星期五, 17 六月 2022 11:11:40 +0800 Subject: [PATCH] nothing --- WebAPI/InvokeHelper.cs | 38 +++++++++++++++++++++++++++++++++----- 1 files changed, 33 insertions(+), 5 deletions(-) diff --git a/WebAPI/InvokeHelper.cs b/WebAPI/InvokeHelper.cs index 1ba49f0..055090a 100644 --- a/WebAPI/InvokeHelper.cs +++ b/WebAPI/InvokeHelper.cs @@ -4,6 +4,7 @@ using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; +using WebAPI.Utility; namespace WebAPI { @@ -11,21 +12,29 @@ { //private static string CloudUrl = "http://localhost/k3cloud/";//K/3 Cloud 涓氬姟绔欑偣鍦板潃 //private static string CloudUrl = "http://60.190.4.42:9002/k3cloud/";//K/3 Cloud 涓氬姟绔欑偣鍦板潃 - //private static string CloudUrl = "http://47.96.97.237/k3cloud/";//K/3 Cloud 涓氬姟绔欑偣鍦板潃 - private static string CloudUrl = "http://60.190.4.42:9002/K3CLOUD/";//澶忓疂 + private static string CloudUrl = "http://47.96.97.237/k3cloud/";//K/3 Cloud 涓氬姟绔欑偣鍦板潃 + //private static string CloudUrl = "http://60.190.4.42:9002/K3CLOUD/";//澶忓疂 + //private static string CloudUrl = "http://124.70.129.242/k3cloud/";//闆呯惇璇� /// <summary> /// 鐧婚檰 /// </summary> public static string Login() { + var dbId = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DbId"); + var useName = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "UserName"); + var pwd = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "PassWord"); + var CloudUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "KDApiUrl"); + //var url = GetKey(AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "/kdapi.config", "KDApiUrl"); + //var loginResult = ValidateLogin(dbId, useName, pwd, 2052); + //var resultType = JObject.Parse(loginResult)["LoginResultType"].Value<int>(); HttpClient httpClient = new HttpClient(); httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc"); List<object> Parameters = new List<object>(); - Parameters.Add("61b14ea86f5c8a");//璐﹀鏍囩ず + Parameters.Add("6204a70eba35fc");//璐﹀鏍囩ず Parameters.Add("Administrator");//鐢ㄦ埛鍚� - Parameters.Add("888888");//瀵嗙爜 + Parameters.Add("qaz!@#123");//瀵嗙爜 Parameters.Add(2052);//2052浠h〃涓枃 httpClient.Content = JsonConvert.SerializeObject(Parameters); @@ -186,6 +195,7 @@ return httpClient.SyncRequest(); } + //鍙嶅鏍� public static string UnAudit(string formId, string content) { HttpClient httpClient = new HttpClient(); @@ -199,7 +209,7 @@ httpClient.Content = JsonConvert.SerializeObject(Parameters); return httpClient.SyncRequest(); } - + //涓嬫帹 public static string Push(string formId, string content) { HttpClient httpClient = new HttpClient(); @@ -241,5 +251,23 @@ httpClient.Content = JsonConvert.SerializeObject(args); return httpClient.SyncRequest(); } + + //鐢熶骇璁㈠崟 鎵ц + public static string ExcuteOperation(string formId, string opNumber, string content) + { + LogService.Write("鐢熶骇璁㈠崟 鎵ц锛宱pNumber锛� " + opNumber + ",content:" + content); + HttpClient httpClient = new HttpClient(); + httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExcuteOperation.common.kdsvc"); + + List<object> Parameters = new List<object>(); + //涓氬姟瀵硅薄Id + Parameters.Add(formId); + //鎿嶄綔 寮�宸�"ToStart" + Parameters.Add(opNumber); + //Json瀛椾覆 + Parameters.Add(content); + httpClient.Content = JsonConvert.SerializeObject(Parameters); + return httpClient.SyncRequest(); + } } } -- Gitblit v1.9.1