mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
fix #I85BNJ 打印模板左侧的拖动按钮优化
This commit is contained in:
parent
ac8704f79f
commit
d209a288f2
@ -46,7 +46,7 @@ namespace OpenAuth.App.Request
|
||||
/// <summary>
|
||||
///中文视图名;设计打印方案时,提供中文快捷按钮的视图来源
|
||||
/// </summary>
|
||||
public string CloumnView { get; set; }
|
||||
public string ColumnView { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///打印方案内容;打印方案JSON对象
|
||||
|
@ -92,6 +92,7 @@ namespace OpenAuth.App
|
||||
Name = obj.Name,
|
||||
SourceSql = obj.SourceSql,
|
||||
PlanContent = obj.PlanContent,
|
||||
ColumnView = obj.ColumnView,
|
||||
InParamColumn = obj.InParamColumn,
|
||||
GroupBy = obj.GroupBy
|
||||
},u => u.Id == obj.Id);
|
||||
@ -100,5 +101,15 @@ namespace OpenAuth.App
|
||||
public SysPrinterPlanApp(ISqlSugarClient client, IAuth auth) : base(client, auth)
|
||||
{
|
||||
}
|
||||
|
||||
public List<DbTableInfo> GetTables()
|
||||
{
|
||||
return SugarClient.DbMaintenance.GetTableInfoList();
|
||||
}
|
||||
|
||||
public List<DbColumnInfo> GetColumns(string tableViewName)
|
||||
{
|
||||
return SugarClient.DbMaintenance.GetColumnInfosByTableName(tableViewName);
|
||||
}
|
||||
}
|
||||
}
|
@ -24,7 +24,7 @@ namespace OpenAuth.Repository.Domain
|
||||
this.Name = "";
|
||||
this.CreateUser = "";
|
||||
this.SourceSql = "";
|
||||
this.CloumnView = "";
|
||||
this.ColumnView = "";
|
||||
this.PlanContent = "";
|
||||
this.InParamColumn = "";
|
||||
this.GroupBy = "";
|
||||
@ -54,7 +54,7 @@ namespace OpenAuth.Repository.Domain
|
||||
///中文视图名;设计打印方案时,提供中文快捷按钮的视图来源
|
||||
/// </summary>
|
||||
[Description("中文视图名;设计打印方案时,提供中文快捷按钮的视图来源")]
|
||||
public string CloumnView { get; set; }
|
||||
public string ColumnView { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///入口参数字段;入库参数字段数组,通过,分隔
|
||||
|
@ -58,6 +58,18 @@ namespace OpenAuth.Repository.Test
|
||||
Console.WriteLine(JsonHelper.Instance.Serialize(query.ToList()));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestGetColumns()
|
||||
{
|
||||
var sugarClient = _autofacServiceProvider.GetService<ISqlSugarClient>();
|
||||
|
||||
var tables = sugarClient.DbMaintenance.GetTableInfoList();
|
||||
// Console.WriteLine(JsonHelper.Instance.Serialize(tables));
|
||||
|
||||
var query = sugarClient.DbMaintenance.GetColumnInfosByTableName("userv");
|
||||
Console.WriteLine(JsonHelper.Instance.Serialize(query));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDynamic()
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Infrastructure;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@ -6,6 +7,7 @@ using OpenAuth.App;
|
||||
using OpenAuth.App.Request;
|
||||
using OpenAuth.App.Response;
|
||||
using OpenAuth.Repository.Domain;
|
||||
using SqlSugar;
|
||||
|
||||
namespace OpenAuth.WebApi.Controllers
|
||||
{
|
||||
@ -55,6 +57,49 @@ namespace OpenAuth.WebApi.Controllers
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取系统所有的表信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Response<List<DbTableInfo>> GetTables()
|
||||
{
|
||||
var result = new Response<List<DbTableInfo>>();
|
||||
try
|
||||
{
|
||||
result.Result = _app.GetTables();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.Code = 500;
|
||||
result.Message = ex.InnerException?.Message ?? ex.Message;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按表名或视图名称获取列名
|
||||
/// </summary>
|
||||
/// <param name="tableViewName"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Response<List<DbColumnInfo>> GetColumns(string tableViewName)
|
||||
{
|
||||
var result = new Response<List<DbColumnInfo>>();
|
||||
try
|
||||
{
|
||||
result.Result = _app.GetColumns(tableViewName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.Code = 500;
|
||||
result.Message = ex.InnerException?.Message ?? ex.Message;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//修改
|
||||
[HttpPost]
|
||||
|
Loading…
Reference in New Issue
Block a user