去除引用common.props

This commit is contained in:
2023-11-06 19:35:59 +08:00
parent 6a2154edd9
commit c6b8dfc861
810 changed files with 3910 additions and 6695 deletions

View File

@@ -3,13 +3,8 @@
// https://git.tuotong-tech.com/tnb/tnb.server //
/////////////////////////////////////////////////////////////////////////////////
using Aspose.Cells.Drawing;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Tnb.Core;
using Tnb.Vengine.Domain;
namespace Tnb.Vengine.AppService;

View File

@@ -40,7 +40,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
/// 获取一条 数据信息
/// </summary>
[HttpGet("api/[area]/[controller]/{vmid}/get")]
public async Task<dynamic?> GetAsync(string vmid, [FromQuery]VmGetInput input)
public async Task<dynamic?> GetAsync(string vmid, [FromQuery] VmGetInput input)
{
var vm = await _dataAccess.GetVmodelAsync(vmid, true);
VmListInput arg = input.Adapt<VmListInput>();

View File

@@ -4,7 +4,6 @@
/////////////////////////////////////////////////////////////////////////////////
using System.Reflection;
using JNPF.Common.Security;
using Mapster;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

View File

@@ -4,7 +4,6 @@
/////////////////////////////////////////////////////////////////////////////////
using JNPF;
using JNPF.Common.Extension;
using JNPF.Common.Security;
using JNPF.ViewEngine;
using Mapster;
@@ -48,7 +47,7 @@ public class VmodelAppService : VengineAppService<Vmodel>, IVmodelAppService
{
vm = await _dataAccess.GetVmodelAsync(input.id, para.drill);
}
else if(!string.IsNullOrEmpty(para.areaCode) && !string.IsNullOrEmpty(para.vmCode))
else if (!string.IsNullOrEmpty(para.areaCode) && !string.IsNullOrEmpty(para.vmCode))
{
vm = await _dataAccess.GetVmodelAsync(para.areaCode, para.vmCode, para.drill);
}

View File

@@ -1,5 +1,4 @@
using System.Text.RegularExpressions;
using JNPF.Common.Configuration;
namespace Tnb.Vengine;

View File

@@ -1,10 +1,8 @@
using System.Collections.Concurrent;
using System.Security.Cryptography.Xml;
using JNPF;
using JNPF.Common.Core.Manager;
using JNPF.Common.Extension;
using JNPF.DependencyInjection;
using Microsoft.Extensions.Configuration;
using SqlSugar;
using Tnb.Core;
using Tnb.Vengine.Domain;

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Extension;
using JNPF.Common.Extension;
using Tnb.Vengine.DataAccess;
namespace Tnb.Vengine.Domain
@@ -100,6 +95,6 @@ namespace Tnb.Vengine.Domain
internal class NavigateVmodel
{
public Vmodel? navModel { get; set; }
public string navPath { get; set; }
public string navPath { get; set; }
}
}

View File

