OA联调
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using BaseOUDAL;
|
||||
using Qdp.Foundation.Utilities;
|
||||
using YLErp.DBModels;
|
||||
using YLErp.DBModels.Consts;
|
||||
@@ -110,7 +111,11 @@ namespace YLErp.Modules.TradeModule
|
||||
// 获取OA配置
|
||||
var oaConfigSection = AppManager.GetConfiguration().GetSection("oa_confg");
|
||||
var baseUrl = oaConfigSection["BaseUrl"];
|
||||
var loginName = UserInfo.OaAccount;
|
||||
var loginName = string.Empty;
|
||||
using (var adminDb = new ErpBaseContext()) {
|
||||
var userInfo=adminDb.SystemUsers.FirstOrDefault(x=>x.Id==UserInfo.UserId);
|
||||
loginName= userInfo?.OaAccount;
|
||||
}
|
||||
var systemKey = oaConfigSection["SystemKey"];
|
||||
var objectClass = oaConfigSection["ObjectClass"];
|
||||
var urgent = int.Parse(oaConfigSection["Urgent"] ?? "1");
|
||||
@@ -239,7 +244,7 @@ namespace YLErp.Modules.TradeModule
|
||||
logger.Info($"OA接口参数:{JsonHelper.Serialize(oaRequest)}");
|
||||
// 调用OA接口
|
||||
var httpClient = new HttpClientWrap(baseUrl);
|
||||
var response = httpClient.PostJson("/fileDraft", oaRequest, null);
|
||||
var response = httpClient.PostJson("/ZSZQ/fileDraft", oaRequest, null);// fileDraft
|
||||
logger.Info($"OA接口返回:{response}");
|
||||
// 解析响应
|
||||
var responseObj = JsonHelper.Deserialize<OAResponse>(response);
|
||||
|
||||
Reference in New Issue
Block a user