bug处理
This commit is contained in:
@@ -47,6 +47,8 @@ namespace JNPF.Systems;
|
||||
/// <summary>
|
||||
/// 数据接口
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
/// 作 者:JNPF开发平台组
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "System", Name = "DataInterface", Order = 204)]
|
||||
@@ -312,7 +314,6 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
|
||||
/// <returns></returns>
|
||||
[HttpPost("{id}/Actions/Preview")]
|
||||
[UnitOfWork]
|
||||
[AllowAnonymous]
|
||||
public async Task<dynamic> Preview(string id, [FromBody] DataInterfacePreviewInput input)
|
||||
{
|
||||
_configId = _userManager.TenantId;
|
||||
@@ -324,11 +325,6 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
|
||||
{
|
||||
dicParameters = input.paramList.ToDictionary(x => x.field, y => y.defaultValue);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(info.Path) && !info.Path.StartsWith("http"))
|
||||
{
|
||||
info.Path = $"{App.HttpContext.Request.Scheme}://{App.HttpContext.Request.Host}{info.Path}";
|
||||
}
|
||||
VerifyRequired(info, dicParameters);
|
||||
ReplaceParameterValue(info, dicParameters);
|
||||
if (info?.DataType == 1)
|
||||
@@ -562,7 +558,6 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
|
||||
[UnitOfWork]
|
||||
public async Task<dynamic> GetFields(string id, [FromBody] DataInterfacePreviewInput input)
|
||||
{
|
||||
Object tempObj = null;
|
||||
try
|
||||
{
|
||||
//modifyby zhoukeda 20230803
|
||||
@@ -574,22 +569,12 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
|
||||
}
|
||||
else
|
||||
{
|
||||
tempObj = result;
|
||||
var list = result.ToObject<List<Dictionary<string, object>>>().FirstOrDefault().Keys.ToList();
|
||||
return list;
|
||||
return result.ToObject<List<Dictionary<string, object>>>().FirstOrDefault().Keys.ToList();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
try
|
||||
{
|
||||
return JsonConvert.DeserializeObject<List<Dictionary<string,object>>>(JsonConvert.SerializeObject(tempObj)).FirstOrDefault().Keys.ToList();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
throw Oops.Oh(ErrorCode.COM1020);
|
||||
}
|
||||
|
||||
throw Oops.Oh(ErrorCode.COM1020);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user