@@ -122,7 +122,8 @@ public class FormDataParsing : ITransient
{
conversionData = data.ToString() + ".".PadRight((int)fieldsModel.precision + 1, '0');
conversionData = conversionData.ParseToDouble();//modifyby zhoukeda 20230605
}else conversionData = data;
}
else conversionData = data;
break;
case JnpfKeyConst.JNPFAMOUNT:
conversionData = data.ParseToDecimal(); // 金额输入
@@ -525,7 +526,7 @@ public class FormDataParsing : ITransient
{
if (isShortLink && model.__config__.jnpfKey.Equals(JnpfKeyConst.CREATETIME))
return null;
else if(model.__config__.jnpfKey.Equals(JnpfKeyConst.CREATETIME) || model.__config__.jnpfKey.Equals(JnpfKeyConst.DATE))
else if (model.__config__.jnpfKey.Equals(JnpfKeyConst.CREATETIME) || model.__config__.jnpfKey.Equals(JnpfKeyConst.DATE))
return res.ToString().ParseToDateTime();
else if (model.__config__.jnpfKey.Equals(JnpfKeyConst.NUMINPUT) || model.__config__.jnpfKey.Equals(JnpfKeyConst.SWITCH))//modify by zhoukeda 2023427 开关默认数字
return res;
@@ -1826,7 +1827,7 @@ public class FormDataParsing : ITransient
var res = _runService.GetRelationFormList(relationFormModel, listQueryInput).WaitAsync(TimeSpan.FromMinutes(2)).Result;
relationFormDataList = res.list.ToList();
_cacheManager.Set(redisName, relationFormDataList, TimeSpan.FromMinutes(10)); // 缓存10分钟
});
});
}
}
@@ -1908,7 +1909,7 @@ public class FormDataParsing : ITransient
form.__config__.templateJson.ForEach(x => x.defaultValue = (dataMap.ContainsKey(x.relationField) && dataMap[x.relationField] != null) ? dataMap[x.relationField]?.ToString() : x.defaultValue);
_databaseService.ChangeDataBase(_databaseService.GetTenantDbLink(_userManager.TenantId, _userManager.TenantDbName));
var res = _dataInterfaceService.GetResponseByType(form.__config__.propsUrl, 0, string.Empty, new Common.Dtos.VisualDev.VisualDevDataFieldDataListInput() { paramList = form.__config__.templateJson.Adapt<List<DataInterfaceReqParameterInfo>>(), pageSize = 500, currentPage = 1 }).Result;
var resList = res.ToObject<PageResult<Dictionary<string,object>>>();
var resList = res.ToObject<PageResult<Dictionary<string, object>>>();
if (resList != null && resList.list.Any())
{
foreach (object? item in mValue)

View File

@@ -1,5 +1,4 @@
using JNPF.DependencyInjection;
using JNPF.VisualDev.Engine.Model.CodeGen;
namespace JNPF.VisualDev.Engine;

View File

@@ -1,43 +1,28 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Dtos.VisualDev;
using JNPF.Common.Extension;
using JNPF.DependencyInjection;
using JNPF.VisualDev.Entitys;
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
using JNPF.VisualDev.Interfaces;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using JNPF.DependencyInjection;
namespace JNPF.VisualDev
{
public interface IVisualDevOverideActionManager : ISingleton
{
void Set(string modelId, IOverideVisualDevService overideVisualDev);
public interface IVisualDevOverideActionManager : ISingleton
{
void Set(string modelId, IOverideVisualDevService overideVisualDev);
IOverideVisualDevService? GetOrDefault(string modelId);
}
IOverideVisualDevService? GetOrDefault(string modelId);
}
public interface IOverideVisualDevService
{
//string ModelId { get; set; }
OverideVisualDevFunc OverideFuncs { get; }
public interface IOverideVisualDevService
{
//string ModelId { get; set; }
OverideVisualDevFunc OverideFuncs { get; }
//Task<dynamic>? GetList(VisualDevModelListQueryInput input);
//Task<dynamic>? GetInfo(string id);
//Task<dynamic>? GetDetails(string id, string modelId);
//Task<dynamic>? Create(VisualDevModelDataCrInput visualdevModelDataCrForm);
//Task<dynamic>? Update(string id, VisualDevModelDataUpInput visualdevModelDataUpForm);
//Task? Delete(string id);
//Task? BatchDelete(VisualDevModelDataBatchDelInput input);
//Task<dynamic>? Export(VisualDevModelListQueryInput input);
//Task<dynamic>? Import(IFormFile file);
}
//Task<dynamic>? GetList(VisualDevModelListQueryInput input);
//Task<dynamic>? GetInfo(string id);
//Task<dynamic>? GetDetails(string id, string modelId);
//Task<dynamic>? Create(VisualDevModelDataCrInput visualdevModelDataCrForm);
//Task<dynamic>? Update(string id, VisualDevModelDataUpInput visualdevModelDataUpForm);
//Task? Delete(string id);
//Task? BatchDelete(VisualDevModelDataBatchDelInput input);
//Task<dynamic>? Export(VisualDevModelListQueryInput input);
//Task<dynamic>? Import(IFormFile file);
}
}

View File

@@ -1,22 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Extension;
using JNPF.VisualDev.Entitys;
using JNPF.VisualDev.Interfaces;
using Microsoft.AspNetCore.Mvc.Filters;
namespace JNPF.VisualDev
namespace JNPF.VisualDev
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] //modified by ly on 20230428 允许特性在一个类上多重定义
public class OverideVisualDevAttribute : Attribute
{
public string ModelId { get; set; }
public OverideVisualDevAttribute(string modelId)
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] //modified by ly on 20230428 允许特性在一个类上多重定义
public class OverideVisualDevAttribute : Attribute
{
ModelId = modelId;
public string ModelId { get; set; }
public OverideVisualDevAttribute(string modelId)
{
ModelId = modelId;
}
}
}
}

