diff --git a/src/WMS.Web.Core/Dto/Erp/Org/ErpOrgDto.cs b/src/WMS.Web.Core/Dto/Erp/Org/ErpOrgDto.cs
index d80a8212..f422e4af 100644
--- a/src/WMS.Web.Core/Dto/Erp/Org/ErpOrgDto.cs
+++ b/src/WMS.Web.Core/Dto/Erp/Org/ErpOrgDto.cs
@@ -4,6 +4,9 @@ using System.Text;
namespace WMS.Web.Core.Dto.Erp.Org
{
+ ///
+ /// 金蝶组织-基本信息
+ ///
public class ErpOrgDto
{
///
@@ -11,6 +14,9 @@ namespace WMS.Web.Core.Dto.Erp.Org
///
public int Id { get; set; }
+ ///
+ /// 名称
+ ///
public string Name { get; set; }
}
}
diff --git a/src/WMS.Web.Domain/Services/Public/ErpService.cs b/src/WMS.Web.Domain/Services/Public/ErpService.cs
index 1c599f86..65b079c6 100644
--- a/src/WMS.Web.Domain/Services/Public/ErpService.cs
+++ b/src/WMS.Web.Domain/Services/Public/ErpService.cs
@@ -53,21 +53,10 @@ namespace WMS.Web.Domain.Services.Public
this._client = new ERPGWSoapClient(binding, address);
try
{
- var appId = "wms";
- var cache_key = "erp_accesstoken_"+ appId;
- var cache_value = _memoryCache.Get(cache_key);
- if (!string.IsNullOrEmpty(cache_value))
- return Result.ReSuccess(cache_value);
- else
- {
- var result = await this._client.ValidateSystemAsync(this._erpOptions.UserName, this._erpOptions.Password, this._erpOptions.ErpId, appId);
- if (result == null)
- return Result.ReFailure(ResultCodes.Erp_Login_Error);
-
- _memoryCache.Set(cache_key, true, new MemoryCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromMinutes(30)));
- return Result.ReSuccess(result.AccessToken);
- }
-
+ var result = await this._client.ValidateSystemAsync(this._erpOptions.UserName, this._erpOptions.Password, this._erpOptions.ErpId, "");
+ if (result == null)
+ return Result.ReFailure(ResultCodes.Erp_Login_Error);
+ return Result.ReSuccess(result.AccessToken);
}
catch (Exception ex)
{
@@ -84,7 +73,7 @@ namespace WMS.Web.Domain.Services.Public
try
{
var token_result = await this.Init();
- if(!token_result.IsSuccess)
+ if (!token_result.IsSuccess)
return ResultList.ReFailure(token_result);
var query = new ErpBillQueryDto(token_result.Data);