This commit is contained in:
liangjunyu
2025-10-18 18:05:39 +08:00
parent 90046269fc
commit df103b2abe

View File

@@ -1067,9 +1067,22 @@ namespace RB_MES_API.Controllers
string setPort = ApiSettingsHelper.GetConfig($"{formid}_Port");
if (!setPort.IsNullOrEmpty())
{
string acctid = ApiSettingsHelper.GetConfig("X-KDApi-AcctID");
string appid = ApiSettingsHelper.GetConfig("X-KDApi-AppID");
string sppsec = ApiSettingsHelper.GetConfig("X-KDApi-AppSec");
string usname = ApiSettingsHelper.GetConfig("X-KDApi-UserName");
int lcid = 0;
int.TryParse(ApiSettingsHelper.GetConfig("X-KDApi-LCID"), out lcid);
string serverUrl = ApiSettingsHelper.GetConfig("X-KDApi-ServerUrl");
string orgno = LocalStaticRequest.GetSystemProfile(2, "DefaultORG");
serverUrl = ReplaceOrAddPortAdvanced(serverUrl, setPort);
result = new K3CloudApi(serverUrl).BatchSave(formid, jsonstr);
//serverUrl = serverUrl.Replace("k3cloud/","");
K3CloudApi k3CloudApi = new K3CloudApi(serverUrl);
LogHelper.WriteLog($"云星空API地址 {formid} : {serverUrl}");
k3CloudApi.InitClient(acctid, appid, sppsec, usname, lcid, orgno, serverUrl);
result = k3CloudApi.BatchSave(formid, jsonstr);
}
else
{