View File

@@ -1,34 +1,21 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Dtos.VisualDev;
using JNPF.Common.Extension;
using JNPF.DependencyInjection;
using JNPF.VisualDev.Entitys;
using JNPF.Common.Dtos.VisualDev;
using JNPF.VisualDev.Entitys.Dto.VisualDev;
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
using JNPF.VisualDev.Interfaces;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
namespace JNPF.VisualDev
{
public class OverideVisualDevFunc
{
public Func<VisualDevModelListQueryInput, Task<dynamic>>? GetListAsync { get; set; } = null;
public Func<string, Task<dynamic>>? GetAsync { get; set; } = null;
public Func<string, Task<dynamic>>? GetDetailsAsync { get; set; } = null;
public Func<VisualDevModelDataCrInput, Task<dynamic>>? CreateAsync { get; set; } = null;
public Func<string, VisualDevModelDataUpInput, Task<dynamic>>? UpdateAsync { get; set; } = null;
public Func<string, Task>? DeleteAsync { get; set; } = null;
public Func<VisualDevModelDataBatchDelInput, Task>? DeleteRangeAsync { get; set; } = null;
public Func<VisualDevModelListQueryInput, Task<dynamic>>? ExportAsync { get; set; } = null;
public Func<IFormFile, Task<dynamic>>? ImportAsync { get; set; } = null;
public Func<VisualDevImportDataInput, Task<dynamic>>? ImportDataAsync { get; set; } = null;
public class OverideVisualDevFunc
{
public Func<VisualDevModelListQueryInput, Task<dynamic>>? GetListAsync { get; set; } = null;
public Func<string, Task<dynamic>>? GetAsync { get; set; } = null;
public Func<string, Task<dynamic>>? GetDetailsAsync { get; set; } = null;
public Func<VisualDevModelDataCrInput, Task<dynamic>>? CreateAsync { get; set; } = null;
public Func<string, VisualDevModelDataUpInput, Task<dynamic>>? UpdateAsync { get; set; } = null;
public Func<string, Task>? DeleteAsync { get; set; } = null;
public Func<VisualDevModelDataBatchDelInput, Task>? DeleteRangeAsync { get; set; } = null;
public Func<VisualDevModelListQueryInput, Task<dynamic>>? ExportAsync { get; set; } = null;
public Func<IFormFile, Task<dynamic>>? ImportAsync { get; set; } = null;
public Func<VisualDevImportDataInput, Task<dynamic>>? ImportDataAsync { get; set; } = null;
}
}

View File

@@ -1,38 +1,28 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Concurrent;
using JNPF.Common.Extension;
using JNPF.DependencyInjection;
using JNPF.VisualDev.Entitys;
using JNPF.VisualDev.Interfaces;
using Microsoft.AspNetCore.Mvc.Filters;
namespace JNPF.VisualDev
{
public class OverideVisualDevManager
{
private static ConcurrentDictionary<string, Type> actions = new ConcurrentDictionary<string, Type>();
public OverideVisualDevManager()
public class OverideVisualDevManager
{
}
private static ConcurrentDictionary<string, Type> actions = new ConcurrentDictionary<string, Type>();
public OverideVisualDevManager()
{
}
public static IOverideVisualDevService? GetOrDefault(string modelId)
{
var tp = actions.GetOrDefault(modelId);
if (tp != null) { return (IOverideVisualDevService)App.GetService(tp); }
return null;
}
public static IOverideVisualDevService? GetOrDefault(string modelId)
{
var tp = actions.GetOrDefault(modelId);
if (tp != null) { return (IOverideVisualDevService)App.GetService(tp); }
return null;
}
public static void Add(string modelId, Type overideVisualDev)
{
if (!actions.ContainsKey(modelId))
{
actions.TryAdd(modelId, overideVisualDev);
}
public static void Add(string modelId, Type overideVisualDev)
{
if (!actions.ContainsKey(modelId))
{
actions.TryAdd(modelId, overideVisualDev);
}
}
}
}
}

View File

@@ -4,28 +4,28 @@ using Microsoft.Extensions.DependencyInjection;
namespace JNPF.VisualDev
{
[SuppressSniffer]
public static class OverideVisualDevServiceCollectionExtensions
{
/// <summary>
/// 添加重写在线开发接口的服务
/// </summary>
/// <param name="services"></param>
/// <returns></returns>
public static IServiceCollection AddOverideVisualDev(this IServiceCollection services)
[SuppressSniffer]
public static class OverideVisualDevServiceCollectionExtensions
{
var actions = App.EffectiveTypes.Where(u => u.IsClass && !u.IsInterface && !u.IsAbstract && typeof(IOverideVisualDevService).IsAssignableFrom(u)).ToList();
foreach (var item in actions)
{
var attr = item.GetAttribute<OverideVisualDevAttribute>();
if (attr != null)
/// <summary>
/// 添加重写在线开发接口的服务
/// </summary>
/// <param name="services"></param>
/// <returns></returns>
public static IServiceCollection AddOverideVisualDev(this IServiceCollection services)
{
OverideVisualDevManager.Add(attr.ModelId, item);
var actions = App.EffectiveTypes.Where(u => u.IsClass && !u.IsInterface && !u.IsAbstract && typeof(IOverideVisualDevService).IsAssignableFrom(u)).ToList();
foreach (var item in actions)
{
var attr = item.GetAttribute<OverideVisualDevAttribute>();
if (attr != null)
{
OverideVisualDevManager.Add(attr.ModelId, item);
}
}
return services;
}
}
return services;
}
}
}

View File

@@ -1,5 +1,4 @@
using Aop.Api.Domain;
using JNPF.Common.Const;
using JNPF.Common.Const;
using JNPF.Common.Extension;
using JNPF.Common.Models;
using JNPF.Common.Models.Authorize;

View File

@@ -1,6 +1,4 @@
using Microsoft.AspNetCore.Components.Forms;
namespace JNPF.VisualDev.Engine.Security;
namespace JNPF.VisualDev.Engine.Security;
/// <summary>
/// 代码生成列表按钮帮助类.

View File

@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

View File

@@ -0,0 +1,22 @@
using JNPF.DependencyInjection;
namespace JNPF.VisualDev.Entitys.Dto.Dashboard;
[SuppressSniffer]
public class EmailHomeOutput
{
/// <summary>
/// ID.
/// </summary>
public string? id { get; set; }
/// <summary>
/// 标题.
/// </summary>
public string? fullName { get; set; }
/// <summary>
/// 创建时间.
/// </summary>
public DateTime? creatorTime { get; set; }
}

View File

@@ -1,6 +1,4 @@
using System;
namespace JNPF.VisualData.Entitys.Dto.Screen;
namespace JNPF.VisualData.Entitys.Dto.Screen;
/// <summary>
/// 大屏信息输出.

View File

@@ -26,7 +26,7 @@ public class VisualDevModelListQueryInput : PageInputBase
/// 高级查询.
/// </summary>
public virtual string superQueryJson { get; set; }
// TODO 不能放在这里
// TODO 不能放在这里
/// <summary>
/// 工位编码
/// </summary>

View File

@@ -0,0 +1,93 @@
using JNPF.Common.Contracts;
using SqlSugar;
namespace JNPF.VisualDev.Entitys;
/// <summary>
/// 邮件接收
/// 版 本V3.2
/// 版 权引迈信息技术有限公司https://www.jnpfsoft.com
/// 作 者JNPF开发平台组
/// 日 期2021-06-01.
/// </summary>
[SugarTable("EXT_EMAILRECEIVE")]
public class EmailReceiveEntity : CLDEntityBase
{
/// <summary>
/// 类型【1-外部、0-内部】.
/// </summary>
[SugarColumn(ColumnName = "F_TYPE")]
public int? Type { get; set; }
/// <summary>
/// 邮箱账户.
/// </summary>
[SugarColumn(ColumnName = "F_MACCOUNT")]
public string? MAccount { get; set; }
/// <summary>
/// MID.
/// </summary>
[SugarColumn(ColumnName = "F_MID")]
public string? MID { get; set; }
/// <summary>
/// 发件人.
/// </summary>
[SugarColumn(ColumnName = "F_SENDER")]
public string? Sender { get; set; }
/// <summary>
/// 发件人名称.
/// </summary>
[SugarColumn(ColumnName = "F_SENDERNAME")]
public string? SenderName { get; set; }
/// <summary>
/// 主题.
/// </summary>
[SugarColumn(ColumnName = "F_SUBJECT")]
public string? Subject { get; set; }
/// <summary>
/// 正文.
/// </summary>
[SugarColumn(ColumnName = "F_BODYTEXT")]
public string? BodyText { get; set; }
/// <summary>
/// 附件.
/// </summary>
[SugarColumn(ColumnName = "F_ATTACHMENT")]
public string? Attachment { get; set; }
/// <summary>
/// 阅读.
/// </summary>
[SugarColumn(ColumnName = "F_READ")]
public int? Read { get; set; }
/// <summary>
/// Date.
/// </summary>
[SugarColumn(ColumnName = "F_DATE")]
public DateTime? Date { get; set; }
/// <summary>
/// 星标.
/// </summary>
[SugarColumn(ColumnName = "F_STARRED")]
public int? Starred { get; set; }
/// <summary>
/// 描述.
/// </summary>
[SugarColumn(ColumnName = "F_DESCRIPTION")]
public string? Description { get; set; }
/// <summary>
/// 排序码.
/// </summary>
[SugarColumn(ColumnName = "F_SORTCODE")]
public long? SortCode { get; set; }
}

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Const;
using SqlSugar;
using SqlSugar;
namespace JNPF.VisualData.Entity;

View File

@@ -1,6 +1,5 @@
using JNPF.Common.Const;
using SqlSugar;
using System;
using Yitter.IdGenerator;
namespace JNPF.VisualData.Entity;
@@ -92,7 +91,7 @@ public class VisualEntity
var userId = App.User.FindFirst(ClaimConst.CLAINMUSERID)?.Value;
this.CreateTime = DateTime.Now;
this.Id = YitIdHelper.NextId().ToString();
this.BackgroundUrl = (this.BackgroundUrl == null || this.BackgroundUrl == string.Empty)? "/api/file/VisusalImg/bg/bg1.png" : this.BackgroundUrl;
this.BackgroundUrl = (this.BackgroundUrl == null || this.BackgroundUrl == string.Empty) ? "/api/file/VisusalImg/bg/bg1.png" : this.BackgroundUrl;
this.IsDeleted = 0;
this.Status = 1;
if (!string.IsNullOrEmpty(userId))

View File

@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

View File

@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

View File

@@ -1,20 +1,20 @@
using JNPF.Common.Const;
using JNPF.Common.Core.Manager;
using JNPF.Common.Extension;
using JNPF.Common.Manager;
using JNPF.Common.Security;
using JNPF.DependencyInjection;
using JNPF.RemoteRequest.Extensions;
using JNPF.Systems.Entitys.Model.DataInterFace;
using JNPF.Systems.Entitys.Permission;
using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.System;
using JNPF.VisualDev.Engine;
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
using JNPF.VisualDev.Entitys;
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
using JNPF.VisualDev.Interfaces;
using Newtonsoft.Json.Linq;
using SqlSugar;
using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.System;
using JNPF.RemoteRequest.Extensions;
using JNPF.Systems.Entitys.Model.DataInterFace;
using JNPF.Common.Core.Manager;
namespace JNPF.Common.CodeGen.DataParsing;

View File

@@ -1,4 +1,6 @@
using JNPF.Common.Configuration;
using System.IO.Compression;
using System.Text;
using JNPF.Common.Configuration;
using JNPF.Common.Const;
using JNPF.Common.Core.Manager;
using JNPF.Common.Enums;
@@ -21,10 +23,7 @@ using JNPF.VisualDev.Entitys;
using JNPF.VisualDev.Entitys.Dto.CodeGen;
using JNPF.VisualDev.Entitys.Enum;
using Microsoft.AspNetCore.Mvc;
using NPOI.Util;
using SqlSugar;
using System.IO.Compression;
using System.Text;
namespace JNPF.CodeGen;
@@ -393,7 +392,8 @@ public class CodeGenService : IDynamicApiController, ITransient
for (int i = 0; i < templatePathList.Count; i++)
{
var tContent = File.ReadAllText(templatePathList[i]);
var tResult = _viewEngine.RunCompileFromCached(tContent, new {
var tResult = _viewEngine.RunCompileFromCached(tContent, new
{
BusName = codeGenConfigModel.BusName,
ClassName = codeGenConfigModel.ClassName,
NameSpace = formDataModel.areasName,
@@ -528,7 +528,8 @@ public class CodeGenService : IDynamicApiController, ITransient
for (int i = 0; i < templatePathList.Count; i++)
{
string tContent = File.ReadAllText(templatePathList[i]);
string tResult = _viewEngine.RunCompileFromCached(tContent, new {
string tResult = _viewEngine.RunCompileFromCached(tContent, new
{
NameSpace = codeGenConfigModel.NameSpace,
BusName = codeGenConfigModel.BusName,
ClassName = codeGenConfigModel.ClassName,
@@ -648,7 +649,8 @@ public class CodeGenService : IDynamicApiController, ITransient
for (int i = 0; i < templatePathList.Count; i++)
{
var tContent = File.ReadAllText(templatePathList[i]);
var tResult = _viewEngine.RunCompileFromCached(tContent, new {
var tResult = _viewEngine.RunCompileFromCached(tContent, new
{
BusName = codeGenConfigModel.BusName,
ClassName = codeGenConfigModel.ClassName,
NameSpace = formDataModel.areasName,
@@ -773,7 +775,8 @@ public class CodeGenService : IDynamicApiController, ITransient
for (var i = 0; i < templatePathList.Count; i++)
{
var tContent = File.ReadAllText(templatePathList[i]);
var tResult = _viewEngine.RunCompileFromCached(tContent, new {
var tResult = _viewEngine.RunCompileFromCached(tContent, new
{
NameSpace = codeGenConfigModel.NameSpace,
BusName = codeGenConfigModel.BusName,
ClassName = codeGenConfigModel.ClassName,
@@ -904,7 +907,8 @@ public class CodeGenService : IDynamicApiController, ITransient
for (int i = 0; i < templatePathList.Count; i++)
{
var tContent = File.ReadAllText(templatePathList[i]);
var tResult = _viewEngine.RunCompileFromCached(tContent, new {
var tResult = _viewEngine.RunCompileFromCached(tContent, new
{
BusName = codeGenConfigModel.BusName,
ClassName = codeGenConfigModel.ClassName,
NameSpace = formDataModel.areasName,
@@ -984,7 +988,8 @@ public class CodeGenService : IDynamicApiController, ITransient
for (int i = 0; i < templatePathList.Count; i++)
{
var tContent = File.ReadAllText(templatePathList[i]);
var tResult = _viewEngine.RunCompileFromCached(tContent, new {
var tResult = _viewEngine.RunCompileFromCached(tContent, new
{
BusName = codeGenConfigModel.BusName,
ClassName = codeGenConfigModel.ClassName,
NameSpace = formDataModel.areasName,
@@ -1117,7 +1122,8 @@ public class CodeGenService : IDynamicApiController, ITransient
for (int i = 0; i < templatePathList.Count; i++)
{
string tContent = File.ReadAllText(templatePathList[i]);
string tResult = _viewEngine.RunCompileFromCached(tContent, new {
string tResult = _viewEngine.RunCompileFromCached(tContent, new
{
NameSpace = codeGenConfigModel.NameSpace,
BusName = codeGenConfigModel.BusName,
ClassName = codeGenConfigModel.ClassName,
@@ -1272,7 +1278,8 @@ public class CodeGenService : IDynamicApiController, ITransient
for (var i = 0; i < templatePathList.Count; i++)
{
var tContent = File.ReadAllText(templatePathList[i]);
var tResult = _viewEngine.RunCompileFromCached(tContent, new {
var tResult = _viewEngine.RunCompileFromCached(tContent, new
{
NameSpace = codeGenConfigModel.NameSpace,
BusName = codeGenConfigModel.BusName,
ClassName = codeGenConfigModel.ClassName,
@@ -1558,7 +1565,8 @@ public class CodeGenService : IDynamicApiController, ITransient
for (int i = 0; i < templatePathList.Count; i++)
{
string tContent = File.ReadAllText(templatePathList[i]);
var tResult = _viewEngine.RunCompileFromCached(tContent, new {
var tResult = _viewEngine.RunCompileFromCached(tContent, new
{
NameSpace = frondEndGenConfig.NameSpace,
ClassName = frondEndGenConfig.ClassName,
FormRef = frondEndGenConfig.FormRef,

View File

@@ -1,10 +1,9 @@
using JNPF.Common.Core.Manager;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.Extend.Entitys;
using JNPF.Extend.Entitys.Dto.Email;
using JNPF.Message.Entitys;
using JNPF.Message.Interfaces.Message;
using JNPF.VisualDev.Entitys;
using JNPF.VisualDev.Entitys.Dto.Dashboard;
using JNPF.WorkFlow.Entitys.Entity;
using JNPF.WorkFlow.Interfaces.Repository;

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aspose.Cells;
using JNPF.DependencyInjection;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using Microsoft.AspNetCore.Mvc;

View File

@@ -3,14 +3,12 @@ using JNPF.Common.Core.Manager.Files;
using JNPF.Common.Enums;
using JNPF.Common.Extension;
using JNPF.Common.Filter;
using JNPF.Common.Models.User;
using JNPF.Common.Security;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.FriendlyException;
using JNPF.Systems.Entitys.Permission;
using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.Common;
using JNPF.VisualDev.Entitys;
using JNPF.VisualDev.Entitys.Dto.Portal;
using JNPF.VisualDev.Entitys.Dto.VisualDev;
@@ -169,7 +167,7 @@ public class PortalService : IDynamicApiController, ITransient
{
if (_userManager.Roles != null && !_userManager.IsAdministrator)
{
List<string>? roleId = await _portalRepository.AsSugarClient().Queryable<RoleEntity>().Where(r =>_userManager.Roles.Contains(r.Id)).Where(r => r.EnabledMark == 1 && r.DeleteMark == null).Select(r => r.Id).ToListAsync();
List<string>? roleId = await _portalRepository.AsSugarClient().Queryable<RoleEntity>().Where(r => _userManager.Roles.Contains(r.Id)).Where(r => r.EnabledMark == 1 && r.DeleteMark == null).Select(r => r.Id).ToListAsync();
var items = await _portalRepository.AsSugarClient().Queryable<AuthorizeEntity>().Where(a => roleId.Contains(a.ObjectId)).Where(a => a.ItemType == "portal").GroupBy(it => new { it.ItemId }).Select(it => new { it.ItemId }).ToListAsync();
if (items.Count == 0) return null;
PortalEntity? entity = await _portalRepository.AsQueryable().Where(p => items.Select(it => it.ItemId).Contains(p.Id)).SingleAsync(p => p.Id == id && p.EnabledMark == 1 && p.DeleteMark == null);

View File

@@ -1,5 +1,4 @@
using System.Data;
using System.Text;
using System.Text.RegularExpressions;
using JNPF.Common.Const;
using JNPF.Common.Core.Manager;
@@ -14,7 +13,6 @@ using JNPF.DependencyInjection;
using JNPF.FriendlyException;
using JNPF.JsonSerialization;
using JNPF.RemoteRequest.Extensions;
using JNPF.Systems.Entitys.Dto.Authorize;
using JNPF.Systems.Entitys.Model.DataBase;
using JNPF.Systems.Entitys.Permission;
using JNPF.Systems.Entitys.System;
@@ -824,7 +822,7 @@ public class RunService : IRunService, ITransient
if (child.Key.Equals("id") && child.Value.IsNotEmptyOrNull())
{
//modify by ly on 20230720 判断如果子表主键为空的把原主键值赋值给子表主键,直接复制会导致主键重复
if(tableField[childPrimary.field].IsNull() || tableField[childPrimary.field].ToString().IsNullOrEmpty())
if (tableField[childPrimary.field].IsNull() || tableField[childPrimary.field].ToString().IsNullOrEmpty())
{
tableField[childPrimary.field] = child.Value;
}

View File

@@ -12,7 +12,6 @@
<ItemGroup>
<ProjectReference Include="..\..\common\Tnb.Common.Core\Tnb.Common.Core.csproj" />
<ProjectReference Include="..\..\extend\Tnb.Extend.Interfaces\Tnb.Extend.Interfaces.csproj" />
<ProjectReference Include="..\..\message\Tnb.Message.Interfaces\Tnb.Message.Interfaces.csproj" />
<ProjectReference Include="..\..\ProductionMgr\Tnb.ProductionMgr.Interfaces\Tnb.ProductionMgr.Interfaces.csproj" />
<ProjectReference Include="..\Tnb.VisualDev.Engine\Tnb.VisualDev.Engine.csproj" />

View File

@@ -723,9 +723,9 @@ public class VisualDevService : IVisualDevService, IDynamicApiController, ITrans
moduleModel.ModuleId = input.id;
moduleModel.ParentId = oldWebModule != null ? oldWebModule.ParentId : (input.pcModuleParentId.Equals(input.pcSystemId) ? "-1" : input.pcModuleParentId); // 父级菜单节点
moduleModel.Category = "Web";
moduleModel.FullName = oldWebModule!=null ? oldWebModule.FullName : entity.FullName; //modifyby zhoukeda 发布功能不更新名称排序图标
moduleModel.FullName = oldWebModule != null ? oldWebModule.FullName : entity.FullName; //modifyby zhoukeda 发布功能不更新名称排序图标
moduleModel.EnCode = entity.EnCode;
moduleModel.Icon = oldWebModule!=null ? oldWebModule.Icon : "icon-ym icon-ym-webForm"; //modifyby zhoukeda 发布功能不更新名称排序图标
moduleModel.Icon = oldWebModule != null ? oldWebModule.Icon : "icon-ym icon-ym-webForm"; //modifyby zhoukeda 发布功能不更新名称排序图标
moduleModel.UrlAddress = oldWebModule != null ? oldWebModule.UrlAddress : "model/" + entity.EnCode;
moduleModel.Type = 3;
moduleModel.EnabledMark = 1;
@@ -789,7 +789,8 @@ public class VisualDevService : IVisualDevService, IDynamicApiController, ITrans
SortCode = 0
});
});
ctList.ForEach(item => {
ctList.ForEach(item =>
{
formAuth.Add(new ModuleFormEntity()
{
@@ -993,7 +994,8 @@ public class VisualDevService : IVisualDevService, IDynamicApiController, ITrans
SortCode = 0
});
});
ctList.ForEach(item => {
ctList.ForEach(item =>
{
formAuth.Add(new ModuleFormEntity()
{