using HH.WCS.NongFuChaYuan.WmsService; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HH.WCS.NongFuChaYuan.OtherService { [AttributeUsage(AttributeTargets.Class, Inherited = true)] class STAttribute : SugarTable { public static Dictionary TableModelName = new Dictionary(); public STAttribute(string tableName) : base(tableName) { string value = ""; if (TableModelName.TryGetValue(TableName, out value)) { TableName = value; } } public static void InitTableName() { //Console.WriteLine($"StartUp Init TableName..."); var tableName = Settings.GetTableNameList().Where(a => a.TableProType == Settings.TableProType).ToList(); if (tableName.Count > 0) { tableName.ForEach(a => { if (!TableModelName.Keys.Contains(a.TableName)) TableModelName.Add(a.TableName, a.TableSqlName); }); } //Console.WriteLine($"StartUp Init TableName Complete!"); } /// /// 创建数据中间表表 /// /// public static void CreateMiddleTable() { var order = new SqlHelper().CreateTable();//富勒传输托盘信息表 var order1 = new SqlHelper().CreateTable();//设备信号时间中间表 //var order2 = new SqlHelper().CreateTable(); } } }