You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

235 lines
9.8 KiB

using System.Collections.Generic;
namespace ChangkeTec.SDMS.Model
{
public class EntityClassInfo
{
public List<NameStruct> TaList { get; set; }
public List<NameStruct> TsList { get; set; }
public List<NameStruct> TtList { get; set; }
public List<NameStruct> TeaList { get; set; }
public List<NameStruct> TedList { get; set; }
public List<NameStruct> TesList { get; set; }
public List<NameStruct> OnlyTsList { get; set; }
private Dictionary<string, string> _nameDict { get; set; }
public EntityClassInfo()
{
InitName();
InitTaList();
InitTsList();
InitTtList();
InitTeaList();
InitTedList();
InitTesList();
InitOnlyTsList();
}
private void InitName()
{
_nameDict = new Dictionary<string, string>();
_nameDict.Add("Account", "ACCOUNT");
_nameDict.Add("Bom", "BOM");
_nameDict.Add("Code", "CODE");
_nameDict.Add("CodeType", "CODE_TYPE");
_nameDict.Add("Color", "COLOR");
_nameDict.Add("CostCenter", "COST_CENTER");
_nameDict.Add("Customer", "CUSTOMER");
_nameDict.Add("CustomerPart", "CUSTOMER_PART");
_nameDict.Add("CustomerType", "CUSTOMER_TYPE");
_nameDict.Add("DepartMent", "DEPARTMENT");
_nameDict.Add("Domain", "DOMAIN");
_nameDict.Add("EdiData", "EDI_DATA");
_nameDict.Add("Entity", "ENTITY");
_nameDict.Add("Line", "LINE");
_nameDict.Add("LinePart", "LINE_PART");
_nameDict.Add("Location", "LOCATION");
_nameDict.Add("MesData", "MES_DATA");
_nameDict.Add("Pack", "PACK");
_nameDict.Add("PartDet", "PART_DET");
_nameDict.Add("PartMstr", "PART_MSTR");
_nameDict.Add("ProductLine", "PRODUCT_LINE");
_nameDict.Add("Project", "PROJECT");
_nameDict.Add("PurchasePrice", "PURCHASE_PRICE");
_nameDict.Add("Routing", "ROUTING");
_nameDict.Add("SalePrice", "SALE_PRICE");
_nameDict.Add("Shift", "SHIFT");
_nameDict.Add("Site", "SITE");
_nameDict.Add("StandCostPrice", "STAND_COST_PRICE");
_nameDict.Add("SubAccount", "SUB_ACCOUNT");
_nameDict.Add("Supplier", "SUPPLIER");
_nameDict.Add("SupplierPart", "SUPPLIER_PART");
_nameDict.Add("SupplierType", "SUPPLIER_TYPE");
_nameDict.Add("Team", "TEAM");
_nameDict.Add("WmsLocation", "WMS_LOCATION");
_nameDict.Add("WorkCenter", "WORK_CENTER");
}
private void InitTedList()
{
TedList = new List<NameStruct>()
{
new NameStruct() {ClassName = "Ted_AsnDet", ModelName = "TED_ASN_DET"},
new NameStruct() {ClassName = "Ted_AsnMstr", ModelName = "TED_ASN_MSTR"},
new NameStruct() {ClassName = "Ted_Assemble", ModelName = "TED_ASSEMBLE"},
new NameStruct() {ClassName = "Ted_BkDet", ModelName = "TED_BK_DET"},
new NameStruct() {ClassName = "Ted_BkMstr", ModelName = "TED_BK_MSTR"},
new NameStruct() {ClassName = "Ted_FixedDet", ModelName = "TED_FIXED_DET"},
new NameStruct() {ClassName = "Ted_FixedMstr", ModelName = "TED_FIXED_MSTR"},
new NameStruct() {ClassName = "Ted_Injection", ModelName = "TED_INJECTION"},
new NameStruct() {ClassName = "Ted_InvoiceDet", ModelName = "TED_INVOICE_DET"},
new NameStruct() {ClassName = "Ted_InvoiceMstr", ModelName = "TED_INVOICE_MSTR"},
new NameStruct() {ClassName = "Ted_IsSunpDet", ModelName = "TED_ISSUNP_DET"},
new NameStruct() {ClassName = "Ted_IsSunpMstr", ModelName = "TED_ISSUNP_MSTR"},
new NameStruct() {ClassName = "Ted_KanbanDet", ModelName = "TED_KANBAN_DET"},
new NameStruct() {ClassName = "Ted_KanbanMstr", ModelName = "TED_KANBAN_MSTR"},
new NameStruct() {ClassName = "Ted_Led", ModelName = "TED_LED"},
new NameStruct() {ClassName = "Ted_PoDet", ModelName = "TED_PO_DET"},
new NameStruct() {ClassName = "Ted_PoMstr", ModelName = "TED_PO_MSTR"},
new NameStruct() {ClassName = "Ted_RctunpDet", ModelName = "TED_RCTUNP_DET"},
new NameStruct() {ClassName = "Ted_RctunpMstr", ModelName = "TED_RCTUNP_MSTR"},
new NameStruct() {ClassName = "Ted_ReceiptDet", ModelName = "TED_RECEIPT_DET"},
new NameStruct() {ClassName = "Ted_ReceiptMstr", ModelName = "TED_RECEIPT_MSTR"},
new NameStruct() {ClassName = "Ted_ReturnDet", ModelName = "TED_RETURN_DET"},
new NameStruct() {ClassName = "Ted_ReturnMstr", ModelName = "TED_RETURN_MSTR"},
new NameStruct() {ClassName = "Ted_SoDet", ModelName = "TED_SO_DET"},
new NameStruct() {ClassName = "Ted_SoMstr", ModelName = "TED_SO_MSTR"},
new NameStruct() {ClassName = "Ted_Spraying", ModelName = "TED_SPRAYING"},
new NameStruct() {ClassName = "Ted_SprayingRepair", ModelName = "TED_SPRAYING_REPAIR"},
new NameStruct() {ClassName = "Ted_Stock", ModelName = "TED_STOCK"},
new NameStruct() {ClassName = "Ted_TransferDet", ModelName = "TED_TRANSFER_DET"},
new NameStruct() {ClassName = "Ted_TransferMstr", ModelName = "TED_TRANSFER_MSTR"},
};
}
private void InitTeaList()
{
TeaList = new List<NameStruct>()
{
new NameStruct() {ClassName = "Tea_Subscribe", ModelName = "TEA_SUBSCRIBE"},
new NameStruct() {ClassName = "Tea_System", ModelName = "TEA_SYSTEM"},
new NameStruct() {ClassName = "Tea_Table", ModelName = "TEA_TABLE"},
new NameStruct() {ClassName = "Tea_Task", ModelName = "TEA_TASK"},
new NameStruct() {ClassName = "Tea_TaskSub", ModelName = "TEA_TASK_SUB"},
new NameStruct() {ClassName = "Tea_TaskSubHis", ModelName = "TEA_TASK_SUB_HIS"},
new NameStruct() {ClassName = "Tea_DataError", ModelName = "TEA_DATA_ERROR_LOG"},
new NameStruct() {ClassName = "Tea_TaskSubRead", ModelName = "TEA_TASK_SUB_READ_LOG"},
};
}
private void InitTaList()
{
TaList = new List<NameStruct>()
{
new NameStruct() {ClassName = "Ta_Button", ModelName = "TA_BUTTON"},
new NameStruct() {ClassName = "Ta_Config", ModelName = "TA_CONFIG"},
new NameStruct() {ClassName = "Ta_Dept", ModelName = "TA_DEPT"},
new NameStruct() {ClassName = "Ta_Menu", ModelName = "TA_MENU"},
new NameStruct() {ClassName = "Ta_UserButton", ModelName = "TA_USER_BUTTON"},
new NameStruct() {ClassName = "Ta_User", ModelName = "TA_USER"},
};
}
private void InitTsList()
{
TsList = new List<NameStruct>()
{
new NameStruct() {ClassName = "Ta_Task", ModelName = "TA_TASK"},
new NameStruct() {ClassName = "Ta_TaskHis", ModelName = "TA_TASK_HIS"},
new NameStruct() {ClassName = "Tl_DataChange", ModelName = "TL_DATA_CHANGE"},
new NameStruct() {ClassName = "Tl_Exception", ModelName = "TL_EXCEPTION"},
new NameStruct() {ClassName = "Tl_Login", ModelName = "TL_LOGIN"},
};
foreach (var name in _nameDict)
{
TsList.Add(new NameStruct()
{
ClassName = $"Ts_{name.Key}",
ModelName = $"TS_{name.Value}"
});
}
}
private void InitOnlyTsList()
{
OnlyTsList = new List<NameStruct>();
foreach (var name in _nameDict)
{
OnlyTsList.Add(new NameStruct()
{
ClassName = $"Ts_{name.Key}",
ModelName = $"TS_{name.Value}",
TTModelName=$"TT_{name.Value}",
TTClassName = $"Tt_{name.Key}",
});
}
}
private void InitTtList()
{
TtList = new List<NameStruct>();
foreach (var name in _nameDict)
{
TtList.Add(new NameStruct()
{
ClassName = $"Tt_{name.Key}",
TSClassName = $"Ts_{name.Key}",
ModelName = $"TT_{name.Value}",
TTModelName = $"TT_{name.Value}",
TSModelName = $"TS_{name.Value}",
TESModelName = $"TES_{name.Value}"
});
}
}
private void InitTesList()
{
TesList = new List<NameStruct>();
foreach (var name in _nameDict)
{
TesList.Add(new NameStruct()
{
ClassName = $"Tes_{name.Key}",
ModelName = $"TES_{name.Value}",
TTClassName = $"Tt_{name.Key}",
});
}
}
}
public class NameStruct
{
//文件名称
public string ClassName { get; set; }
//模型名称
public string ModelName { get; set; }
//文件名称
public string TSClassName { get; set; }
//TS模型名称
public string TSModelName { get; set; }
//文件名称
public string TTClassName { get; set; }
//TT模型名称
public string TTModelName { get; set; }
//TES模型名称
public string TESModelName { get; set; }
}
}