From c7e7901305b9c2182a1faf52eb2bdc0481468e10 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期三, 28 八月 2024 21:23:42 +0800 Subject: [PATCH] 优化条码规则,增加固定值可以设置为不包含;增加流水号取号支持设置取号间隔和跳号规则 --- Tiger.Api/Controllers/Base/SystemController.cs | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/Tiger.Api/Controllers/Base/SystemController.cs b/Tiger.Api/Controllers/Base/SystemController.cs index 583d104..5e506d3 100644 --- a/Tiger.Api/Controllers/Base/SystemController.cs +++ b/Tiger.Api/Controllers/Base/SystemController.cs @@ -7,6 +7,10 @@ using Rhea.Common; using Tiger.IBusiness; using System.Threading; +using System.Linq; +using Tiger.Model; +using System.Xml.Linq; +using System.ComponentModel; namespace Tiger.Api.Controllers.Base { @@ -95,6 +99,38 @@ } /// <summary> + /// 鑾峰彇Api浜у搧 + /// </summary> + /// <returns></returns> + [HttpGet] + [Route("System/Entitys/Get")] + public IActionResult GetEntitys(string Namespace, string StartWith) + { + Assembly assembly = Assembly.Load("Tiger.Model"); + Type[] types = assembly.GetTypes(); + var entitys = types.Where(q => q.IsClass && q.GetInterfaces().Contains(typeof(Model.iEntity)) //&& q.Namespace != "Tiger.Model.Minsun" + && (Namespace.IsNullOrEmpty() || q.Namespace == Namespace) + && (StartWith.IsNullOrEmpty() || q.Name.StartsWith(StartWith)) + && !q.GetCustomAttributes(typeof(EntityBase), false).Any()).ToList(); + var data = new + { + Total = entitys.Count, + Data = entitys.Select(q => new + { + q.FullName, + q.Namespace, + q.Name, + DisplayName = (q.GetCustomAttribute(typeof(DisplayNameAttribute)) as DisplayNameAttribute)?.DisplayName, + Properties = q.GetProperties().Select(p => new { + p.Name, + DisplayName = (p.GetCustomAttribute(typeof(DisplayNameAttribute)) as DisplayNameAttribute)?.DisplayName, + Type = p.PropertyType.Name }).ToList() + }) + }; + return Ok(data); + } + + /// <summary> /// GetCertification(ApiAction) /// 鍦ㄦ敞鍐岃〃HKEY_LOCAL_MACHINE\SOFTWARE\TigerClouds鑺傜偣涓鍙栧瘑閽ヨ瘉涔� /// </summary> -- Gitblit v1.9.3