From 066d3178d59090b80f7312d5cc59b97f346e02ff Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期一, 18 九月 2023 08:39:36 +0800 Subject: [PATCH] 1 --- WebAPI/InvokeHelper.cs | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/WebAPI/InvokeHelper.cs b/WebAPI/InvokeHelper.cs index 59d764c..2cdb5c3 100644 --- a/WebAPI/InvokeHelper.cs +++ b/WebAPI/InvokeHelper.cs @@ -4,28 +4,28 @@ using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; +using WebAPI.Utility; namespace WebAPI { public static class InvokeHelper { - //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 = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "KDApiUrl");//K/3 Cloud 涓氬姟绔欑偣鍦板潃 /// <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"); 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("Administrator");//鐢ㄦ埛鍚� - Parameters.Add("888888");//瀵嗙爜 + Parameters.Add(dbId);//璐﹀鏍囩ず + Parameters.Add(useName);//鐢ㄦ埛鍚� + Parameters.Add(pwd);//瀵嗙爜 Parameters.Add(2052);//2052浠h〃涓枃 httpClient.Content = JsonConvert.SerializeObject(Parameters); @@ -37,9 +37,9 @@ 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("5f9258a311401c");//璐﹀鏍囩ず + Parameters.Add("622703e117d642");//璐﹀鏍囩ず Parameters.Add("Administrator");//鐢ㄦ埛鍚� - Parameters.Add("qaz!@#123");//瀵嗙爜 + Parameters.Add("sa@123456");//瀵嗙爜 Parameters.Add(2052);//2052浠h〃涓枃 httpClient.Content = JsonConvert.SerializeObject(Parameters); @@ -246,6 +246,7 @@ //鐢熶骇璁㈠崟 鎵ц 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"); -- Gitblit v1.9.1