This commit is contained in:
2025-05-16 18:37:51 +08:00
parent 0ecbc73c0b
commit 6e91814080
4 changed files with 20 additions and 15 deletions

View File

@@ -33,7 +33,7 @@ namespace MyCode.Project.OutSideService.Implementation
/// 获取一个K3客户端
/// </summary>
/// <returns></returns>
public K3CloudApi GetK3CloudClient()
public K3CloudApi GetK3CloudClient(string yuYan = "")
{
/***
@@ -54,12 +54,13 @@ namespace MyCode.Project.OutSideService.Implementation
// 时间
"Timestamp": 30
}
}
}
语言ID中文2052默认英文1033繁体3076;
*
*
* */
if (staClient == null || DateTime.Now>timeOut)
if (staClient == null || DateTime.Now>timeOut ||1==1)
{
string AppID = ConfigurationManager.AppSettings.Get("X-KDApi-AppID");
@@ -67,11 +68,13 @@ namespace MyCode.Project.OutSideService.Implementation
string AcctID = ConfigurationManager.AppSettings.Get("X-KDApi-AcctID");
string AppSec = ConfigurationManager.AppSettings.Get("X-KDApi-AppSec");
string LCID = ConfigurationManager.AppSettings.Get("X-KDApi-LCID");
if (yuYan != "")
LCID = yuYan;
string ServerUrl = ConfigurationManager.AppSettings.Get("X-KDApi-ServerUrl");
staClient = new K3CloudApi(ServerUrl);
//staClient = new K3CloudApi(ServerUrl);
timeOut = DateTime.Now.AddMinutes(5);
//staClient.InitClient(AcctID, AppID, AppSec, UserName,int.Parse(LCID), "100", ServerUrl);
staClient = new K3CloudApi();
staClient.InitClient(AcctID, AppID, AppSec, UserName, int.Parse(LCID), "100", ServerUrl);
//staClient.InitClient("65edc24ab975db", "302967_20fp7YsL2kpWR9VG5Y3LSbUHzv3/SDmv", "5e38f16711514126ae1511ca4ead3232", "ERP1", 2052, "100", "http://8.138.110.197/k3cloud/");
}
return staClient;
@@ -138,9 +141,9 @@ namespace MyCode.Project.OutSideService.Implementation
#endregion
public string QueryList(BillQuery queryParam)
public string QueryList(BillQuery queryParam,string yuYan="")
{
staClient = GetK3CloudClient();
staClient = GetK3CloudClient(yuYan);
//staClient.InitClient("65edc24ab975db", "302967_20fp7YsL2kpWR9VG5Y3LSbUHzv3/SDmv", "5e38f16711514126ae1511ca4ead3232", "ERP1", 2052, "100", "http://8.138.110.197/k3cloud/");
//BillQuery billQuery = new BillQuery();
//FieldKeys = "FID,FBillNo,FDate,FBILLTYPEID,FSUPPLIERID,FName,FSupplierId,FModifyDate,FPurchaserId,FMaterialId,FQty,FEntryNote,FBillAllAmount_LC",