From 849e974e20d9894f3da95ebf504d97ce9f14c9ed Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 05 十二月 2024 15:03:25 +0800
Subject: [PATCH] 工艺路线撤回,出站汇报单修改时间功能能
---
WebAPI/InvokeHelper.cs | 51 ++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/WebAPI/InvokeHelper.cs b/WebAPI/InvokeHelper.cs
index 2cdb5c3..dcf04ee 100644
--- a/WebAPI/InvokeHelper.cs
+++ b/WebAPI/InvokeHelper.cs
@@ -1,5 +1,6 @@
锘縰sing System;
using System.Collections.Generic;
+using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -16,9 +17,50 @@
/// </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");
+ //浠嶤鐩橀厤缃枃浠惰幏鍙� CLOUD缃戝潃銆佽处濂椾俊鎭�佺櫥褰曠敤鎴枫�佺櫥褰曞瘑鐮�
+ Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo);
+ var useName = Pub_Class.ClsPub.sCLOUDUseName;
+ var pwd = Pub_Class.ClsPub.sCLOUDPsd;
+ var dbId = Pub_Class.ClsPub.sCLOUDAcc;
+ CloudUrl = Pub_Class.ClsPub.sCLOUDUrl;
+
+ //鍘熶粠Config/kdapi.config妯″潡涓幏鍙� 20240712灞忚斀
+ //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(dbId);//璐﹀鏍囩ず
+ Parameters.Add(useName);//鐢ㄦ埛鍚�
+ Parameters.Add(pwd);//瀵嗙爜
+ Parameters.Add(2052);//2052浠h〃涓枃
+ httpClient.Content = JsonConvert.SerializeObject(Parameters);
+
+ return httpClient.SyncRequest();
+ }
+
+ public static string LoginUser(string user)
+ {
+ //浠嶤鐩橀厤缃枃浠惰幏鍙� CLOUD缃戝潃銆佽处濂椾俊鎭�佺櫥褰曠敤鎴枫�佺櫥褰曞瘑鐮�
+ Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo);
+ var useName = Pub_Class.ClsPub.sCLOUDUseName;
+ var pwd = Pub_Class.ClsPub.sCLOUDPsd;
+ var dbId = Pub_Class.ClsPub.sCLOUDAcc;
+ CloudUrl = Pub_Class.ClsPub.sCLOUDUrl;
+
+ //鑾峰彇鐢ㄦ埛缁戝畾閲戣澏璐﹀彿
+ DataSet ds;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ ds = oCN.RunProcReturn("exec h_p_API_GetCloudUserByLoginUser '" + user.ToString() + "'", "h_p_API_GetCloudUserByLoginUser");
+
+ if (ds != null && ds.Tables[0].Rows.Count != 0)
+ {
+ useName = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCloudUserName"]);
+ pwd = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCloudUserPsd"]);
+ }
+
HttpClient httpClient = new HttpClient();
httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc");
@@ -215,6 +257,9 @@
return httpClient.SyncRequest();
}
+ /// <summary>
+ /// 鍗曟嵁鏌ヨ
+ /// </summary>
public static string Query(string formId, string content)
{
HttpClient httpClient = new HttpClient();
--
Gitblit v1.9.1