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<string, string> TableModelName = new Dictionary<string, string>();
|
|
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!");
|
}
|
/// <summary>
|
/// 创建数据中间表表
|
/// </summary>
|
/// <returns></returns>
|
public static void CreateMiddleTable()
|
{
|
var order = new SqlHelper<HangChaAGV>().CreateTable();//富勒传输托盘信息表
|
var order1 = new SqlHelper<MarginAGV>().CreateTable();//设备信号时间中间表
|
//var order2 = new SqlHelper<DaMingShanDeviceState>().CreateTable();
|
}
|
}
|
}
|