代码生成器增加同步数据结构;

修复sql server 生成float类型;
修复非system用户【代码生成器中找不到xxx的定义】;
修复用户已处理流程列表中看不到【不同意】的流程;
This commit is contained in:
yubaolee
2021-12-07 01:06:53 +08:00
parent 9fd0405721
commit c8caf9dee3
7 changed files with 118 additions and 6 deletions

View File

@@ -15,6 +15,7 @@
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using Infrastructure;
@@ -122,7 +123,18 @@ namespace OpenAuth.App
public List<BuilderTableColumn> GetTableColumns(string moduleCode)
{
var allprops = UnitWork.Find<BuilderTableColumn>(u => u.TableName.ToLower() == moduleCode.ToLower());
//如果是子表,直接返回所有字段
var builderTable = UnitWork.FirstOrDefault<BuilderTable>(u => u.TableName.ToLower() == moduleCode.ToLower());
if (builderTable == null)
{
throw new Exception($"代码生成器中找不到{moduleCode.ToLower()}的定义");
}
//如果是子表,因为不能在模块界面分配,所以直接返回所有字段,后期可以优化。
if (builderTable.ParentTableId != null)
{
return allprops.ToList();
}
//如果是系统模块直接返回所有字段。防止开发者把模块配置成系统模块还在外层调用loginContext.GetProperties("xxxx");
bool? isSysModule = UnitWork.FirstOrDefault<Module>(u => u.Code == moduleCode)?.IsSys;
if (isSysModule!= null && isSysModule.Value)