diff --git a/Controller/CK.SCP.Controller.csproj b/Controller/CK.SCP.Controller.csproj
index 3f5f19c..64d5a9a 100644
--- a/Controller/CK.SCP.Controller.csproj
+++ b/Controller/CK.SCP.Controller.csproj
@@ -45,6 +45,7 @@
+
@@ -56,6 +57,7 @@
+
diff --git a/Controller/SCP_DC_UNI_CONTROLLER.cs b/Controller/SCP_DC_UNI_CONTROLLER.cs
new file mode 100644
index 0000000..1fe4852
--- /dev/null
+++ b/Controller/SCP_DC_UNI_CONTROLLER.cs
@@ -0,0 +1,2581 @@
+using CK.SCP.Models;
+using CK.SCP.Models.Enums;
+using CK.SCP.Models.ExchangeCenterTables;
+using CK.SCP.Models.AppBoxEntity;
+using CK.SCP.Models.ScpEntity;
+using CK.SCP.Models.ScpEntity.ExcelExportEnttity;
+using CK.SCP.Utils;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data.Entity.Migrations;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Transactions;
+using System.Data.Entity.Core;
+//using WebSrvAPITest;
+
+namespace CK.SCP.Controller
+{
+ public class SCP_DC_UNI_CONTROLLER
+ {
+ public SCP_DC_UNI_CONTROLLER()
+ {
+
+ }
+ public static ResultObject> Get_TEA_SUBSCRIBE_List(TEA_SUBSCRIBE p_entity)
+ {
+ ResultObject> _ret = new ResultObject>();
+ try
+ {
+ using (var db = EntitiesFactory.CreateExchangeCenterInstance())
+ {
+ IQueryable q = db.TEA_SUBSCRIBE;
+ if (!string.IsNullOrEmpty(p_entity.TableName))
+ {
+ q = q.Where(p => p.TableName.Contains(p_entity.TableName));
+ }
+ if (!string.IsNullOrEmpty(p_entity.Creator))
+ {
+ q = q.Where(p => p.Creator.Contains(p_entity.Creator));
+ }
+ if (!string.IsNullOrEmpty(p_entity.Subscriber))
+ {
+ q = q.Where(p => p.Subscriber.Contains(p_entity.Subscriber));
+ }
+ if (p_entity.UID != 0)
+ {
+ q = q.Where(p => p.UID == p_entity.UID);
+ }
+ if (!string.IsNullOrEmpty(p_entity.CreateUser))
+ {
+ q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser));
+ }
+ if (!string.IsNullOrEmpty(p_entity.Remark))
+ {
+ q = q.Where(p => p.Remark.Contains(p_entity.Remark));
+ }
+ if (!string.IsNullOrEmpty(p_entity.UpdateUser))
+ {
+ q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser));
+ }
+ if (p_entity.IsChecked != false)
+ {
+ q = q.Where(p => p.IsChecked == p_entity.IsChecked);
+ }
+ if (p_entity.Enable != false)
+ {
+ q = q.Where(p => p.Enable == p_entity.Enable);
+ }
+ _ret.State = ReturnStatus.Succeed;
+ _ret.Result = q.ToList();
+ }
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ _ret.ErrorList.Add(e);
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "Get_TEA_SUBSCRIBE_List", e.Message);
+ throw e;
+ }
+ return _ret;
+ }
+
+
+
+ public ResultObject Save_TEA_SUBSCRIBE(List p_entitys)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ using (var db = EntitiesFactory.CreateExchangeCenterInstance())
+ {
+ foreach (var itm in p_entitys)
+ {
+ db.TEA_SUBSCRIBE.AddOrUpdate(itm);
+ }
+ if (db.SaveChanges() != -1)
+ {
+ _ret.State = ReturnStatus.Succeed;
+ _ret.Result = true;
+ }
+ else
+ {
+ _ret.State = ReturnStatus.Failed;
+ _ret.Result = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "Save_TEA_SUBSCRIBE", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ throw e;
+ }
+ return _ret;
+ }
+
+
+
+ public ResultObject Del_TEA_SUBSCRIBE(List p_entitys)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ using (var db = EntitiesFactory.CreateExchangeCenterInstance())
+ {
+ foreach (var itm in p_entitys)
+ {
+ db.TEA_SUBSCRIBE.Remove(itm);
+ }
+ if (db.SaveChanges() != -1)
+ {
+ _ret.State = ReturnStatus.Succeed;
+ _ret.Result = true;
+ }
+ else
+ {
+ _ret.State = ReturnStatus.Failed;
+ _ret.Result = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "Del_TEA_SUBSCRIBE", e.Message); throw e;
+ }
+ return _ret;
+ }
+
+
+
+ public static ResultObject> Get_TEA_TASK_SUB_List(TEA_TASK_SUB p_entity)
+ {
+ ResultObject> _ret = new ResultObject>();
+ try
+ {
+ using (var db = EntitiesFactory.CreateExchangeCenterInstance())
+ {
+ IQueryable q = db.TEA_TASK_SUB;
+ if (!string.IsNullOrEmpty(p_entity.TableName))
+ {
+ q = q.Where(p => p.TableName.Contains(p_entity.TableName));
+ }
+ if (!string.IsNullOrEmpty(p_entity.Creator))
+ {
+ q = q.Where(p => p.Creator.Contains(p_entity.Creator));
+ }
+ if (p_entity.DataCount != 0)
+ {
+ q = q.Where(p => p.DataCount == p_entity.DataCount);
+ }
+ if (!string.IsNullOrEmpty(p_entity.Subscriber))
+ {
+ q = q.Where(p => p.Subscriber.Contains(p_entity.Subscriber));
+ }
+ if (p_entity.FailedCount != 0)
+ {
+ q = q.Where(p => p.FailedCount == p_entity.FailedCount);
+ }
+ if (!string.IsNullOrEmpty(p_entity.FailedInfo))
+ {
+ q = q.Where(p => p.FailedInfo.Contains(p_entity.FailedInfo));
+ }
+ if (!string.IsNullOrEmpty(p_entity.Domain))
+ {
+ q = q.Where(p => p.Domain.Contains(p_entity.Domain));
+ }
+ if (!string.IsNullOrEmpty(p_entity.Site))
+ {
+ q = q.Where(p => p.Site.Contains(p_entity.Site));
+ }
+ if (p_entity.UID != 0)
+ {
+ q = q.Where(p => p.UID == p_entity.UID);
+ }
+ if (!string.IsNullOrEmpty(p_entity.CreateUser))
+ {
+ q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser));
+ }
+ if (!string.IsNullOrEmpty(p_entity.Remark))
+ {
+ q = q.Where(p => p.Remark.Contains(p_entity.Remark));
+ }
+ if (!string.IsNullOrEmpty(p_entity.UpdateUser))
+ {
+ q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser));
+ }
+ if (p_entity.IsChecked != false)
+ {
+ q = q.Where(p => p.IsChecked == p_entity.IsChecked);
+ }
+ //if (!string.IsNullOrEmpty(p_entity.TaskState))
+ //{
+ // q = q.Where(p => p.UpdateUser.Contains(p_entity.UpdateUser));
+ //}
+ q = q.Where(p => p.TaskState==p_entity.TaskState);
+
+ _ret.State = ReturnStatus.Succeed;
+ _ret.Result = q.OrderBy(p => p.CreateTime).ToList();
+ }
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ _ret.ErrorList.Add(e);
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "Get_TEA_TASK_SUB_List", e.Message);
+ throw e;
+ }
+ return _ret;
+ }
+
+ public static ResultObject Update_TEA_TASK_SUB(ExchangeCenterContext db, TEA_TASK_SUB p_task)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ var _task = db.TEA_TASK_SUB.Where(p => p.TaskID == p_task.TaskID && p.TableName == p.TableName && p.Subscriber == "SCP").FirstOrDefault();
+ if (_task != null)
+ {
+ _task.TaskState = EnumTaskState.Success;
+ _task.DataCount = p_task.DataCount;
+ }
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "Update_TEA_TASK_SUB", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ throw e;
+ }
+ return _ret;
+ }
+
+ public static ResultObject CREATE_TEA_TASK_SUB(ExchangeCenterContext db, bool p_ismasterslave ,TEA_TASK_SUB p_task)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ var _list = db.TEA_SUBSCRIBE.Where(p => p.Creator == "SCP" && p.TableName == p_task.TableName).ToList();
+ foreach (var itm in _list)
+ {
+ var _task = new TEA_TASK_SUB();
+ _task.GUID = Guid.NewGuid();
+ _task.TaskID = p_task.TaskID;
+ _task.TaskState = EnumTaskState.Unread;
+ _task.TableName = p_task.TableName;
+ _task.Domain = p_task.Domain;
+ _task.Site = p_task.Site;
+ _task.DataCount = p_task.DataCount;
+ _task.Creator = itm.Creator;
+ _task.CreateTime = DateTime.Now;
+ _task.CreateUser = itm.CreateUser;
+ _task.UpdateTime = DateTime.Now;
+ _task.UpdateUser = itm.CreateUser;
+ _task.Subscriber = itm.Subscriber;
+ db.TEA_TASK_SUB.Add(_task);
+ }
+ var _task1 = new TEA_TASK();
+ _task1.GUID = p_task.GUID;
+ _task1.DataCount = _list.Count;
+ _task1.TaskID = p_task.TaskID;
+ _task1.TableName = p_task.TableName;
+ _task1.Domain = p_task.Domain;
+ _task1.Site = p_task.Site;
+ _task1.IsMasterSlave = p_ismasterslave;
+ _task1.Creator = "SCP";
+ _task1.CreateTime = DateTime.Now;
+ _task1.CreateUser = "SCP";
+ _task1.UpdateTime = DateTime.Now;
+ _task1.UpdateUser = "SCP";
+ db.TEA_TASK.Add(_task1);
+ _ret.State = ReturnStatus.Succeed;
+ }
+ catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常
+ {
+ var sb = new StringBuilder();
+ foreach (var error in dbEx.EntityValidationErrors.ToList())
+ {
+ error.ValidationErrors.ToList().ForEach(i =>
+ {
+ sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage);
+ });
+ }
+ _ret.State = ReturnStatus.Failed;
+ _ret.ErrorList.Add(dbEx);
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", sb.ToString());
+ throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString());
+ }
+ catch (OptimisticConcurrencyException ex)//并发冲突异常
+ {
+ _ret.State = ReturnStatus.Failed;
+ _ret.ErrorList.Add(ex);
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", ex.ToString());
+ throw new ScpException(ResultCode.Exception, "9999", ex.ToString());
+ }
+ catch (ScpException ex)
+ {
+ _ret.State = ReturnStatus.Failed;
+ _ret.ErrorList.Add(ex);
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Get_V_TB_ASK_List", ex.ToString());
+ if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException))
+ {
+ var inner = (UpdateException)ex.InnerException;
+ throw new ScpException(ResultCode.Exception, "0000", ex.ToString());
+ }
+ else
+ {
+ if (ex.InnerException != null) throw ex.InnerException;
+ }
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "CREATE_TEA_TASK_SUB", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ throw e;
+ }
+ return _ret;
+ }
+ public ResultObject Del_TEA_TASK_SUB(List p_entitys)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ using (var db = EntitiesFactory.CreateExchangeCenterInstance())
+ {
+ foreach (var itm in p_entitys)
+ {
+ db.TEA_TASK_SUB.Remove(itm);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_DC_UNI_CONTROLLER), "Del_TEA_TASK_SUB", e.Message); throw e;
+ }
+ return _ret;
+ }
+
+
+ public static void ReadService(Action> p_action)
+ {
+ ResultObject result = new ResultObject();
+ // ResultObject> result = new ResultObject>();
+ var _result = Get_TEA_TASK_SUB_List(new TEA_TASK_SUB() { TaskState = EnumTaskState.Unread, Subscriber = "SCP" });
+ if (_result.State == ReturnStatus.Succeed)
+ {
+ foreach (var _task in _result.Result)
+ {
+ ScpEntities scpdb = EntitiesFactory.CreateScpInstance();
+ ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance();
+ DataCenterContext dc = EntitiesFactory.CreateDataCenterInstance();
+ AppBoxContext authdb = EntitiesFactory.CreateAppBoxInstance();
+ using (var scope =
+ new TransactionScope(TransactionScopeOption.Required, new TransactionOptions()
+ {
+ IsolationLevel = System.Transactions.IsolationLevel.Serializable,
+ Timeout = new TimeSpan(0, 20, 0)
+ }))
+ {
+ try
+ {
+ switch (_task.TableName)
+ {
+ //case "TED_POD":
+ // result = UpdatePo(db, scpdb, _task);
+ // break;
+ case "TED_RECEIPT_MSTR":
+ if (_task.Creator == "QAD")
+ {
+ result = UpdateRecive(db, scpdb, _task);
+ result.Message = _task.TaskID.ToString();
+ }
+ else
+ {
+ result = UpdateARRIVE(db, scpdb, _task);
+ result.Message = _task.TaskID.ToString();
+ }
+ break;
+ case "TED_RETURN_MSTR":
+ result = UpdateReturn(db, scpdb, _task);
+ result.Message = _task.TaskID.ToString();
+ break;
+ case "TES_SUPPLIER":
+ result = UpdateSupplier(db, scpdb,authdb, _task);
+ result.Message = _task.TaskID.ToString();
+ break;
+ //case "TES_SUPPLIER_PART":
+ // result = UpdateSupplierPart(dc, db, scpdb, _task);
+ // break;
+ case "TES_PART_MSTR":
+ result = UpdatePart(db, scpdb, _task);
+ result.Message = _task.TaskID.ToString();
+ break;
+ //case "TES_SITE":
+ // result = UpdateFactory(db, scpdb, appscpdb, _task);
+ // break;
+ }
+ Update_TEA_TASK_SUB(db, _task);
+ EntitiesFactory.SaveDb(scpdb);
+ EntitiesFactory.SaveDb(db);
+ EntitiesFactory.SaveDb(dc);
+ scope.Complete();
+ // p_action(result);
+ result.State = ReturnStatus.Succeed;
+ result.Result = true;
+ }
+ catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常
+ {
+ var sb = new StringBuilder();
+ foreach (var error in dbEx.EntityValidationErrors.ToList())
+ {
+ error.ValidationErrors.ToList().ForEach(i =>
+ {
+ sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage);
+ });
+ }
+ scope.Dispose();
+ result.State = ReturnStatus.Failed;
+ result.ErrorList.Add(dbEx);
+ }
+ catch (OptimisticConcurrencyException ex)//并发冲突异常
+ {
+
+ scope.Dispose();
+ result.State = ReturnStatus.Failed;
+ result.ErrorList.Add(ex);
+ }
+ catch (Exception ex)
+ {
+ scope.Dispose();
+ result.State = ReturnStatus.Failed;
+ result.ErrorList.Add(ex);
+ result.Message = _task.TaskID.ToString();
+ // result.MessageList.Add("任务编号:" + _task.TaskID + "错误信息:" + ex.Message);
+ }
+ }
+ p_action(result);
+ }
+ }
+ p_action(result);
+ }
+
+ public static void WriteService(Action>> p_action)
+ {
+ ResultObject> result = new ResultObject>();
+ List _msglist = new List();
+ using (var scope =
+ new TransactionScope(TransactionScopeOption.Required, new TransactionOptions()
+ {
+ IsolationLevel = System.Transactions.IsolationLevel.Serializable,
+ Timeout = new TimeSpan(0, 20, 0)
+ }))
+ {
+ try
+ {
+ ScpEntities scpdb = EntitiesFactory.CreateScpInstance();
+ ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance();
+ var _list = scpdb.TS_UNI_API.Where(p => p.State == (int)DataState.Enabled).OrderBy(p => p.UID).ToList();
+ var billNumList = _list.Select(p => p.BillNum).Distinct();
+ //if (DateTime.Today.DayOfWeek.ToString() == "Sunday" && DateTime.Now.Hour == 12)//向历史记录表里写入记录
+ //{
+ // List _hisList = new List();
+ // var _taskList = db.TEA_TASK_SUB.Where(p => p.Subscriber == "SCP" && p.TaskState == EnumTaskState.Success).ToList();
+ // foreach (var itm in _taskList)
+ // {
+ // TEA_TASK_SUB_HIS _entity = new TEA_TASK_SUB_HIS();
+ // _entity.Creator = itm.Creator;
+ // _entity.Subscriber = itm.Subscriber;
+ // _entity.Domain = itm.Domain;
+ // _entity.Site = itm.Site;
+ // _entity.UID = itm.UID;
+ // _entity.CreateUser = itm.CreateUser;
+ // _entity.CreateTime = itm.CreateTime;
+ // _entity.Remark = itm.Remark;
+ // _entity.UpdateUser = itm.UpdateUser;
+ // _entity.UpdateTime = itm.UpdateTime;
+ // _entity.IsChecked = itm.IsChecked;
+ // _entity.TaskID = itm.TaskID;
+ // _entity.TaskState = itm.TaskState;
+ // _entity.GUID = itm.GUID;
+ // _hisList.Add(_entity);
+ // }
+ // db.TEA_TASK_SUB_HIS.AddOrUpdate(_hisList.ToArray());
+ // db.TEA_TASK_SUB.RemoveRange(_taskList.ToArray());
+ //}
+ foreach (var itm in billNumList)
+ {
+ var _dataList = _list.Where(p => p.BillNum == itm).ToList();
+ var _asnList = _dataList.Where(P => P.InterfaceType == UniApiType.Receive.ToString()).ToList();
+ if (_asnList.Count > 0)
+ {
+ var _taskId = Guid.NewGuid();
+ _msglist.Add(new LogModel() { LogMessage = string.Format("发现发货单信息{0}条", _asnList.Count), LogTime = DateTime.Now.ToString(), TaskId = _taskId.ToString(), TableName = "TED_ASN_MSTR" });
+ var ret = UpdateAsn(db, scpdb, _asnList, _taskId);
+ if (ret.State == ReturnStatus.Succeed)
+ {
+ _msglist.Add(ret.Result);
+ }
+ }
+ var _invoiceList = _dataList.Where(p => p.InterfaceType == UniApiType.Invoice.ToString()).ToList();
+ if (_invoiceList.Count > 0)
+ {
+ var _taskId = Guid.NewGuid();
+ _msglist.Add(new LogModel() { LogMessage = string.Format("发现发票信息{0}条", _invoiceList.Count), LogTime = DateTime.Now.ToString(), TaskId = _taskId.ToString(), TableName = "TED_INVOICE_MSTR" });
+ var ret = UpdateInvoice(db, scpdb,_invoiceList, _taskId);
+ if (ret.State == ReturnStatus.Succeed)
+ {
+ _msglist.Add(ret.Result);
+ }
+ }
+ Thread.Sleep(10);
+ }
+ EntitiesFactory.SaveDb(scpdb);
+ EntitiesFactory.SaveDb(db);
+ scope.Complete();
+ result.State = ReturnStatus.Succeed;
+ result.Result = _msglist;
+ }
+ catch(Exception e)
+ {
+ _msglist.Add(new LogModel() { LogMessage = e.Message, LogTime = DateTime.Now.ToString(), TaskId =string.Empty, TableName = "ERROR" });
+ result.State = ReturnStatus.Failed;
+ result.Result = _msglist;
+ scope.Dispose();
+
+ }
+ //finally
+ //{
+
+ //}
+
+ }
+ p_action(result);
+ }
+
+ //public static ResultObject UpdateAsnDetail(ExchangeCenterContext db, ScpEntities scpdb,List p_asnDetailList)
+ //{
+ // ResultObject _ret = new ResultObject();
+ // try
+ // {
+ // foreach (var itm in p_asnDetailList)
+ // {
+
+ // }
+
+ // }
+ // catch (Exception e)
+ // {
+ // _ret.State = ReturnStatus.Failed;
+ // LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateAsnDetail", e.Message);
+ // _ret.Result = false;
+ // _ret.ErrorList.Add(e);
+ // throw e;
+ // }
+ // return _ret;
+ //}
+
+ public static List GetASN(string p_asn)
+ {
+ List _ls = new List();
+
+ using (var db = EntitiesFactory.CreateExchangeCenterInstance())
+ {
+ _ls = db.TED_ASN_MSTR.Where(p => p.ASN == p_asn).ToList();
+ }
+ return _ls;
+ }
+
+
+
+ public static ResultObject UpdateAsn(ExchangeCenterContext db, ScpEntities scpdb, List _asnList, Guid p_taskID/*EnumCommandType p_command*/)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ List _ls = new List();
+
+ if (_asnList.FirstOrDefault() != null)
+ {
+ var _api = _asnList.FirstOrDefault();
+ TED_ASN_MSTR _asn = new TED_ASN_MSTR();
+ var asn = JsonConvert.DeserializeObject(_api.Extend1);
+ _asn.ASN = _api.BillNum;
+ _asn.CommandType = "A";
+ _asn.CreateTime = _api.CreateTime;
+ _asn.CreateUser = _api.CreateOper;
+ _asn.KanbanBillNum = asn.AskBillNum;
+ _asn.PurchaseOrder = asn.PoBillNum;
+ _asn.Site = asn.SubSite;
+ _asn.Domain = asn.Site;
+ _asn.Supplier = asn.VendId;
+ _asn.TaskID = p_taskID;
+ _asn.DataID = Guid.NewGuid();
+ _asn.ShippingDate = asn.ShipTime == null ? DateTime.Now : asn.ShipTime.Value;
+ _asn.PromiseDate = asn.ReceiveTime == null ? DateTime.Now : asn.ReceiveTime.Value;
+ db.TED_ASN_MSTR.Add(_asn);
+ foreach (var detail in _asnList)
+ {
+ TED_ASN_DET _entity = new TED_ASN_DET();
+ var asnDetail = JsonConvert.DeserializeObject(_api.Extend2);
+ _entity.ASN = detail.BillNum;
+ _entity.PurchaseOrder = asn.PoBillNum;
+ _entity.Line = detail.ErpLineNum;
+ _entity.PartCode = detail.PartCode;
+ _entity.Lot = detail.Batch;
+ _entity.Qty = detail.Qty;
+ _entity.TaskID = p_taskID;
+ _entity.PackQty = detail.PackQty;
+ _entity.Location = asnDetail.DockCode;
+ _entity.Reference = "";
+ _entity.SupplierLot = detail.VendBatch;
+ _entity.WareClass = "";
+ _entity.WareId = "";
+ _entity.Price = detail.Price;
+ _entity.PoUm = detail.PoUnit;
+ _entity.LocUm = detail.LocUnit;
+ _entity.Conv = detail.UmConv;
+ _entity.PartType = "";
+ _entity.VendBatch = detail.VendBatch;
+ _entity.ProduceDate = asnDetail.ProduceDate == null ? DateTime.Now : asnDetail.ProduceDate.Value;
+ _entity.DueDate = asnDetail.EndTime == null ? DateTime.Now : asnDetail.EndTime.Value;
+ _entity.CreateUser = detail.CreateOper;
+ _entity.CreateTime = detail.CreateTime;
+ _entity.CommandType = "A";
+ _entity.Domain = asn.Site;
+ _entity.Site = asn.SubSite;
+ _entity.DataID = Guid.NewGuid();
+ db.TED_ASN_DET.Add(_entity);
+ _ls.Add(_entity);
+ detail.State = (int)BillState.Finish;
+ detail.PutTime = DateTime.Now;
+
+ }
+
+ var ret = CREATE_TEA_TASK_SUB(db, true, new TEA_TASK_SUB()
+ {
+ DataCount = _asnList.Count,
+ TaskID = p_taskID,
+ TableName = "TED_ASN_MSTR",
+ Site = asn.SubSite,
+ Domain = asn.Site,
+ CreateTime = _api.CreateTime,
+ CreateUser = _api.CreateOper,
+ Creator = "SCP",
+ });
+ }
+ _ret.State = ReturnStatus.Succeed;
+ _ret.Result = new LogModel() { LogMessage=string.Format("成功发布发货单信息{0}条", _asnList.Count), LogTime=DateTime.Now.ToString(), TaskId= p_taskID.ToString(), TableName= "TED_ASN_MSTR" };
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateAsn", e.Message);
+ _ret.Result = new LogModel() { LogMessage = "发布发货单信息失败", LogTime = DateTime.Now.ToString(), TaskId = p_taskID.ToString(), TableName = "TED_ASN_MSTR" }; ;
+ _ret.ErrorList.Add(e);
+ throw e;
+ }
+ return _ret;
+ }
+
+
+ public static ResultObject UpdateReciveDetail(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ var scpRcveDetailList = new List();
+ var _reciveDetailList = db.TED_RECEIPT_DET.Where(p => p.TaskID == p_entity.TaskID).ToList();
+ foreach (var detail in _reciveDetailList)
+ {
+ var poLineNum = Convert.ToInt32(detail.Line);
+ var scpRcvDetail =
+ scpdb.TB_RECEIVE_DETAIL_QAD.SingleOrDefault(
+ p => p.RecvBillNum == detail.ReceiveNbr &&
+ p.PoBillNum == detail.PurchaseOrder &&
+ p.PoLine == detail.Line &&
+ p.PartCode == detail.PartCode &&
+ p.Batch == detail.Lot
+ );
+ if (scpRcvDetail == null)
+ {
+ //int istate = 0;
+ //if (isRerviceOk == false)
+ //{
+ // istate = (int)FormState.关闭;
+ //}
+ //else
+ //{
+ // istate = (int)FormState.开放;
+ //}
+ scpRcvDetail = new TB_RECEIVE_DETAIL_QAD();
+ scpRcvDetail.RecvBillNum = detail.ReceiveNbr;//收货单号
+ scpRcvDetail.PoBillNum = detail.PurchaseOrder;//采购单
+ scpRcvDetail.PoLine = detail.Line;//订单行
+ scpRcvDetail.PartCode = detail.PartCode.ToUpper();//零件号
+ scpRcvDetail.Batch = detail.PartCode;//批次
+ scpRcvDetail.VendBatch = detail.SupplierLot;//供应商批号
+ scpRcvDetail.PoUnit = detail.Um;//采购单位
+ scpRcvDetail.LocUnit = detail.logisticsUm;//物流单位
+ scpRcvDetail.Qty = detail.ReceiveQuantity;//收货总量 //DockCode = ?,//收货口
+ scpRcvDetail.State = 0;// (int)FormState.关闭,
+ scpRcvDetail.Remark = detail.Remark;
+ scpRcvDetail.CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期
+ scpRcvDetail.CreateUser = detail.CreateUser;//创建用户
+ scpRcvDetail.IsDeleted = false;
+ scpRcvDetail.GUID = detail.TaskID;
+ scpRcvDetail.BillType = 0;
+ scpRcvDetail.SubSite = detail.Shipto;
+ scpRcvDetail.Site = detail.Domain;
+ //scpRcvDetail.Currency = detail.Currency;
+ //scpRcvDetail.Currencyamount = detail.Currencyamount;
+
+ //scpRcvDetail.ExchangeRateType = detail.Exchangeratetype;
+ //scpRcvDetail.WorkOrderID = detail.WorkOrderID;
+ //scpRcvDetail.POSite = detail.Posite;
+ //scpRcvDetail.POCost = detail.Purchasecost;
+ //scpRcvDetail.POStandardCost = detail.Purchasestandardcost;
+ //scpRcvDetail.ReceiptType = detail.receipttype;
+ //scpRcvDetail.ReturnReasonCode = detail.Returnreason;
+ //scpRcvDetail.Requestedby = detail.Requestby;
+ //scpRcvDetail.TaxEnvironment = detail.Taxenvironment;
+ //scpRcvDetail.TaxIn = detail.taxin;
+ //scpRcvDetail.TaxUsage = detail.Taxusage;
+ //scpRcvDetail.TaxClass = detail.Taxclass;
+ //scpRcvDetail.PurchaseType = detail.Purchasetype;
+ //scpRcvDetail.UMConversion = detail.Umconversion;
+ scpRcveDetailList.Add(scpRcvDetail);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateAsnDetail", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ throw e;
+ }
+ return _ret;
+
+ }
+
+ public static ResultObject UpdateRecive(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ var _reciveList = db.TED_RECEIPT_MSTR.Where(p => p.TaskID == p_entity.TaskID).ToList();
+ var _scpPoDetailList = new List();
+ foreach (var detail in _reciveList)
+ {
+ var scpRcv = scpdb.TB_RECEIVE.SingleOrDefault(p => p.RecvBillNum != null && p.RecvBillNum == detail.ReceiveNbr && p.Site == detail.Domain && p.SubSite == detail.Site);
+ var scpRcvList = new List();
+ bool isRerviceOk = false;
+ if (!string.IsNullOrEmpty(detail.Site) && !string.IsNullOrEmpty(detail.Domain))
+ {
+ string _domain = detail.Domain;
+ string _site = detail.Site;
+ List configs = scpdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == _domain).ToList();
+ foreach (TA_FACTORY_CONFIG cfg in configs)
+ {
+ TA_CONFIG tacfg = scpdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault();
+ if (tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "收货自动审核")
+ {
+ if ("允许" == tacfg.ParamValue)
+ {
+ isRerviceOk = true;
+ }
+ }
+ }
+ }
+ if (scpRcv == null)
+ {
+ int istate = 0;
+ if (isRerviceOk == false)
+ {
+ istate = (int)FormState.关闭;
+ }
+ else
+ {
+ istate = (int)FormState.开放;
+ }
+ scpRcv = new TB_RECEIVE
+ {
+ RecvBillNum = detail.ReceiveNbr,//收货单号
+ State = istate,
+ Remark = "",
+ CreateTime = detail.ReceiptDate == null ? DateTime.Now : (DateTime)detail.ReceiptDate,//创建日期
+ CreateUser = detail.CreateUser,//创建用户
+ IsDeleted = false,
+ GUID = detail.TaskID,
+ BillType = 0
+ };
+ scpRcvList.Add(scpRcv);
+ }
+ scpRcv.PoBillNum = detail.PurchaseOrder;//采购单
+ scpRcv.AsnBillNum = detail.ASN;//发货单号
+ scpRcv.Site = detail.Domain;//地点
+ scpRcv.VendId = detail.Supplier;//供货商名称
+ scpRcv.ShipTime = detail.ReceiptDate;//收货日期
+ scpRcv.SubSite = detail.Site;
+ scpdb.TB_RECEIVE.AddOrUpdate(scpRcvList.ToArray());
+ }
+
+ var scpRcveDetailList = new List();
+ var _reciveDetailList = db.TED_RECEIPT_DET.Where(p => p.TaskID == p_entity.TaskID).ToList();
+ foreach (var detail in _reciveDetailList)
+ {
+ var poLineNum = Convert.ToInt32(detail.Line);
+ var scpRcvDetail =
+ scpdb.TB_RECEIVE_DETAIL.FirstOrDefault(
+ p => p.RecvBillNum == detail.ReceiveNbr &&
+ p.PoBillNum == detail.PurchaseOrder &&
+ p.PoLine == detail.Line &&
+ p.PartCode == detail.PartCode
+
+ && p.SubSite==detail.Site
+ );
+ if (scpRcvDetail == null)
+ {
+
+ //int istate = 0;
+ //if (isRerviceOk == false)
+ //{
+ // istate = (int)FormState.关闭;
+ //}
+ //else
+ //{
+ // istate = (int)FormState.开放;
+ //}
+ scpRcvDetail = new TB_RECEIVE_DETAIL();
+ scpRcvDetail.RecvBillNum = detail.ReceiveNbr;//收货单号
+ scpRcvDetail.PoBillNum = detail.PurchaseOrder;//采购单
+ scpRcvDetail.PoLine = detail.Line;//订单行
+ scpRcvDetail.PartCode = detail.PartCode;//零件号
+ scpRcvDetail.Batch = detail.Lot;//批次
+ scpRcvDetail.VendBatch = detail.SupplierLot;//供应商批号
+ scpRcvDetail.PoUnit = detail.Um;//采购单位
+ scpRcvDetail.LocUnit = detail.logisticsUm;//物流单位
+ //收货总量 //DockCode = ?,//收货口
+ scpRcvDetail.State = 1;// (int)FormState.关闭,
+ scpRcvDetail.Remark = detail.Remark;
+ scpRcvDetail.CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期
+ scpRcvDetail.CreateUser = detail.CreateUser;//创建用户
+ scpRcvDetail.IsDeleted = false;
+ scpRcvDetail.GUID = detail.TaskID;
+ scpRcvDetail.BillType = 0;
+ scpRcvDetail.SubSite = detail.Shipto;
+ scpRcvDetail.Site = detail.Domain;
+ scpRcvDetail.Currency = detail.Currency;
+ scpRcvDetail.Currencyamount = detail.Currencyamount;
+ scpRcvDetail.ExchangeRate = detail.Exchangerate==null?"1":detail.Exchangerate.Value.ToString();
+ scpRcvDetail.ExchangeRate1 = detail.Exchangerate2 == null ? "1" : detail.Exchangerate2.Value.ToString();
+ scpRcvDetail.ExchangeRateType = detail.Exchangeratetype;
+ scpRcvDetail.WorkOrderID = detail.WorkOrderID;
+ scpRcvDetail.POSite = detail.Posite;
+ scpRcvDetail.POCost = detail.Purchasecost;
+ scpRcvDetail.POStandardCost = detail.Purchasestandardcost;
+ scpRcvDetail.ReceiptType = detail.receipttype;
+ scpRcvDetail.ReturnReasonCode = detail.Returnreason;
+ scpRcvDetail.Requestedby = detail.Requestby;
+ scpRcvDetail.TaxEnvironment = detail.Taxenvironment;
+ scpRcvDetail.TaxIn = detail.taxin;
+ scpRcvDetail.TaxUsage = detail.Taxusage;
+ scpRcvDetail.TaxClass = detail.Taxclass;
+ scpRcvDetail.PurchaseType = detail.Purchasetype;
+ scpRcvDetail.UMConversion = detail.Umconversion;
+ scpRcveDetailList.Add(scpRcvDetail);
+ }
+ scpRcvDetail.Qty = detail.ReceiveQuantity;
+ }
+ // var _str=JsonHelper.GetJson>(scpRcveDetailList);
+ scpdb.TB_RECEIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray());
+ _ret.State = ReturnStatus.Succeed;
+ _ret.MessageList.Add(string.Format("QAD收货单更新{0}任务编号{1}", _reciveDetailList.Count().ToString(), p_entity.TaskID));
+ _ret.Result = true;
+ // var retDetail=UpdateReciveDetail(db, scpdb, p_entity);
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateRecive", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ _ret.MessageList.Add(string.Format("QAD收货单更新失败任务编号{0}", p_entity.TaskID));
+ throw e;
+ }
+ return _ret;
+ }
+
+
+ public static ResultObject UpdateARRIVE(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ var _reciveList = db.TED_RECEIPT_MSTR.Where(p => p.TaskID == p_entity.TaskID && !string.IsNullOrEmpty(p.ReceiveNbr)).ToList();
+ var _scpPoDetailList = new List();
+ foreach (var detail in _reciveList)
+ {
+ var scpRcv = scpdb.TB_ARRIVE.SingleOrDefault(p => p.ArrvBillNum != null && p.ArrvBillNum == detail.ReceiveNbr && p.Site == detail.Domain && p.SubSite == detail.Site);
+ var scpRcvList = new List();
+ bool isRerviceOk = false;
+ if (!string.IsNullOrEmpty(detail.Site) && !string.IsNullOrEmpty(detail.Domain))
+ {
+ string _domain = detail.Domain;
+ string _site = detail.Site;
+ List configs = scpdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == _domain).ToList();
+ foreach (TA_FACTORY_CONFIG cfg in configs)
+ {
+ TA_CONFIG tacfg = scpdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault();
+ if (tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "收货自动审核")
+ {
+ if ("允许" == tacfg.ParamValue)
+ {
+ isRerviceOk = true;
+ }
+ }
+ }
+ }
+ if (scpRcv == null)
+ {
+ int istate = 0;
+ if (isRerviceOk == false)
+ {
+ istate = (int)FormState.关闭;
+ }
+ else
+ {
+ istate = (int)FormState.开放;
+ }
+ scpRcv = new TB_ARRIVE
+ {
+ ArrvBillNum = detail.ReceiveNbr,//收货单号
+ State = istate,
+ Remark = "",
+ CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime,//创建日期
+ CreateUser = detail.CreateUser,//创建用户
+ IsDeleted = false,
+ GUID = detail.TaskID,
+ BillType = 0
+ };
+ scpRcvList.Add(scpRcv);
+ }
+ scpRcv.PoBillNum = detail.PurchaseOrder;//采购单
+ scpRcv.AsnBillNum = detail.ASN;//发货单号
+
+ if (!string.IsNullOrEmpty(detail.ASN))
+ {
+ var _entity=scpdb.TB_ASN.Where(p => p.AsnBillNum == detail.ASN).FirstOrDefault();
+ if (_entity != null)
+ {
+ _entity.State = 4;
+ }
+ }
+ scpRcv.Site = detail.Domain;//地点
+ scpRcv.VendId = detail.Supplier;//供货商名称
+ scpRcv.ShipTime = detail.ReceiptDate;//收货日期
+ scpRcv.SubSite = detail.Site;
+ scpdb.TB_ARRIVE.AddOrUpdate(scpRcvList.ToArray());
+ }
+
+ var scpRcveDetailList = new List();
+ var _reciveDetailList = db.TED_RECEIPT_DET.Where(p => p.TaskID == p_entity.TaskID && !string.IsNullOrEmpty(p.ReceiveNbr)).ToList();
+ foreach (var detail in _reciveDetailList)
+ {
+ var poLineNum = Convert.ToInt32(detail.Line);
+ var scpRcvDetail =
+ scpdb.TB_ARRIVE_DETAIL.SingleOrDefault(
+ p => p.ArrvBillNum == detail.ReceiveNbr &&
+ p.PoBillNum == detail.PurchaseOrder &&
+ p.PoLine == detail.Line &&
+ p.PartCode == detail.PartCode &&
+ p.Batch == detail.Lot
+ &&p.SubSite==detail.Site
+ );
+ if (scpRcvDetail == null)
+ {
+
+ //int istate = 0;
+ //if (isRerviceOk == false)
+ //{
+ // istate = (int)FormState.关闭;
+ //}
+ //else
+ //{
+ // istate = (int)FormState.开放;
+ //}
+ scpRcvDetail = new TB_ARRIVE_DETAIL();
+ scpRcvDetail.ArrvBillNum = detail.ReceiveNbr;//收货单号
+ scpRcvDetail.PoBillNum = detail.PurchaseOrder;//采购单
+ scpRcvDetail.PoLine = detail.Line;//订单行
+ scpRcvDetail.PartCode = detail.PartCode;//零件号
+ scpRcvDetail.Batch = detail.Lot;//批次
+ scpRcvDetail.VendBatch = detail.SupplierLot;//供应商批号
+ scpRcvDetail.PoUnit = detail.Um;//采购单位
+ scpRcvDetail.LocUnit = detail.logisticsUm;//物流单位
+ scpRcvDetail.Qty = detail.ReceiveQuantity;//收货总量 //DockCode = ?,//收货口
+ scpRcvDetail.State = 1;// (int)FormState.关闭,
+ scpRcvDetail.Remark = detail.Remark;
+ scpRcvDetail.CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期
+ scpRcvDetail.CreateUser = detail.CreateUser;//创建用户
+ scpRcvDetail.IsDeleted = false;
+ scpRcvDetail.GUID = detail.TaskID;
+ scpRcvDetail.BillType = 0;
+ scpRcvDetail.SubSite = detail.Site;
+ scpRcvDetail.Site = detail.Domain;
+ scpRcveDetailList.Add(scpRcvDetail);
+ }
+ }
+ var _str = JsonHelper.GetJson>(scpRcveDetailList);
+ scpdb.TB_ARRIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray());
+ _ret.State = ReturnStatus.Succeed;
+ _ret.MessageList.Add(string.Format("到货单更新{0}任务编号{1}", _reciveDetailList.Count().ToString(), p_entity.TaskID));
+ _ret.Result = true;
+ // var retDetail=UpdateReciveDetail(db, scpdb, p_entity);
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateRecive", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ _ret.MessageList.Add(string.Format("到货单更新失败任务编号{0}", p_entity.TaskID));
+ throw e;
+ }
+ return _ret;
+ }
+
+
+
+ public static ResultObject UpdateInvoiceDetail(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+
+
+
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateAsnDetail", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ throw e;
+ }
+ return _ret;
+
+ }
+
+ public static ResultObject UpdateInvoice(ExchangeCenterContext db, ScpEntities scpdb, List p_invoiceList, Guid p_taskId)
+ {
+ ResultObject _ret = new ResultObject();
+ List _mstList = new List();
+ List _detList = new List();
+ // List _addList = new List();
+ try
+ {
+ if (p_invoiceList.FirstOrDefault() != null)
+ {
+ var _api = p_invoiceList.FirstOrDefault();
+ #region 发票主表
+ TED_INVOICE_MSTR _invMast = new TED_INVOICE_MSTR();
+ var _vinvoice = JsonConvert.DeserializeObject(_api.Extend1);
+ _invMast.GUID = Guid.NewGuid();
+ _invMast.Status = "0";
+ _invMast.Invoice_ID = 1000;
+ _invMast.InvoiceReference = _vinvoice.InvoiceNum;
+
+ _invMast.CreateInvoice = true;
+ _invMast.Supplier = _vinvoice.VendId.Trim();
+ _invMast.SupplierName = _vinvoice.VendName.Trim();
+ _invMast.Rowid = Guid.NewGuid().ToString();
+ _invMast.InvoiceIsTaxable = true;
+ _invMast.InvoiceHoldAmountTC = _vinvoice.Amount.Value;
+ _invMast.InvoiceVoucher = 0;
+ _invMast.InvoiceRegistrationNbr = 1000;
+ _invMast.PostingDate = _vinvoice.PostingDate==null?DateTime.Now:_vinvoice.PostingDate.Value;
+ _invMast.Currency = "CNY";
+
+ _invMast.InvoiceDate = _vinvoice.UpdateTime == null ? DateTime.Now : _vinvoice.UpdateTime.Value;
+ _invMast.GUID = Guid.NewGuid();
+ _invMast.Invoice_ID = 1000;
+ _invMast.CreateInvoice = true;
+ _invMast.PaymentCondCode = "90";
+ _invMast.InvoiceDueDate = _invMast.InvoiceDate.AddDays(int.Parse(_invMast.PaymentCondCode));
+ _invMast.InvoiceIsStatusFinal = true;
+ _invMast.InvoicePostingYear = _vinvoice.PostingDate==null?DateTime.Now.Year: _vinvoice.PostingDate.Value.Year;
+ _invMast.APMatchingIsStatusFinal = true;
+ _invMast.InvoiceRemark = _vinvoice.InvcBillNum;//发票编号
+ _invMast.CreateWithAmountIsTax = true;
+ _invMast.InvoiceAmountTC = _vinvoice.TaxAmount == null ? 0 : _vinvoice.TaxAmount.Value;
+ _invMast.InvoiceIsTaxable = true;
+ _invMast.CreateUser = _vinvoice.CreateUser;
+ _invMast.CreateTime = DateTime.Now;
+ _invMast.Remark = _vinvoice.Remark;
+ _invMast.TaskID = p_taskId;
+ _invMast.CommandType = "A";
+ _invMast.DataID = Guid.NewGuid();
+ _invMast.Domain = _vinvoice.Site;
+ _invMast.Site = _vinvoice.SubSite;
+ _invMast.CInvoiceCostCenterCode = _vinvoice.CInvoiceCostCenterCode;
+ _invMast.CInvoiceReference = _vinvoice.InvoiceNum;
+ _invMast.CInvoiceDescription = _vinvoice.CInvoiceDescription;
+ _invMast.CInvoiceType = _vinvoice.CInvoiceType;
+ _invMast.CInvoiceDivisionCode = _vinvoice.CInvoiceDivisionCode;
+
+ _mstList.Add(_invMast);
+ #endregion
+ #region 发票差异
+ if ((_vinvoice.ContractPrice != null && _vinvoice.ContractPrice.Value != 0) )
+ {
+ _invMast.InvoiceHoldAmountTC = _vinvoice.Amount.Value + _vinvoice.ContractPrice.Value;
+
+ //_add.VatDebitCC = _vinvoice.ContractPrice.Value;//折扣
+ //_add.VatDebitLC = _vinvoice.BlancePrice.Value;//税额调整
+ //_add.VatDebitTC = _vinvoice.ContractPrice.Value;
+ // _addList.Add(_add);
+ }
+ if ((_vinvoice.BlancePrice != null && _vinvoice.BlancePrice.Value != 0))
+ {
+ _invMast.InvoiceAmountTC = (_vinvoice.TaxAmount == null ? 0 : _vinvoice.TaxAmount.Value) + _vinvoice.BlancePrice.Value;
+ }
+ #endregion
+
+ #region 发票明细
+ foreach (var detail in p_invoiceList)
+ {
+ TED_INVOICE_DET _entity = new TED_INVOICE_DET();
+ var _invDetail = JsonConvert.DeserializeObject(detail.Extend2);
+ _entity.CommandType = "A";
+ _entity.GUID = _invDetail.GUID;
+ _entity.Status =_invMast.Status;
+ _entity.PurchaseOrder = _invDetail.PoBillNum;
+ _entity.Line = _invDetail.PoLineNum;
+ _entity.ReceiveNbr = _invDetail.RecvBillNum;
+ _entity.MatchQuantity = _invDetail.Qty;
+ _entity.MatchPrice = _invDetail.Price + ((_invDetail.BlancePrice==null)?0: _invDetail.BlancePrice.Value);
+ _entity.IsPvodFinished = true;
+ _entity.UsageDate = DateTime.Now;
+ _entity.IsRecalculateTaxes = true;
+ _entity.ParentRowid = _invMast.Rowid;
+ _entity.CreateUser = _invDetail.CreateUser;
+ _entity.CreateTime = _invDetail.CreateTime;
+ _entity.Remark = _invDetail.Remark;
+ _entity.TaskID = p_taskId;
+ _entity.CommandType = "A";
+ _entity.DataID = Guid.NewGuid();
+ _entity.Domain = _invDetail.Site.Trim();
+ _entity.Site = _invDetail.SubSite.Trim();
+ _entity.PartCode = _invDetail.PartCode;
+ _entity.Tax = _invDetail.Tax.ToString();
+ _detList.Add(_entity);
+ detail.State = (int)BillState.Finish;
+ detail.PutTime = DateTime.Now;
+
+ }
+ #endregion
+ var ret = CREATE_TEA_TASK_SUB(db, true, new TEA_TASK_SUB()
+ {
+ DataCount = p_invoiceList.Count,
+ TaskID = p_taskId,
+ TableName = "TED_INVOICE_MSTR",
+ Site = _vinvoice.SubSite.Trim(),
+ Domain = _vinvoice.Site,
+ CreateTime = _api.CreateTime,
+ CreateUser = _api.CreateOper,
+ Creator = "SCP",
+ });
+ }
+ db.TED_INVOICE_MSTR.AddOrUpdate(_mstList.ToArray());
+ db.TED_INVOICE_DET.AddOrUpdate(_detList.ToArray());
+
+
+ var str=JsonHelper.GetJson(_mstList.ToArray());
+ var str1=JsonHelper.GetJson(_detList.ToArray());
+
+ _ret.State = ReturnStatus.Succeed;
+ _ret.Result = new LogModel() { LogMessage = string.Format("成功发布发票信息{0}条",_detList.Count), LogTime = DateTime.Now.ToString(), TaskId = p_taskId.ToString(), TableName = "TED_INVOICE_MSTR" };
+
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateInvoice", e.Message);
+ _ret.Result = new LogModel() { LogMessage = "发布发票信息失败", LogTime = DateTime.Now.ToString(), TaskId = p_taskId.ToString(), TableName = "TED_INVOICE_MSTR" }; ;
+ _ret.ErrorList.Add(e);
+
+ throw e;
+ }
+ return _ret;
+
+ }
+
+
+ public static ResultObject UpdateReturn(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ var _reciveList = db.TED_RETURN_MSTR.Where(p => p.TaskID == p_entity.TaskID && !string.IsNullOrEmpty(p.ReturnNbr)).ToList();
+ var _scpPoDetailList = new List();
+ foreach (var detail in _reciveList)
+ {
+ var scpRcv = scpdb.TB_ARRIVE.SingleOrDefault(p => p.ArrvBillNum != null && p.ArrvBillNum == detail.ReturnNbr && p.Site == detail.Domain && p.SubSite == detail.Site);
+ var scpRcvList = new List();
+ bool isRerviceOk = false;
+ if (!string.IsNullOrEmpty(detail.Site) && !string.IsNullOrEmpty(detail.Domain))
+ {
+ string _domain = detail.Domain;
+ string _site = detail.Site;
+ List configs = scpdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == _domain).ToList();
+ foreach (TA_FACTORY_CONFIG cfg in configs)
+ {
+ TA_CONFIG tacfg = scpdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault();
+ if (tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "收货自动审核")
+ {
+ if ("允许" == tacfg.ParamValue)
+ {
+ isRerviceOk = true;
+ }
+ }
+ }
+ }
+ if (scpRcv == null)
+ {
+ int istate = 0;
+ if (isRerviceOk == false)
+ {
+ istate = (int)FormState.关闭;
+ }
+ else
+ {
+ istate = (int)FormState.开放;
+ }
+ scpRcv = new TB_ARRIVE
+ {
+ ArrvBillNum = detail.ReturnNbr,//收货单号
+ State = istate,
+ Remark = "",
+ CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime,//创建日期
+ CreateUser = detail.CreateUser,//创建用户
+ IsDeleted = false,
+ GUID = detail.TaskID,
+ BillType = 1
+ };
+ scpRcvList.Add(scpRcv);
+ }
+ scpRcv.PoBillNum = detail.PurchaseOrder;//采购单
+ scpRcv.AsnBillNum = detail.ASN;//发货单号
+
+ if (!string.IsNullOrEmpty(detail.ASN))
+ {
+ var _entity=scpdb.TB_ASN.Where(p => p.AsnBillNum == detail.ASN).FirstOrDefault();
+ if (_entity != null)
+ {
+ _entity.State = 4;
+ }
+ }
+ scpRcv.Site = detail.Domain;//地点
+ scpRcv.VendId = detail.Supplier;//供货商名称
+ scpRcv.ShipTime = detail.ReturnDate;//收货日期
+ scpRcv.SubSite = detail.Site;
+ scpdb.TB_ARRIVE.AddOrUpdate(scpRcvList.ToArray());
+ }
+
+ var scpRcveDetailList = new List();
+ var _reciveDetailList = db.TED_RETURN_DET.Where(p => p.TaskID == p_entity.TaskID ).ToList();
+ var _recive = db.TED_RETURN_MSTR.Where(p => p.TaskID == p_entity.TaskID && !string.IsNullOrEmpty(p.ReturnNbr)).FirstOrDefault();
+ if (_recive != null)
+ {
+ foreach (var detail in _reciveDetailList)
+ {
+ detail.ReturnNbr = _recive.ReturnNbr;
+ var poLineNum = Convert.ToInt32(detail.Line);
+ var scpRcvDetail =
+ scpdb.TB_ARRIVE_DETAIL.SingleOrDefault(
+ p => p.ArrvBillNum == detail.ReturnNbr &&
+ p.PoBillNum == detail.PurchaseOrder &&
+ p.PoLine == detail.Line &&
+ p.PartCode == detail.PartCode &&
+ p.Batch == detail.Lot
+ && p.SubSite == detail.Site
+ );
+ if (scpRcvDetail == null)
+ {
+
+ //int istate = 0;
+ //if (isRerviceOk == false)
+ //{
+ // istate = (int)FormState.关闭;
+ //}
+ //else
+ //{
+ // istate = (int)FormState.开放;
+ //}
+ scpRcvDetail = new TB_ARRIVE_DETAIL();
+ scpRcvDetail.ArrvBillNum = detail.ReturnNbr;//收货单号
+ scpRcvDetail.PoBillNum = detail.PurchaseOrder;//采购单
+ scpRcvDetail.PoLine = detail.Line;//订单行
+ scpRcvDetail.PartCode = detail.PartCode;//零件号
+ scpRcvDetail.Batch = detail.Lot;//批次
+ scpRcvDetail.VendBatch = detail.SupplierLot;//供应商批号
+ scpRcvDetail.PoUnit = detail.Um;//采购单位
+ scpRcvDetail.LocUnit = detail.logisticsUm;//物流单位
+ scpRcvDetail.Qty = detail.ReturnQuantity;//收货总量 //DockCode = ?,//收货口
+ scpRcvDetail.State = 1;// (int)FormState.关闭,
+ scpRcvDetail.Remark = detail.Remark;
+ scpRcvDetail.CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期
+ scpRcvDetail.CreateUser = detail.CreateUser;//创建用户
+ scpRcvDetail.IsDeleted = false;
+ scpRcvDetail.GUID = detail.TaskID;
+ scpRcvDetail.BillType = 1;
+ scpRcvDetail.SubSite = detail.Site;
+ scpRcvDetail.Site = detail.Domain;
+
+ scpRcveDetailList.Add(scpRcvDetail);
+ }
+ }
+ var _str = JsonHelper.GetJson>(scpRcveDetailList);
+ scpdb.TB_ARRIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray());
+ }
+ _ret.State = ReturnStatus.Succeed;
+ _ret.MessageList.Add(string.Format("退货单更新{0}任务编号{1}", _reciveDetailList.Count().ToString(), p_entity.TaskID));
+ _ret.Result = true;
+ // var retDetail=UpdateReciveDetail(db, scpdb, p_entity);
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateRecive", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ _ret.MessageList.Add(string.Format("退货单更新失败任务编号{0}", p_entity.TaskID));
+ throw e;
+ }
+ return _ret;
+
+ }
+
+
+ public static ResultObject UpdatePoDetail(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ var _poDetailList = db.TED_POD_DET.Where(p => p.TaskID == p_entity.TaskID).ToList();
+ var _scpPoDetailList = new List();
+ foreach (var detail in _poDetailList)
+ {
+ var lineNum = Convert.ToInt32(detail.Line);
+ var PoDetail =
+ scpdb.TB_PO_DETAIL.SingleOrDefault(
+ p => p.PoBillNum == detail.PurchaseOrder && p.PoLine == lineNum && p.Remark == detail.Domain);
+ if (PoDetail == null)
+ {
+ PoDetail = new TB_PO_DETAIL
+ {
+ PoBillNum = detail.PurchaseOrder,//订单号
+ PoLine = lineNum,//订单行
+ IsDeleted = false,
+ GUID = detail.TaskID
+ };
+ _scpPoDetailList.Add(PoDetail);
+ }
+ PoDetail.PartCode = detail.PartCode;//零件号-物料号
+ PoDetail.PlanQty = detail.Qty;//订货数量-采购量
+ PoDetail.PoUnit = detail.PoUm;//采购单位
+ PoDetail.LocUnit = detail.LocUm;//存储单位
+ PoDetail.Price = ScpCache.Config.项目名称 == ProjectName.重庆北汽模塑.ToString()? 0 : detail.Price;
+ PoDetail.Currency = detail.Currency;//币种
+ PoDetail.PackQty = detail.PackQty;//标包数量
+ PoDetail.UnConv = detail.Conv;//转换率
+ PoDetail.State = Convert.ToInt32(detail.Status);//状态
+ PoDetail.Remark = detail.Domain;//备注
+ PoDetail.CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期
+ PoDetail.CreateUser = detail.CreateUser;//创建用户
+ PoDetail.UpdateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期
+ PoDetail.UpdateUser = detail.CreateUser;//创建用户
+ }
+ scpdb.TB_PO_DETAIL.AddOrUpdate(_scpPoDetailList.ToArray());
+ //Console.WriteLine($"更新 采购订单 数据:{qadPoDetailList.Count}");
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "Save_TEA_TASK_SUB", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ throw e;
+ }
+ return _ret;
+ }
+
+ public static ResultObject UpdatePo(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ var _poList = db.TED_PO_MSTR.Where(p => p.TaskID == p_entity.TaskID).ToList();
+ var _scpPolist = new List();
+ foreach (var po in _poList)
+ {
+ var _po = scpdb.TB_PO.SingleOrDefault(p => p.ErpBillNum == po.PurchaseOrder && p.Site == po.Domain);
+ if (_po == null)
+ {
+ int temp;
+ _po = new TB_PO
+ {
+ PoBillNum = po.PurchaseOrder,//订单号
+ ErpBillNum = po.PurchaseOrder,//ERP订单号
+ VendId = po.Supplier,//供应商编号
+ ModType = Int32.TryParse(po.ModeType, out temp) ? temp : (int?)null, //单据类型(1:日程单,2:离散订单)
+ Contacter = po.Contact,//联系人
+ Site = po.Domain,//地点
+ State = (int)FormState.开放,//状态
+ Remark = po.Remark,//说明
+ CreateTime = po.CreateTime == null ? DateTime.Now : (DateTime)po.CreateTime,//创建日期
+ CreateUser = po.CreateUser,//创建用户
+ IsDeleted = false,
+ GUID =po.TaskID,
+ BeginTime = po.OrderDate == null ? DateTime.Now : po.OrderDate,//创建日期
+ EndTime = po.DueDate//收货结束时间
+ };
+ int _count = _scpPolist.Count(p => p.ErpBillNum == po.PurchaseOrder && p.Site == po.Domain );
+ if (_count == 0)
+ {
+ _scpPolist.Add(_po);
+ }
+ }
+ _po.Contacter = po.Contact;
+ _po.Buyer = _po.Buyer;
+ _po.BuyerPhone = _po.BuyerPhone;
+ _po.UpdateTime = _po.UpdateTime;//更新日期
+ _po.UpdateUser = _po.UpdateUser;//更新用户
+ }
+ scpdb.TB_PO.AddOrUpdate(_scpPolist.ToArray());
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "Save_TEA_TASK_SUB", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ throw e;
+ }
+ return _ret;
+ }
+
+ ///
+ /// 更新供应商
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static ResultObject UpdateSupplier(ExchangeCenterContext db, ScpEntities scpdb, AppBoxContext authdb, TEA_TASK_SUB p_entity)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ var _supplierlist = db.TES_SUPPLIER.Where(p => p.TaskID == p_entity.TaskID).ToList();
+ var _venderlist = new List();
+ foreach (var supplier in _supplierlist)
+ {
+ var _supplier = scpdb.TA_VENDER.SingleOrDefault(p => p.VendId == supplier.SupplierCode );
+ if (_supplier == null)
+ {
+ _supplier = new TA_VENDER
+ {
+ VendId = supplier.SupplierCode.ToUpper(),
+ VendAbbCode = "0",
+ State = 1,
+ };
+ }
+ _supplier.VendName = string.IsNullOrEmpty(supplier.SupplierName) ? supplier.SupplierName : supplier.SupplierName;//供应商名称
+ //_supplier.VendType = supplier.SupplierType.ToUpper().ToString();//供应商类型
+ //_supplier.Country = supplier.Country;//国家
+ //_supplier.City = supplier.City;//城市
+ //_supplier.Currency = supplier.Currency.ToUpper();//币总
+ //_supplier.Address = supplier.Address1 + supplier.Address2 + supplier.Address3;//地址
+ //_supplier.ZipCode = supplier.ZipCode.ToString();//邮编
+ //_supplier.Contacter = supplier.ContactName;//联系人
+ //_supplier.Phone = supplier.Telephone.ToString();//电话
+ //_supplier.Fax = supplier.Fax.ToString();//传真
+ //_supplier.SubSite = string.IsNullOrEmpty(supplier.Site)?"BJ01" : supplier.Site;//域
+ _supplier.Site = string.IsNullOrEmpty(supplier.Domain)?"BJBMPT": supplier.Domain;//域
+ //_supplier.Tax = Convert.ToDecimal(supplier.TaxInCity);//税率
+
+ _supplier.Remark = supplier.TaskID.ToString();//任务ID
+
+ var vendname = string.Format("{0}@{1}",_supplier.VendId.ToUpper(), _supplier.Site.ToUpper());
+ var _first = authdb.Users.Where(p => p.Name == vendname).FirstOrDefault();
+ var _vend = authdb.Roles.Where(p => p.Name == "供应商").FirstOrDefault();
+ var _factory = authdb.TA_FACTORY.Where(p => p.ErpDomain == _supplier.Site.ToUpper()).FirstOrDefault();
+ if (_first == null && _vend != null && _factory != null)
+ {
+ User _entity = new User();
+ _entity.Name = vendname;
+ _entity.Remark = _supplier.Site.ToUpper();
+ _entity.Password = PasswordUtil.CreateDbPassword("666666");
+ _entity.ChineseName = _supplier.VendName;
+ _entity.Email = _supplier + "@163.com";
+ _entity.Gender = "男";
+ _entity.Enabled = true;
+
+ _entity.Roles = new List();
+
+ Role t = authdb.Set().Local.Where(x => x.ID == _vend.ID).FirstOrDefault();
+ if (t == null)
+ {
+ t = new Role { ID = _vend.ID };
+ authdb.Set().Attach(t);
+ }
+ _entity.Roles.Add(t);
+
+ _entity.TA_FACTORY = new List();
+
+ TA_FACTORY f = authdb.Set().Local.Where(x => x.ID == _factory.ID).FirstOrDefault();
+ if (f == null)
+ {
+ f = new TA_FACTORY { ID = _factory.ID };
+ authdb.Set().Attach(f);
+ }
+ _entity.TA_FACTORY.Add(f);
+
+ authdb.Users.Add(_entity);
+
+ }
+
+
+ _venderlist.Add(_supplier);
+ }
+ scpdb.TA_VENDER.AddOrUpdate(_venderlist.ToArray());
+ _ret.State = ReturnStatus.Succeed;
+ _ret.MessageList.Add(string.Format("更新表{0}任务ID{1}成功!", "TES_SUPPLIER", p_entity.TaskID));
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateSupplier", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ throw e;
+ }
+ return _ret;
+ }
+ ///
+ /// 更新供应商零件
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static ResultObject UpdateSupplierPart(DataCenterContext dc, ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ var _supplierpartlist = db.TES_SUPPLIER_PART.Where(p => p.TaskID == p_entity.TaskID).ToList();
+ var _venderpartlist = new List();
+ decimal _packqty = 1;
+ foreach (var supplierpart in _supplierpartlist)
+ {
+ var _supplierpart = scpdb.TA_VEND_PART.SingleOrDefault(p => p.VendId == supplierpart.Supplier && p.PartCode == supplierpart.PartCode && p.VendPartCode == supplierpart.SupplierPart && p.Site == supplierpart.Domain );
+ if (_supplierpart == null)
+ {
+ var _pack = dc.TS_PACK.SingleOrDefault(p => p.PartCode == supplierpart.PartCode && p.Site == supplierpart.Domain && p.Site == supplierpart.Site);
+ if (_pack != null)
+ {
+ }
+ _supplierpart = new TA_VEND_PART
+ {
+ VendId = supplierpart.Supplier.ToUpper(),//供应商编号
+ PartCode = supplierpart.PartCode.ToUpper(),//对应物料号
+ VendPartCode = supplierpart.SupplierPart.ToUpper(),//供应商物料号
+ VendPackQty = _packqty,//供应商物料号
+ State = 1,//状态(0:失效 1:有效)
+ Remark = "",
+ CreateTime = supplierpart.CreateTime == null ? DateTime.Now : (DateTime)supplierpart.CreateTime,//创建日期
+ CreateUser = supplierpart.CreateUser,//创建用户
+ TransportationTime = 1,
+ IsDeleted = false,
+ GUID = new Guid()
+ };
+ }
+ _supplierpart.Site = string.IsNullOrEmpty(_supplierpart.Site) ? supplierpart.Domain : _supplierpart.Site;
+ //_supplierpart.SubSite = string.IsNullOrEmpty(_supplierpart.SubSite) ? supplierpart.Site : _supplierpart.SubSite;
+ _supplierpart.VendPartCode = supplierpart.SupplierPart?.ToUpper() ?? supplierpart.PartCode.ToUpper();
+ _supplierpart.VendPackQty = _packqty;
+ _supplierpart.TransportationTime = 1;
+ _supplierpart.UpdateTime = DateTime.Now;//更新日期
+ _supplierpart.UpdateUser = supplierpart.CreateUser;//更新用户
+ _supplierpart.Remark = supplierpart.TaskID.ToString();//任务ID
+ _venderpartlist.Add(_supplierpart);
+ }
+ scpdb.TA_VEND_PART.AddOrUpdate(_venderpartlist.ToArray());
+ _ret.State = ReturnStatus.Succeed;
+ _ret.MessageList.Add(string.Format("更新表{0}任务ID{1}成功!", "TES_SUPPLIER_PART", p_entity.TaskID));
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateSupplierPart", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ throw e;
+ }
+ return _ret;
+ }
+ ///
+ /// 更新零件
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static ResultObject UpdatePart(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ var _partmstrlist = db.TES_PART_MSTR.Where(p => p.TaskID == p_entity.TaskID).ToList();
+ var _partlist = new List();
+ foreach (var part in _partmstrlist)
+ {
+ var _part = scpdb.TA_PART.SingleOrDefault(p => p.PartCode == part.PartCode && p.Site == part.Domain );
+ if (_part == null)
+ {
+ _part = new TA_PART
+ {
+ PartCode = part.PartCode.ToUpper(),
+ ErpPartCode = part.PartCode.ToUpper(),
+ };
+ }
+ _part.PartDesc1 = part.Desc1;
+ _part.PartDesc2 = string.IsNullOrEmpty(part.Desc2)?string.Empty: part.Desc2;
+ if (!string.IsNullOrEmpty(part.Group))
+ {
+ _part.ProjectId = part.Group;
+ }
+ else
+ {
+ _part.ProjectId ="public";
+
+ }
+ _part.Unit = !string.IsNullOrEmpty(part.Um) ? part.Um.ToUpper() : "EA";
+
+ _part.State = part.Status;
+ if (part.InspectType != null)
+ {
+ _part.Ischeck = (part.InspectType == 0) ? true : false;
+ }
+
+ if (!string.IsNullOrEmpty(part.PartType))
+ {
+ if (part.PartType.Substring(0, 2) == "12")
+ {
+ _part.PartGroup = "AST";
+ }
+ else
+ {
+ _part.PartGroup = "其他";
+ }
+ }
+ _part.Qlevel = string.IsNullOrEmpty(part.Qgrade)?string.Empty: part.Qgrade;
+ _part.State = part.Status;
+ _part.Site = part.Domain;
+ // _part.SubSite = part.Site;
+ _part.Remark = part.TaskID.ToString();
+ _partlist.Add(_part);
+ }
+
+ var str= JsonHelper.GetJson>(_partlist);
+
+ scpdb.TA_PART.AddOrUpdate(_partlist.ToArray());
+ _ret.State = ReturnStatus.Succeed;
+ _ret.MessageList.Add(string.Format("更新表{0}任务ID{1}成功!", "TES_PART_MSTR", p_entity.TaskID));
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdatePart", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ throw e;
+ }
+ return _ret;
+ }
+
+ public static ResultObject UpdateFactory(ExchangeCenterContext db, ScpEntities scpdb, AppBoxContext appscpdb, TEA_TASK_SUB p_entity)
+ {
+ ResultObject _ret = new ResultObject();
+ try
+ {
+ var _factorylist = db.TES_SITE.Where(p => p.TaskID == p_entity.TaskID).ToList();
+ var _appboxfactorylist = new List();
+ var _scpfactorylist = new List();
+ foreach(var factory in _factorylist)
+ {
+ var item1 = appscpdb.TA_FACTORY.SingleOrDefault(p => p.ErpDomain == factory.Domain && p.ErpSite == factory.Site);
+ if (item1 == null)
+ {
+ item1 = new TA_FACTORY
+ {
+ ErpDomain = factory.Domain,
+ ErpSite = factory.Site,
+ GUID = Guid.NewGuid(),
+ State = 1,
+ CreateTime = DateTime.Now,
+ CreateUser= factory.CreateUser
+ };
+ }
+ item1.FactoryId = factory.Domain;
+ item1.ZipCode = factory.Domain;
+ item1.FactoryName = factory.Desc;
+ item1.Address = "";
+ item1.Remark = factory.Remark;
+ item1.Tel = "";
+ item1.Fax = "";
+ item1.UpdateTime = DateTime.Now;
+ item1.UpdateUser = factory.CreateUser;
+ _appboxfactorylist.Add(item1);
+ var item2 = scpdb.TB_FACTORY.SingleOrDefault(p => p.ErpDomain == factory.Domain && p.ErpSite == factory.Site);
+ if (item2 == null)
+ {
+ item2 = new TB_FACTORY
+ {
+ ErpDomain = factory.Domain,
+ ErpSite = factory.Site,
+ GUID = Guid.NewGuid(),
+ State = 1,
+ CreateTime = DateTime.Now,
+ CreateUser = factory.CreateUser
+ };
+ }
+ item2.FactoryId = factory.Domain;
+ item2.ZipCode = factory.Domain;
+ item2.FactoryName = factory.Desc;
+ item2.Address = "";
+ item2.Remark = factory.Remark;
+ item2.Tel = "";
+ item2.Fax = "";
+ item2.UpdateTime = DateTime.Now;
+ item2.UpdateUser = factory.CreateUser;
+ _scpfactorylist.Add(item2);
+ }
+ appscpdb.TA_FACTORY.AddOrUpdate(_appboxfactorylist.ToArray());
+ scpdb.TB_FACTORY.AddOrUpdate(_scpfactorylist.ToArray());
+ if (appscpdb.SaveChanges() != -1)
+ {
+ _ret.State = ReturnStatus.Succeed;
+ }
+ }
+ catch (Exception e)
+ {
+ _ret.State = ReturnStatus.Failed;
+ LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateFactory", e.Message);
+ _ret.Result = false;
+ _ret.ErrorList.Add(e);
+ throw e;
+ }
+ return _ret;
+ }
+
+
+
+
+ //public static ResultObject UpdateTES_PURCHASE_PRICE(List p_list, string domain, string site, string name, bool flag,int ConfirmState)
+ //{
+
+ // ResultObject _ret = new ResultObject();
+ // if (ConfirmState!=(int)PriceState.FConfirm)
+ // {
+ // _ret.State = ReturnStatus.Succeed;
+ // _ret.Result = true;
+ // return _ret;
+ // }
+ // try
+ // {
+ // ScpEntities scpdb = EntitiesFactory.CreateScpInstance();
+ // ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance();
+ // List _teslist = new List();
+ // var _ls = scpdb.V_TB_PRICE.Where(p => p_list.Contains(p.UID)).ToList();
+
+ // foreach (var _price in _ls)
+ // {
+ // Guid _taskguid = Guid.NewGuid();
+ // TES_PURCHASE_PRICE _item = new TES_PURCHASE_PRICE();
+ // var apiitem = db.TES_PURCHASE_PRICE.Where(p => p.SupplierCode == _price.VendId && p.PartCode == _price.PartCode && p.Domain == _price.Site && p.Site == _price.SubSite && p.Start == _price.StartTime && p.ExpireDate == _price.EndTime).ToList();
+
+ // if (apiitem.Count <= 0)
+ // {
+ // _item.CommandType = "A";//命令类型
+ // _item.DataID = Guid.NewGuid();//DataID
+ // }
+ // else
+ // {
+ // var uid = apiitem.Select(p => p.UID).Max();
+ // var old_item = db.TES_PURCHASE_PRICE.FirstOrDefault(t => t.UID == uid);
+ // _item.CommandType = "U";//命令类型
+ // _item.DataID = old_item.GUID;
+ // }
+ // _item.PartCode = _price.PartCode;//零件编号
+ // _item.Domain = _price.Site;//域
+ // _item.Site = _price.SubSite;//地点
+ // _item.Start = Convert.ToDateTime(_price.StartTime);//开始时间
+ // _item.ExpireDate = Convert.ToDateTime(_price.EndTime);//结束时间
+ // _item.CreateUser = "scp";//_price.CreateUser;//创建人
+ // _item.CreateTime = DateTime.Now;//_price.CreateTime;//创建时间
+ // _item.GUID = Guid.NewGuid();//GUID
+ // _item.PriceList = (_price.VendId + _price.SubSite.Substring(1, 1) + _price.SubSite.Substring(3, 1)).Trim(); //价目表代码
+ // _item.Desc = "";//说明
+ // _item.ProductLine = "";//产品类
+ // _item.Currency = _price.Curr;//货币
+
+
+
+ // var _first = scpdb.TA_PART.Where(itm => itm.PartCode == _price.PartCode).FirstOrDefault();
+ // if (_first != null)
+ // {
+ // _item.Um = _first.Unit;
+ // }
+ // else
+ // {
+
+ // _item.Um = _price.Unit;//单位
+ // }
+
+ // _item.AmountType = "P";//金额类型
+ // _item.Amount = _price.Amt+_price.SharingPrice;//金额(零件单价—+分摊单价)
+ // _item.TaskID = _taskguid;//任务编号
+ // _item.Remark = _price.Remarks;//备注
+ // _item.SupplierCode = _price.VendId;//供应商
+ // _item.VendAmount = _price.Amt;//供应商金额
+ // _teslist.Add(_item);
+ // var ret = CREATE_TEA_TASK_SUB(db, false,
+ // new TEA_TASK_SUB()
+ // {
+ // DataCount = _teslist.Count,
+ // TaskID = _taskguid,
+ // TableName = "TES_PURCHASE_PRICE",
+ // Site = _price.SubSite,
+ // Domain = _price.Site,
+ // CreateTime = DateTime.Now,
+ // CreateUser = name,
+ // Creator = name,
+ // });
+ // }
+ // db.TES_PURCHASE_PRICE.AddOrUpdate(_teslist.ToArray());
+
+ // if (db.SaveChanges() != -1)
+ // {
+ // _ret.State = ReturnStatus.Succeed;
+ // _ret.Result = true;
+ // }
+ // else
+ // {
+ // _ret.State = ReturnStatus.Failed;
+ // _ret.Result = false;
+ // _ret.Message = "数据更新失败!";
+ // }
+ // }
+ // catch (Exception e)
+ // {
+ // _ret.State = ReturnStatus.Failed;
+ // _ret.Result = false;
+ // _ret.Message =e.InnerException.Message;
+ // }
+ // return _ret;
+ //}
+ //public static ResultObject WritePo(List p_order_list, string site, string p_creator, DateTime p_time, BillModType p_modtype, string subsite, string p_chineseName, string p_buyerPhone)
+ //{
+ // ResultObject _ret = new ResultObject();
+ // using (var scope =
+ // new TransactionScope(TransactionScopeOption.Required, new TransactionOptions()
+ // {
+ // IsolationLevel = System.Transactions.IsolationLevel.Serializable,
+ // Timeout = new TimeSpan(0, 20, 0)
+ // }))
+ // {
+ // try
+ // {
+ // ScpEntities scpdb = EntitiesFactory.CreateScpInstance();
+ // ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance();
+ // var OrderList = p_order_list.GroupBy(p => p.订单编号).ToList();
+ // string _polist = "";
+ // int _num = 1;
+ // OrderList.ForEach((p) =>
+ // {
+ // Guid taskid = Guid.NewGuid();
+ // var list = p.ToList();
+ // if (list.Count > 0)
+ // {
+ // #region 日程单
+ // if (p_modtype == BillModType.Contract)
+ // {
+ // var _entity = list.FirstOrDefault();
+ // var _po = scpdb.TB_PO.SingleOrDefault(t => t.PoBillNum == _entity.订单编号/* && t.State == state*/ && t.Site == site && t.SubSite == subsite && t.VendId == _entity.供应商编号.ToUpper());
+ // TED_PO_MSTR _po_mstr = new TED_PO_MSTR();
+ // _po_mstr.GUID = Guid.NewGuid();
+ // _po_mstr.PurchaseOrder = _entity.订单编号.Trim().ToUpper();
+ // _po_mstr.Supplier = _entity.供应商编号.Trim().ToUpper();
+ // _po_mstr.Contact = p_chineseName;// _entity.联系人;
+ // _po_mstr.ShipTo = subsite.Trim().ToUpper();//发往
+ // _po_mstr.OrderDate = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间);
+ // _po_mstr.DueDate = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期);
+ // _po_mstr.StartDate = string.IsNullOrEmpty(_entity.订单开始时间) ? DateTime.Now : DateTime.Parse(_entity.订单开始时间);//订单日期
+ // _po_mstr.EndDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.订单截至日期);
+ // _po_mstr.MadeIn = "";
+ // _po_mstr.Confirm = true;
+ // _po_mstr.Buyer = p_chineseName;//_entity.采购员;
+ // _po_mstr.BuyerPhone = p_buyerPhone;// _entity.采购员电话;
+ // _po_mstr.Status = (int)PoState.Open;
+ // _po_mstr.ScheduledOrder = true;
+ // _po_mstr.CreateUser = p_creator;
+ // _po_mstr.CreateTime = p_time;
+ // _po_mstr.Remark = _entity.备注; ;
+ // _po_mstr.TaskID = taskid;
+ // _po_mstr.Domain = site.Trim().ToUpper();
+ // _po_mstr.ModeType = ((int)p_modtype).ToString();
+ // _po_mstr.Site = subsite.Trim().ToUpper();
+ // _po_mstr.DataID = Guid.NewGuid();
+ // _po_mstr.Pricelist = _entity.供应商编号.ToUpper().Trim() + subsite.Trim().Substring(1, 1) + subsite.Substring(3, 1).Trim();
+ // _po_mstr.Taxclass = _entity.税率;
+ // if (_po != null)
+ // {
+ // _po_mstr.CommandType = "U";
+ // }
+ // else
+ // {
+ // _po = new TB_PO { GUID = Guid.NewGuid(), PoBillNum = _entity.订单编号.ToUpper(), State = (int)PoState.Open, Site = site, SubSite = subsite, VendId = _entity.供应商编号.Trim().ToUpper() };
+ // _po_mstr.CommandType = "A";
+ // }
+ // db.TED_PO_MSTR.Add(_po_mstr);
+
+ // _po.ErpBillNum = _entity.订单编号.Trim().ToUpper();;
+ // _po.ModType = (int)p_modtype;
+ // _po.Contacter = p_chineseName;// _entity.联系人;
+ // _po.Buyer = p_chineseName;// _entity.联系人;
+ // _po.Site = site.Trim().ToUpper();
+ // _po.BuyerPhone = p_buyerPhone;
+ // _po.Remark = _entity.备注;
+ // _po.IsDeleted = false;
+ // _po.CreateTime = DateTime.Now;
+ // _po.CreateUser = p_creator;
+ // _po.BeginTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间);
+ // _po.EndTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.要求到货日期);
+ // _po.Pricelist = _entity.供应商编号.Trim().ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1);
+ // _po.Taxclass = _entity.税率;
+ // scpdb.TB_PO.AddOrUpdate(_po);
+
+ // list.ForEach((itm) =>
+ // {
+
+ // int _poline = Int32.Parse(itm.行号);
+ // var _PO_Detail = scpdb.TB_PO_DETAIL.FirstOrDefault(t => t.PartCode == itm.零件号 && t.PoLine == _poline && t.PoBillNum == itm.订单编号 /*&& t.State == state*/ && t.Site == site && t.SubSite == subsite);
+ // TED_PO_DET _PO_Detail_Det = new TED_PO_DET();
+ // _PO_Detail_Det.GUID = Guid.NewGuid();
+ // _PO_Detail_Det.PurchaseOrder = itm.订单编号.Trim().ToUpper();
+ // _PO_Detail_Det.Line = Int32.Parse(itm.行号);
+ // _PO_Detail_Det.Currency = "CNY";
+ // _PO_Detail_Det.PoType = itm.订单类型;
+ // _PO_Detail_Det.PartCode = itm.零件号.Trim().ToUpper();
+
+ // _PO_Detail_Det.Qty = decimal.Parse(itm.数量);
+ // _PO_Detail_Det.QtyOpen = 0;
+ // _PO_Detail_Det.PackQty = 1;
+ // _PO_Detail_Det.Currency = itm.币种;
+ // _PO_Detail_Det.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价);
+ // var _part = scpdb.TA_PART.FirstOrDefault(part => part.PartCode == itm.零件号.Trim().ToUpper());
+ // if (_part == null)
+ // {
+ // _PO_Detail_Det.PoUm = itm.单位;
+ // _PO_Detail_Det.LocUm = itm.单位;
+ // }
+ // else
+ // {
+ // _PO_Detail_Det.PoUm = _part.Unit;
+ // _PO_Detail_Det.LocUm =_part.Unit;
+ // }
+ // _PO_Detail_Det.Conv = 1;
+ // _PO_Detail_Det.DueDate = string.IsNullOrEmpty(itm.要求到货日期) ? DateTime.Now : DateTime.Parse(itm.要求到货日期);
+ // _PO_Detail_Det.Status = (int)PoState.Open;
+ // _PO_Detail_Det.CreateTime = DateTime.Parse(itm.订单创建时间);
+ // _PO_Detail_Det.StartDate = string.IsNullOrEmpty(itm.零件开始时间) ? p_time : DateTime.Parse(itm.零件开始时间);
+ // _PO_Detail_Det.EndDate = string.IsNullOrEmpty(itm.零件截至日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(itm.零件截至日期);
+ // _PO_Detail_Det.CreateUser = p_creator;
+ // _PO_Detail_Det.TaskID = taskid;
+ // if (_PO_Detail != null)
+ // {
+ // _PO_Detail_Det.CommandType = "U";
+ // }
+ // else
+ // {
+ // _PO_Detail = new TB_PO_DETAIL { GUID = Guid.NewGuid(), PartCode = itm.零件号.Trim().ToUpper(), PoLine = _poline, PoBillNum = itm.订单编号.Trim().ToUpper(), State = (int)PoState.Open, Site = site, SubSite = subsite };
+ // _PO_Detail_Det.CommandType = "A";
+ // }
+ // _PO_Detail_Det.DataID = Guid.NewGuid();
+ // _PO_Detail_Det.Domain = site.Trim().ToUpper();
+ // _PO_Detail_Det.Site = subsite.Trim().ToUpper();
+ // _PO_Detail_Det.Workorderlot = itm.加工单号;
+ // _PO_Detail_Det.PoType = itm.订单类型;
+ // _PO_Detail_Det.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序);
+ // _PO_Detail_Det.Location = itm.库位;
+ // _PO_Detail_Det.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数);
+ // _PO_Detail_Det.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数);
+ // _PO_Detail_Det.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数);
+ // _PO_Detail_Det.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数);
+ // _PO_Detail_Det.Supplieritem = itm.供应商零件;
+ // _PO_Detail_Det.Dliverypatterncode = itm.发货样式;
+ // _PO_Detail_Det.Deliverytimecode = itm.发货时间样式;
+ // _PO_Detail_Det.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期);
+ // _PO_Detail_Det.Pricelist = _entity.供应商编号.Trim().ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1);
+ // db.TED_POD_DET.Add(_PO_Detail_Det);
+ // _PO_Detail.Currency = "CNY";
+ // _PO_Detail.PoUnit = itm.单位;
+ // _PO_Detail.CreateTime = DateTime.Now;
+ // _PO_Detail.CreateUser = p_creator;
+ // _PO_Detail.BeginTime = string.IsNullOrEmpty(itm.订单创建时间) ? DateTime.Now : DateTime.Parse(itm.订单创建时间);
+ // _PO_Detail.EndTime = string.IsNullOrEmpty(itm.要求到货日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(itm.要求到货日期);
+ // _PO_Detail.PlanQty = decimal.Parse(itm.数量);
+ // _PO_Detail.IsDeleted = false;
+ // _PO_Detail.LocUnit = itm.单位;
+ // _PO_Detail.PoUnit = itm.单位;
+ // _PO_Detail.UnConv = 1;
+ // _PO_Detail.Remark = itm.备注;
+ // _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价);
+ // _PO_Detail.Workorderlot = string.IsNullOrEmpty(itm.加工单号) ? 0 : int.Parse(itm.加工单号);
+ // _PO_Detail.PoType =itm.订单类型;
+ // _PO_Detail.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序);
+ // _PO_Detail.Location = itm.库位;
+ // _PO_Detail.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数);
+ // _PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数);
+ // _PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数);
+ // _PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数);
+ // _PO_Detail.Supplieritem = itm.供应商零件;
+ // _PO_Detail.Dliverypatterncode = itm.发货样式;
+ // _PO_Detail.Deliverytimecode = itm.发货时间样式;
+ // _PO_Detail.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期);
+ // scpdb.TB_PO_DETAIL.AddOrUpdate(_PO_Detail);
+ // });
+ // _polist = _polist + _po.PoBillNum + ",";
+ // }
+ // #endregion
+ // #region 离散单 (离散单只增加不修改)
+ // if (p_modtype == BillModType.Non_Contract)
+ // {
+ // var _entity = list.FirstOrDefault();
+ // TB_PO _po = new TB_PO();
+ // _po.GUID = Guid.NewGuid();
+ // _po.PoBillNum = SCP_BILLCODE_CONTROLLER.MakePoNum(_num);
+ // _po.State = (int)PoState.Open;
+ // _po.Site = site.Trim().ToUpper();
+ // _po.SubSite = subsite.Trim().ToUpper();
+ // _po.VendId = _entity.供应商编号.Trim().ToUpper();
+ // _po.ErpBillNum = _po.PoBillNum;
+ // _po.ModType = (int)p_modtype;
+ // _po.Contacter = p_chineseName;// _entity.联系人;
+ // _po.Buyer = p_chineseName;// _entity.联系人;
+ // _po.BuyerPhone = p_buyerPhone;
+ // _po.Site = site.Trim().ToUpper();
+ // _po.Remark = _entity.备注;
+ // _po.IsDeleted = false;
+ // _po.CreateTime = DateTime.Now;
+ // _po.CreateUser = p_creator;
+ // _po.BeginTime = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间);
+ // _po.EndTime = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.要求到货日期);
+ // _po.Pricelist = _entity.供应商编号.ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1);
+ // _po.Taxclass = _entity.税率;
+ // scpdb.TB_PO.AddOrUpdate(_po);
+ // TB_ASK _ask = new TB_ASK();
+ // _ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCode_BJBQ(_num);
+ // _ask.GUID = Guid.NewGuid();
+ // _ask.PoBillNum = _po.PoBillNum;
+ // _ask.VendId = _entity.供应商编号.Trim().ToUpper();
+ // _ask.IsDeleted = false;
+ // _ask.CreateTime = DateTime.Now;
+ // _ask.CreateUser = p_creator;
+ // _ask.Site = site.Trim().ToUpper();
+ // _ask.ReceivedPort = "";//交货口
+ // _ask.State = (int)AskState.New;
+ // _ask.Remark = _entity.备注;
+ // _ask.ModType = (int)p_modtype;
+ // _ask.ErpBillNum = _po.PoBillNum;
+ // _ask.BeginTime = p_time;
+ // _ask.EndTime = DateTime.Parse(_entity.要求到货日期);
+ // _ask.Buyer = p_chineseName;
+ // _ask.BuyerPhone = p_buyerPhone;
+ // _ask.SubSite = subsite;
+ // scpdb.TB_ASK.Add(_ask);
+ // TED_PO_MSTR _po_mstr = new TED_PO_MSTR();
+ // _po_mstr.GUID = Guid.NewGuid();
+
+ // _po_mstr.PurchaseOrder = _po.PoBillNum;
+ // _po_mstr.Supplier = _entity.供应商编号.Trim().ToUpper();
+ // _po_mstr.Contact = p_chineseName;// _entity.联系人;
+ // _po_mstr.ShipTo = subsite.Trim().ToUpper();//发往
+ // _po_mstr.OrderDate = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间);
+ // _po_mstr.DueDate = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期);
+ // _po_mstr.StartDate = string.IsNullOrEmpty(_entity.订单开始时间) ? DateTime.Now : DateTime.Parse(_entity.订单开始时间);//订单日期
+ // _po_mstr.EndDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.订单截至日期);
+ // _po_mstr.MadeIn = "";
+ // _po_mstr.Confirm = true;
+ // _po_mstr.Buyer = p_chineseName;// _entity.采购员;
+ // _po_mstr.BuyerPhone = p_buyerPhone;// _entity.采购员电话;
+ // _po_mstr.Status = (int)PoState.Open;
+ // _po_mstr.ScheduledOrder = false;
+ // _po_mstr.CreateUser = p_creator;
+ // _po_mstr.CreateTime = p_time;
+ // _po_mstr.Remark = _entity.备注; ;
+ // _po_mstr.TaskID = taskid;
+ // _po_mstr.CommandType = "A";
+ // _po_mstr.Domain = site.Trim().ToUpper();
+ // _po_mstr.ModeType = ((int)p_modtype).ToString();
+ // _po_mstr.Site = subsite.Trim().ToUpper();
+ // _po_mstr.DataID = Guid.NewGuid();
+ // _po_mstr.Pricelist = _entity.供应商编号.ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1);
+ // _po_mstr.Taxclass = _entity.税率;
+ // db.TED_PO_MSTR.Add(_po_mstr);
+ // int _number = 1;
+ // list.ForEach((itm) =>
+ // {
+ // TB_PO_DETAIL _PO_Detail = new TB_PO_DETAIL();
+ // _PO_Detail.GUID = Guid.NewGuid();
+ // _PO_Detail.PartCode = itm.零件号.Trim().ToUpper();
+ // _PO_Detail.PoLine = _number;
+ // _PO_Detail.PoBillNum = _po.PoBillNum;
+ // _PO_Detail.State = (int)PoState.Open;
+ // _PO_Detail.Site = site.Trim().ToUpper();
+ // _PO_Detail.SubSite = subsite.Trim().ToUpper();
+ // _PO_Detail.Currency = "CNY";
+ // _PO_Detail.PoUnit = itm.单位;
+ // _PO_Detail.Remark = itm.备注;
+ // _PO_Detail.CreateTime = DateTime.Now;
+ // _PO_Detail.CreateUser = p_creator;
+ // _PO_Detail.BeginTime = string.IsNullOrEmpty(itm.订单创建时间) ? DateTime.Now : DateTime.Parse(itm.订单创建时间);
+ // _PO_Detail.EndTime = string.IsNullOrEmpty(itm.要求到货日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(itm.要求到货日期);
+ // _PO_Detail.PlanQty = decimal.Parse(itm.数量);
+ // _PO_Detail.IsDeleted = false;
+ // _PO_Detail.LocUnit = itm.单位;
+ // _PO_Detail.PoUnit = itm.单位;
+ // _PO_Detail.UnConv = 1;
+ // _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价);
+ // _PO_Detail.Workorderlot = string.IsNullOrEmpty(itm.加工单号) ? 0 : int.Parse(itm.加工单号);
+ // _PO_Detail.PoType = itm.订单类型;
+ // _PO_Detail.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序);
+ // _PO_Detail.Location = itm.库位;
+ // _PO_Detail.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数);
+ // _PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数);
+ // _PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数);
+ // _PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数);
+ // _PO_Detail.Supplieritem = itm.供应商零件;
+ // _PO_Detail.Dliverypatterncode = itm.发货样式;
+ // _PO_Detail.Deliverytimecode = itm.发货时间样式;
+ // _PO_Detail.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期);
+ // _PO_Detail.TempQty = decimal.Parse(itm.数量);
+ // TB_ASK_DETAIL _tDetail = new TB_ASK_DETAIL();
+ // _tDetail.Remark = itm.备注;
+ // _tDetail.PoBillNum = _po.PoBillNum;
+ // _tDetail.AskBillNum = _ask.AskBillNum;
+ // _tDetail.PoLine = _number;
+ // _tDetail.PoUnit = itm.单位;
+ // _tDetail.CreateTime = DateTime.Now;
+ // _tDetail.CreateUser = p_creator;
+ // _tDetail.PartCode = itm.零件号.ToUpper();
+ // _tDetail.ReceivedPort = "";
+ // _tDetail.BeginTime = p_time;
+ // _tDetail.EndTime = Convert.ToDateTime(itm.要求到货日期);
+ // _tDetail.TempQty = 0;
+ // _tDetail.AskQty = Decimal.Parse(itm.数量);
+ // _tDetail.IsDeleted = false;
+ // _tDetail.LocUnit = itm.单位;
+ // _tDetail.UnConv = 1;
+ // _tDetail.State = (int)PoState.Open;
+ // _tDetail.SubSite = subsite.Trim().ToUpper();
+ // _tDetail.Site = site.Trim().ToUpper();
+ // _tDetail.Price = Decimal.Parse(itm.单价);
+ // _tDetail.GUID = Guid.NewGuid();
+ // _tDetail.Currency = itm.币种;
+ // scpdb.TB_ASK_DETAIL.Add(_tDetail);
+ // scpdb.TB_PO_DETAIL.AddOrUpdate(_PO_Detail);
+ // TED_PO_DET _PO_Detail_Det = new TED_PO_DET();
+ // _PO_Detail_Det.GUID = Guid.NewGuid();
+ // _PO_Detail_Det.PurchaseOrder = _po.PoBillNum;
+ // _PO_Detail_Det.Line = _number;
+ // _PO_Detail_Det.Currency = "CNY";
+ // _PO_Detail_Det.PoType = itm.订单类型;
+ // _PO_Detail_Det.PartCode = itm.零件号.Trim().ToUpper();
+ // _PO_Detail_Det.Qty = decimal.Parse(itm.数量);
+ // _PO_Detail_Det.QtyOpen = 0;
+ // _PO_Detail_Det.PackQty = 1;
+ // _PO_Detail_Det.Currency = itm.币种;
+ // _PO_Detail_Det.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价);
+ // _PO_Detail_Det.PoUm = itm.单位;
+ // _PO_Detail_Det.LocUm = itm.单位;
+ // _PO_Detail_Det.Conv = 1;
+ // _PO_Detail_Det.DueDate = string.IsNullOrEmpty(itm.要求到货日期) ? DateTime.Now : DateTime.Parse(itm.要求到货日期);
+ // _PO_Detail_Det.Status = (int)PoState.Open;
+ // _PO_Detail_Det.CreateTime = DateTime.Parse(itm.订单创建时间);
+ // _PO_Detail_Det.StartDate = string.IsNullOrEmpty(itm.零件开始时间) ? p_time : DateTime.Parse(itm.零件开始时间);
+ // _PO_Detail_Det.EndDate = string.IsNullOrEmpty(itm.零件截至日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(itm.零件截至日期);
+ // _PO_Detail_Det.CreateUser = p_creator;
+ // _PO_Detail_Det.TaskID = taskid;
+ // _PO_Detail_Det.CommandType = "A";
+ // _PO_Detail_Det.DataID = Guid.NewGuid();
+ // _PO_Detail_Det.Domain = site.Trim().ToUpper();
+ // _PO_Detail_Det.Site = subsite.Trim().ToUpper();
+ // _PO_Detail_Det.Workorderlot = itm.加工单号;
+ // _PO_Detail_Det.PoType = itm.订单类型;
+ // _PO_Detail_Det.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序);
+ // _PO_Detail_Det.Location = itm.库位;
+ // _PO_Detail_Det.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数);
+ // _PO_Detail_Det.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数);
+ // _PO_Detail_Det.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数);
+ // _PO_Detail_Det.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数);
+ // _PO_Detail_Det.Supplieritem = itm.供应商零件;
+ // _PO_Detail_Det.Dliverypatterncode = itm.发货样式;
+ // _PO_Detail_Det.Deliverytimecode = itm.发货时间样式;
+ // _PO_Detail_Det.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期);
+ // _PO_Detail_Det.Pricelist = _entity.供应商编号.ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1);
+ // db.TED_POD_DET.Add(_PO_Detail_Det);
+ // _number++;
+ // });
+ // _polist = _polist + _po.PoBillNum + ",";
+ // }
+ // #endregion
+ // }
+ // var ret = CREATE_TEA_TASK_SUB(db, true, new TEA_TASK_SUB()
+ // {
+ // DataCount = 1,
+ // TaskID = taskid,
+ // TableName = "TED_PO_MSTR",
+ // Site = subsite.Trim().ToUpper(),
+ // Domain = site.Trim().ToUpper(),
+ // CreateTime = p_time,
+ // CreateUser = p_creator,
+ // Creator = "SCP",
+ // });
+ // _num++;
+ // Thread.Sleep(10);
+ // }
+ // );
+ // EntitiesFactory.SaveDb(scpdb);
+ // EntitiesFactory.SaveDb(db);
+ // scope.Complete();
+ // _ret.State = ReturnStatus.Succeed;
+ // _ret.Result = true;
+ // _ret.Message= _polist;
+
+ // }
+ // catch (Exception e)
+ // {
+ // _ret.State = ReturnStatus.Failed;
+ // LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "InsterPo", e.Message);
+ // _ret.Result = false;
+ // _ret.Message = e.InnerException.Message;
+ // scope.Dispose();
+
+ // }
+ // }
+ // return _ret;
+ //}
+ //public static ResultObject InsterPo(List p_order_list, string site, string p_creator, DateTime p_time, BillModType p_modtype, string subsite)
+ //{
+ // ScpEntities scpdb = EntitiesFactory.CreateScpInstance();
+ // ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance();
+ // ResultObject _ret = new ResultObject();
+
+ // try
+ // {
+ // var OrderList = p_order_list.GroupBy(p => p.订单编号).ToList();
+ // OrderList.ForEach((p) =>
+ // {
+ // Guid taskid = Guid.NewGuid();
+ // var list = p.ToList();
+ // if (list.Count > 0)
+ // {
+ // var _entity = list.FirstOrDefault();
+ // // int state = (int)PoState.Open;
+ // var update_po = scpdb.TB_PO.FirstOrDefault(t => t.PoBillNum == _entity.订单编号/* && t.State == state*/ && t.Site == site && t.SubSite == subsite && t.VendId == _entity.供应商编号.ToUpper());
+
+ // TED_PO_MSTR _po = new TED_PO_MSTR();
+ // _po.GUID = Guid.NewGuid();
+ // _po.PurchaseOrder = _entity.订单编号;
+ // _po.Supplier = _entity.供应商编号.ToUpper();
+ // _po.Contact = _entity.联系人;
+ // _po.ShipTo = subsite.Trim().ToUpper();//发往
+ // _po.OrderDate = string.IsNullOrEmpty(_entity.订单创建时间) ? DateTime.Now : DateTime.Parse(_entity.订单创建时间);
+ // _po.DueDate = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期);
+ // _po.StartDate = string.IsNullOrEmpty(_entity.订单开始时间) ? DateTime.Now : DateTime.Parse(_entity.订单开始时间);//订单日期
+ // _po.EndDate = string.IsNullOrEmpty(_entity.订单截至日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.订单截至日期);
+ // _po.MadeIn = "";
+ // _po.Confirm = true;
+ // _po.Buyer = _entity.采购员;
+ // _po.BuyerPhone = _entity.采购员电话;
+ // _po.Status = (int)PoState.Open;
+ // if (p_modtype == BillModType.Contract)
+ // {
+ // _po.ScheduledOrder = true;
+ // }
+ // else
+ // {
+ // _po.ScheduledOrder = false;
+ // }
+ // _po.CreateUser = p_creator;
+ // _po.CreateTime = p_time;
+ // _po.Remark = _entity.备注; ;
+ // _po.TaskID = taskid;
+ // if (update_po != null)
+ // {
+ // _po.CommandType = "U";
+ // }
+ // else
+ // {
+ // _po.CommandType = "A";
+ // }
+ // _po.Domain = site.Trim().ToUpper();
+ // _po.ModeType = ((int)p_modtype).ToString();
+ // _po.Site = subsite.Trim().ToUpper();
+ // _po.DataID = Guid.NewGuid();
+ // _po.Pricelist = _entity.供应商编号 + subsite.Substring(1, 1) + subsite.Substring(3, 1);
+ // _po.Taxclass = _entity.税率;
+ // db.TED_PO_MSTR.Add(_po);
+ // list.ForEach((itm) =>
+ // {
+ // int _poline = Int32.Parse(itm.行号);
+ // var update_po_detail = scpdb.TB_PO_DETAIL.FirstOrDefault(t => t.PartCode == itm.零件号 && t.PoLine == _poline && t.PoBillNum == itm.订单编号 /*&& t.State == state*/ && t.Site == site && t.SubSite == subsite);
+ // TED_PO_DET _PO_Detail = new TED_PO_DET();
+ // _PO_Detail.GUID = Guid.NewGuid();
+ // _PO_Detail.PurchaseOrder = itm.订单编号;
+ // _PO_Detail.Line = Int32.Parse(itm.行号);
+ // _PO_Detail.Currency = "CNY";
+ // _PO_Detail.PoType = itm.订单类型;
+ // _PO_Detail.PartCode = itm.零件号.ToUpper();
+ // _PO_Detail.Qty = decimal.Parse(itm.数量);
+ // _PO_Detail.QtyOpen = 0;
+ // _PO_Detail.PackQty = 1;
+ // _PO_Detail.Currency = itm.币种;
+ // _PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价);
+ // _PO_Detail.PoUm = itm.单位;
+ // _PO_Detail.LocUm = itm.单位;
+ // _PO_Detail.Conv = 1;
+ // _PO_Detail.DueDate = string.IsNullOrEmpty(_entity.要求到货日期) ? DateTime.Now : DateTime.Parse(_entity.要求到货日期);
+ // _PO_Detail.Status = (int)PoState.Open;
+ // _PO_Detail.CreateTime = DateTime.Parse(itm.订单创建时间);
+ // _PO_Detail.StartDate = string.IsNullOrEmpty(_entity.零件开始时间) ? p_time : DateTime.Parse(_entity.零件开始时间);
+ // _PO_Detail.EndDate = string.IsNullOrEmpty(_entity.零件截至日期) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.零件截至日期);
+ // _PO_Detail.CreateUser = p_creator;
+ // _PO_Detail.TaskID = taskid;
+ // if (update_po_detail != null)
+ // {
+ // _PO_Detail.CommandType = "U";
+ // }
+ // else
+ // {
+ // _PO_Detail.CommandType = "A";
+ // }
+ // _PO_Detail.DataID = Guid.NewGuid();
+ // _PO_Detail.Domain = site.Trim().ToUpper();
+ // _PO_Detail.Site = subsite.Trim().ToUpper();
+ // _PO_Detail.Workorderlot = itm.加工单号;
+ // _PO_Detail.PoType = itm.订单类型;
+ // _PO_Detail.Operation = string.IsNullOrEmpty(itm.工序) ? 0 : int.Parse(itm.工序);
+ // _PO_Detail.Location = itm.库位;
+ // _PO_Detail.Firmdays = string.IsNullOrEmpty(itm.固定天数) ? 7 : int.Parse(itm.固定天数);
+ // _PO_Detail.Scheduledays = string.IsNullOrEmpty(itm.日程天数) ? 7 : int.Parse(itm.日程天数);
+ // _PO_Detail.Scheduleweeks = string.IsNullOrEmpty(itm.日程周数) ? 2 : int.Parse(itm.日程周数);
+ // _PO_Detail.Schedulemonth = string.IsNullOrEmpty(itm.日程月数) ? 1 : int.Parse(itm.日程月数);
+ // _PO_Detail.Supplieritem = itm.供应商零件;
+ // _PO_Detail.Dliverypatterncode = itm.发货样式;
+ // _PO_Detail.Deliverytimecode = itm.发货时间样式;
+ // _PO_Detail.Transportdays = string.IsNullOrEmpty(itm.运输周期) ? 0 : int.Parse(itm.运输周期);
+ // _PO_Detail.Pricelist = _entity.供应商编号 + subsite.Substring(1, 1) + subsite.Substring(3, 1);
+ // db.TED_POD_DET.Add(_PO_Detail);
+ // });
+
+ // }
+ // var ret = CREATE_TEA_TASK_SUB(db, true ,new TEA_TASK_SUB()
+ // {
+ // DataCount = 1,
+ // TaskID = taskid,
+ // TableName = "TED_PO_MSTR",
+ // Site = subsite.Trim().ToUpper(),
+ // Domain = site.Trim().ToUpper(),
+ // CreateTime = p_time,
+ // CreateUser = p_creator,
+ // Creator = "SCP",
+ // });
+ // });
+
+ // if (db.SaveChanges() != -1)
+ // {
+ // _ret.State = ReturnStatus.Succeed;
+ // _ret.Result = true;
+ // }
+ // else
+ // {
+ // _ret.State = ReturnStatus.Failed;
+ // _ret.Result = false;
+ // _ret.Message = "数据更新失败!";
+ // }
+ // }
+ // catch (Exception e)
+ // {
+ // _ret.State = ReturnStatus.Failed;
+ // LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "InsterPo", e.Message);
+ // _ret.Result = false;
+ // _ret.Message = e.InnerException.Message;
+ // //throw e;
+ // }
+ // return _ret;
+ //}
+
+ //public static ResultObject UpdatePo(List p_po_list, string site, string p_creator, DateTime p_time, string subsite)
+ //{
+ // ScpEntities scpdb = EntitiesFactory.CreateScpInstance();
+ // ExchangeCenterContext db = EntitiesFactory.CreateExchangeCenterInstance();
+ // ResultObject _ret = new ResultObject();
+ // try
+ // {
+ // foreach(var _num in p_po_list)
+ // {
+ // Guid taskid = Guid.NewGuid();
+ // TED_PO_MSTR item = new TED_PO_MSTR();
+
+ // var _mstr = scpdb.TB_PO.FirstOrDefault(t => t.PoBillNum == _num && t.State == (int)PoState.Open);
+ // if (_mstr!= null)
+ // {
+ // // var uid = oldpolist.Select(p => p.UID).Max();
+ // // var _mstr = db.TED_PO_MSTR.FirstOrDefault(t => t.UID == uid);
+
+ // var oldpodetaillist = scpdb.TB_PO_DETAIL.Where(q => q.PoBillNum == _num && q.State == (int)PoState.Open).ToList() ;
+ // item.CommandType = "U";
+ // item.GUID = Guid.NewGuid();
+ // item.DataID = _mstr.GUID;
+ // item.Status = (int)PoState.Close;
+ // item.TaskID = taskid;
+
+ // item.PurchaseOrder = _mstr.PoBillNum;
+ // item.Supplier = _mstr.VendId;
+ // item.Contact = _mstr.Buyer;
+ // item.ShipTo = _mstr.SubSite;//发往
+ // item.OrderDate = _mstr.CreateTime;//订单日期
+ // item.DueDate = Convert.ToDateTime(_mstr.EndTime);
+ // item.StartDate = _mstr.CreateTime;//订单日期
+ // item.EndDate =Convert.ToDateTime( _mstr.EndTime);
+ // item.MadeIn = "";
+ // item.Confirm = true;
+ // item.Buyer = _mstr.Buyer;
+ // item.BuyerPhone = _mstr.BuyerPhone;
+ // item.ScheduledOrder = _mstr.ModType==1?true:false;
+ // item.CreateUser = _mstr.CreateUser;
+ // item.CreateTime = _mstr.CreateTime;
+ // item.Remark = "订单关闭" ;
+ // item.Domain = _mstr.Site;
+ // item.ModeType = _mstr.ModType.ToString();
+ // item.Site = _mstr.SubSite;
+ // item.Pricelist = _mstr.Pricelist;
+ // item.Taxclass = _mstr.Taxclass;
+ // db.TED_PO_MSTR.Add(item);
+ // if (oldpodetaillist.Count > 0)
+ // {
+ // foreach (var po_detail in oldpodetaillist)
+ // {
+ // TED_PO_DET _PO_Detail = new TED_PO_DET();
+ // _PO_Detail.GUID = Guid.NewGuid();
+ // _PO_Detail.PurchaseOrder = po_detail.PoBillNum;
+ // _PO_Detail.Line = po_detail.PoLine;
+ // _PO_Detail.Currency = po_detail.Currency;
+ // _PO_Detail.PoType = po_detail.PoType;
+ // _PO_Detail.PartCode = po_detail.PartCode.ToUpper();
+ // _PO_Detail.Qty = po_detail.PlanQty;
+ // _PO_Detail.QtyOpen = po_detail.ShippedQty;
+ // _PO_Detail.PackQty = po_detail.PackQty;
+ // _PO_Detail.Currency = po_detail.Currency;
+ // _PO_Detail.Price = po_detail.Price;
+ // _PO_Detail.PoUm = po_detail.PoUnit;
+ // _PO_Detail.LocUm = po_detail.PoUnit;
+ // _PO_Detail.Conv = 1;
+ // _PO_Detail.Status = (int)PoState.Close;
+ // _PO_Detail.CreateTime = po_detail.CreateTime;
+ // _PO_Detail.StartDate = Convert.ToDateTime(po_detail.BeginTime);
+ // _PO_Detail.EndDate = Convert.ToDateTime(po_detail.EndTime);
+ // _PO_Detail.CreateUser = po_detail.CreateUser;
+ // _PO_Detail.TaskID = taskid;
+ // _PO_Detail.CommandType = "U";
+ // _PO_Detail.DataID = po_detail.GUID;
+ // _PO_Detail.Domain = po_detail.Site;
+ // _PO_Detail.Site = po_detail.SubSite;
+ // _PO_Detail.Workorderlot = po_detail.Workorderlot.ToString();
+ // _PO_Detail.PoType = po_detail.PoType;
+ // _PO_Detail.Operation = po_detail.Operation;
+ // _PO_Detail.Location = po_detail.Location;
+ // _PO_Detail.Firmdays = po_detail.Firmdays;
+ // _PO_Detail.Scheduledays = po_detail.Scheduledays;
+ // _PO_Detail.Scheduleweeks = po_detail.Scheduleweeks;
+ // _PO_Detail.Schedulemonth = po_detail.Schedulemonth;
+ // _PO_Detail.Supplieritem = po_detail.Supplieritem;
+ // _PO_Detail.Dliverypatterncode = po_detail.Dliverypatterncode;
+ // _PO_Detail.Deliverytimecode = po_detail.Deliverytimecode;
+ // _PO_Detail.Transportdays = po_detail.Transportdays;
+ // db.TED_POD_DET.Add(_PO_Detail);
+ // }
+ // }
+ // var ret = CREATE_TEA_TASK_SUB(db, true, new TEA_TASK_SUB()
+ // {
+ // DataCount = 1,
+ // TaskID = taskid,
+ // TableName = "TED_PO_MSTR",
+ // Site = subsite,
+ // Domain = site,
+ // CreateTime = p_time,
+ // CreateUser = p_creator,
+ // Creator = "SCP",
+ // });
+ // }
+
+ // }
+ // }
+ // catch (Exception e)
+ // {
+ // _ret.State = ReturnStatus.Failed;
+ // LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "InsterPo", e.Message);
+ // _ret.Result = false;
+ // _ret.ErrorList.Add(e);
+ // throw e;
+ // }
+ // if (db.SaveChanges() != -1)
+ // {
+ // _ret.State = ReturnStatus.Succeed;
+ // _ret.Result = true;
+ // }
+ // else
+ // {
+ // _ret.State = ReturnStatus.Failed;
+ // _ret.Result = false;
+ // _ret.Message = "数据更新失败!";
+ // }
+ // return _ret;
+ //}
+ }
+
+}
diff --git a/Models/Attributes/BaseTableValidation.cs b/Models/Attributes/BaseTableValidation.cs
new file mode 100644
index 0000000..6163b45
--- /dev/null
+++ b/Models/Attributes/BaseTableValidation.cs
@@ -0,0 +1,13 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace CK.SCP.Models.Attributes
+{
+ public class BaseTableValidation
+ {
+ public static ValidationResult IsNullOrEmpty(string value, string error)
+ {
+ if (string.IsNullOrEmpty(value)) return new ValidationResult(error);
+ return ValidationResult.Success;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Models/Attributes/ColumnSource.cs b/Models/Attributes/ColumnSource.cs
new file mode 100644
index 0000000..bb31bac
--- /dev/null
+++ b/Models/Attributes/ColumnSource.cs
@@ -0,0 +1,61 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace CK.SCP.Models.Attributes
+{
+ ///
+ /// 列来源属于
+ ///
+ [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
+ public class ColumnSource : Attribute
+ {
+ ///
+ ///
+ /// 列来源。ENUM:枚举数据源.TABLE表数据源(外键关系)
+ /// 来源数据源类型
+ ///
+ /// sourceType为TABLE时,columName是对应表中的列名
+ /// columnNames[0]: ValueMember ,colums[1]:DisplayMember
+ public ColumnSource(ColumnSourceType sourceType, Type typeName, string[] columnNames = null,
+ string selector = null)
+ {
+ SourceType = sourceType;
+ TypeName = typeName;
+ ColumnNames = columnNames;
+ Selector = selector;
+ }
+
+
+ public ColumnSourceType SourceType { get; }
+
+ /// 获取或设置属性映射到的列的从零开始的顺序。
+ /// 列的顺序。
+ public Type TypeName { get; }
+
+ /// 获取或设置该属性映射到的列的数据库提供程序特定的数据类型。
+ /// 属性将映射到的列的数据库提供程序特定数据类型。
+ [StringLength(50)]
+ public string[] ColumnNames { get; }
+
+ [StringLength(50)]
+ public string Selector { get; set; }
+ }
+
+ public enum ColumnSourceType
+ {
+ ///
+ /// 枚举数据源
+ ///
+ ENUM = 1,
+
+ ///
+ /// 表数据源
+ ///
+ TABLE = 2,
+
+ ///
+ /// bool类型
+ ///
+ Boolean = 4
+ }
+}
\ No newline at end of file
diff --git a/Models/Attributes/Converter.cs b/Models/Attributes/Converter.cs
new file mode 100644
index 0000000..d83e60a
--- /dev/null
+++ b/Models/Attributes/Converter.cs
@@ -0,0 +1,21 @@
+using System;
+
+namespace CK.SCP.Models.Attributes
+{
+ ///
+ /// Converter属性
+ ///
+ [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
+ public class ConverterAttribute : Attribute
+ {
+ public ConverterAttribute(Type converterType)
+ {
+ ConverterType = converterType;
+ }
+
+ ///
+ /// Converter类型
+ ///
+ public Type ConverterType { get; }
+ }
+}
\ No newline at end of file
diff --git a/Models/Attributes/DataGridColum.cs b/Models/Attributes/DataGridColum.cs
new file mode 100644
index 0000000..0631220
--- /dev/null
+++ b/Models/Attributes/DataGridColum.cs
@@ -0,0 +1,19 @@
+using System;
+
+namespace CK.SCP.Models.Attributes
+{
+ ///
+ /// 是否在DataGrid中显示
+ ///
+ public class IsDataGridColum : Attribute
+ {
+ public IsDataGridColum(bool isShow, int displayOrder)
+ {
+ IsShowInDataGrid = isShow;
+ DisplayOrder = displayOrder;
+ }
+
+ public bool IsShowInDataGrid { get; set; }
+ public int DisplayOrder { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/Attributes/Unique.cs b/Models/Attributes/Unique.cs
new file mode 100644
index 0000000..ab2da48
--- /dev/null
+++ b/Models/Attributes/Unique.cs
@@ -0,0 +1,14 @@
+using System;
+
+namespace CK.SCP.Models.Attributes
+{
+ public class Unique : Attribute
+ {
+ public Unique(bool isUnique)
+ {
+ IsUnique = isUnique;
+ }
+
+ public bool IsUnique { get; }
+ }
+}
\ No newline at end of file
diff --git a/Models/Base/IData.cs b/Models/Base/IData.cs
new file mode 100644
index 0000000..3daa1a1
--- /dev/null
+++ b/Models/Base/IData.cs
@@ -0,0 +1,11 @@
+using System;
+using System.ComponentModel;
+
+namespace CK.SCP.Models.Base
+{
+ public interface IData : ITaskTable
+ {
+ [Description("数据编号")]
+ Guid DataID { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/Base/IDomain.cs b/Models/Base/IDomain.cs
new file mode 100644
index 0000000..f43f6b3
--- /dev/null
+++ b/Models/Base/IDomain.cs
@@ -0,0 +1,10 @@
+using System.ComponentModel;
+
+namespace CK.SCP.Models.Base
+{
+ public interface IDomain
+ {
+ [Description("域")]
+ string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/Base/IDomainSite.cs b/Models/Base/IDomainSite.cs
new file mode 100644
index 0000000..82c3654
--- /dev/null
+++ b/Models/Base/IDomainSite.cs
@@ -0,0 +1,10 @@
+using System.ComponentModel;
+
+namespace CK.SCP.Models.Base
+{
+ public interface IDomainSite : IDomain
+ {
+ [Description("地点")]
+ string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/Base/ISoftDelete.cs b/Models/Base/ISoftDelete.cs
new file mode 100644
index 0000000..176c3a9
--- /dev/null
+++ b/Models/Base/ISoftDelete.cs
@@ -0,0 +1,10 @@
+using System.ComponentModel;
+
+namespace CK.SCP.Models.Base
+{
+ public interface ISoftDelete
+ {
+ [Description("软删除")]
+ bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/Base/ITable.cs b/Models/Base/ITable.cs
new file mode 100644
index 0000000..fdb451d
--- /dev/null
+++ b/Models/Base/ITable.cs
@@ -0,0 +1,27 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace CK.SCP.Models.Base
+{
+ public interface ITable
+ {
+ [Key]
+ [Description("主键")]
+ Guid GUID { get; set; }
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ [Description("自增长编号")]
+ int UID { get; set; }
+
+ [Description("创建人")]
+ string CreateUser { get; set; }
+
+ [Description("创建时间")]
+ DateTime CreateTime { get; set; }
+
+ [Description("备注")]
+ string Remark { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/Base/ITaskTable.cs b/Models/Base/ITaskTable.cs
new file mode 100644
index 0000000..04849ce
--- /dev/null
+++ b/Models/Base/ITaskTable.cs
@@ -0,0 +1,21 @@
+using System;
+using System.ComponentModel;
+using CK.SCP.Models.Enums;
+
+namespace CK.SCP.Models.Base
+{
+ public interface ITaskTable : ITable, IDomainSite
+ {
+ [Description("任务编号")]
+ Guid TaskID { get; set; }
+
+ ///
+ /// A:Add,R:Read,U:Update,D:Delete
+ ///
+ [Description("命令类型")]
+ string CommandType { get; set; }
+
+ [Description("数据编号")]
+ Guid DataID { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/Base/IUpdatableTable.cs b/Models/Base/IUpdatableTable.cs
new file mode 100644
index 0000000..016ddea
--- /dev/null
+++ b/Models/Base/IUpdatableTable.cs
@@ -0,0 +1,16 @@
+using System;
+
+namespace CK.SCP.Models.Base
+{
+ public interface IUpdatableTable : ITable
+ {
+ string UpdateUser { get; set; }
+
+ DateTime? UpdateTime { get; set; }
+ }
+
+ public interface IEnable
+ {
+ bool Enable { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/CK.SCP.Models.csproj b/Models/CK.SCP.Models.csproj
index 97cdc4c..a614d1d 100644
--- a/Models/CK.SCP.Models.csproj
+++ b/Models/CK.SCP.Models.csproj
@@ -73,7 +73,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -81,10 +178,12 @@
+
+
@@ -95,6 +194,8 @@
+
+
@@ -147,6 +248,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -539,10 +721,6 @@
-
- default.aspx
- ASPXCodeBehind
-
TextTemplatingFileGenerator
TableSchema1.cs
diff --git a/Models/DataCenterContext.cs b/Models/DataCenterContext.cs
new file mode 100644
index 0000000..d350c0f
--- /dev/null
+++ b/Models/DataCenterContext.cs
@@ -0,0 +1,115 @@
+using System.Data.Entity;
+using System.Data.Entity.ModelConfiguration.Conventions;
+using CK.SCP.Models.DataCenterTables;
+
+namespace CK.SCP.Models
+{
+ [DbConfigurationType(typeof(SqlDbConfiguration))]
+ public class DataCenterContext : DbContext
+ {
+ public DataCenterContext() : base("name=DataCenterContext")
+ {
+
+ }
+
+ public DataCenterContext(string strConn) : base(strConn)
+ {
+ //Database.SetInitializer(new DataCenterDatabaseInitializer());
+ }
+
+ public virtual DbSet TA_BUTTON { get; set; }
+ public virtual DbSet TA_DEPT { get; set; }
+ public virtual DbSet TA_MENU { get; set; }
+ public virtual DbSet TA_USER { get; set; }
+ public virtual DbSet TA_USER_BUTTON { get; set; }
+ public virtual DbSet TA_USER_MENU { get; set; }
+ public virtual DbSet TA_USER_TABLE { get; set; }
+ public virtual DbSet TA_CONFIG { get; set; }
+ public virtual DbSet TL_DATA_CHANGE { get; set; }
+ public virtual DbSet TL_LOGIN { get; set; }
+ public virtual DbSet TL_EXCEPTION { get; set; }
+ public virtual DbSet TS_EDI_DATA { get; set; }
+ public virtual DbSet TT_EDI_DATA { get; set; }
+ public virtual DbSet TA_TABLE { get; set; }
+ public virtual DbSet TA_TASK { get; set; }
+ public virtual DbSet TA_TASK_HIS { get; set; }
+ public virtual DbSet TS_SUPPLIER { get; set; }
+ public virtual DbSet TS_CUSTOMER { get; set; }
+ public virtual DbSet TS_DOMAIN { get; set; }
+ public virtual DbSet TS_WORK_CENTER { get; set; }
+ public virtual DbSet TS_SUPPLIER_TYPE { get; set; }
+ public virtual DbSet TS_SUB_ACCOUNT { get; set; }
+ public virtual DbSet TS_SITE { get; set; }
+ public virtual DbSet TS_CODE_TYPE { get; set; }
+ public virtual DbSet TS_CODE { get; set; }
+ public virtual DbSet TS_PRODUCT_LINE { get; set; }
+ public virtual DbSet TS_PROJECT { get; set; }
+ public virtual DbSet TS_DEPARTMENT { get; set; }
+ public virtual DbSet TS_ENTITY { get; set; }
+ public virtual DbSet TS_CUSTOMER_TYPE { get; set; }
+ public virtual DbSet TS_COST_CENTER { get; set; }
+ public virtual DbSet TS_ACCOUNT { get; set; }
+ public virtual DbSet TS_ROUTING { get; set; }
+ public virtual DbSet TS_PART_MSTR { get; set; }
+ public virtual DbSet TS_PART_DET { get; set; }
+ public virtual DbSet TS_MES_DATA { get; set; }
+ public virtual DbSet TS_LOCATION { get; set; }
+ public virtual DbSet TS_LINE { get; set; }
+ public virtual DbSet TS_COLOR { get; set; }
+ public virtual DbSet TS_BOM { get; set; }
+ public virtual DbSet TS_PACK { get; set; }
+ public virtual DbSet TS_SUPPLIER_PART { get; set; }
+ public virtual DbSet TS_CUSTOMER_PART { get; set; }
+ public virtual DbSet TS_LINE_PART { get; set; }
+ public virtual DbSet TS_PURCHASE_PRICE { get; set; }
+ public virtual DbSet TS_SALE_PRICE { get; set; }
+ public virtual DbSet TS_STAND_COST_PRICE { get; set; }
+ public virtual DbSet TS_TEAM { get; set; }
+ public virtual DbSet TS_SHIFT { get; set; }
+ public virtual DbSet TS_WMS_LOCATION { get; set; }
+ public virtual DbSet TT_SUPPLIER { get; set; }
+ public virtual DbSet TT_CUSTOMER { get; set; }
+ public virtual DbSet TT_DOMAIN { get; set; }
+ public virtual DbSet TT_WORK_CENTER { get; set; }
+ public virtual DbSet TT_SUPPLIER_TYPE { get; set; }
+ public virtual DbSet TT_SUB_ACCOUNT { get; set; }
+ public virtual DbSet TT_SITE { get; set; }
+ public virtual DbSet TT_CODE_TYPE { get; set; }
+ public virtual DbSet TT_CODE { get; set; }
+ public virtual DbSet TT_PRODUCT_LINE { get; set; }
+ public virtual DbSet TT_PROJECT { get; set; }
+ public virtual DbSet TT_DEPARTMENT { get; set; }
+ public virtual DbSet TT_ENTITY { get; set; }
+ public virtual DbSet TT_CUSTOMER_TYPE { get; set; }
+ public virtual DbSet TT_COST_CENTER { get; set; }
+ public virtual DbSet TT_ACCOUNT { get; set; }
+ public virtual DbSet TT_ROUTING { get; set; }
+ public virtual DbSet TT_PART_MSTR { get; set; }
+ public virtual DbSet TT_PART_DET { get; set; }
+ public virtual DbSet TT_MES_DATA { get; set; }
+ public virtual DbSet TT_LOCATION { get; set; }
+ public virtual DbSet TT_LINE { get; set; }
+ public virtual DbSet TT_COLOR { get; set; }
+ public virtual DbSet TT_BOM { get; set; }
+ public virtual DbSet TT_PACK { get; set; }
+ public virtual DbSet TT_SUPPLIER_PART { get; set; }
+ public virtual DbSet TT_CUSTOMER_PART { get; set; }
+ public virtual DbSet TT_LINE_PART { get; set; }
+ public virtual DbSet TT_PURCHASE_PRICE { get; set; }
+ public virtual DbSet TT_SALE_PRICE { get; set; }
+ public virtual DbSet TT_STAND_COST_PRICE { get; set; }
+ public virtual DbSet TT_TEAM { get; set; }
+ public virtual DbSet TT_SHIFT { get; set; }
+ public virtual DbSet TT_WMS_LOCATION { get; set; }
+
+
+
+ protected override void OnModelCreating(DbModelBuilder modelBuilder)
+ {
+ base.OnModelCreating(modelBuilder);
+
+ modelBuilder.Conventions.Remove();
+ modelBuilder.Conventions.Add(new DecimalPropertyConvention(18, 5));
+ }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TA_BUTTON.cs b/Models/DataCenterTables/TA_BUTTON.cs
new file mode 100644
index 0000000..e74271b
--- /dev/null
+++ b/Models/DataCenterTables/TA_BUTTON.cs
@@ -0,0 +1,65 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ť")]
+ public class TA_BUTTON : IUpdatableTable, IEnable
+ {
+ [Index("IndexButton", Order = 0, IsUnique = true, IsClustered = false)]
+ [Description("ť")]
+ [Column]
+ [Required]
+ [StringLength(50)]
+ public string ButtonCode { get; set; }
+
+ [Description("ť")]
+ [Required]
+ [StringLength(50)]
+ public string ButtonName { get; set; }
+
+ [Index("IndexButton", Order = 1, IsUnique = true, IsClustered = false)]
+ [Description("")]
+ [Required]
+ [StringLength(50)]
+ public string TableName { get; set; }
+
+ [Description("ť˳")]
+ public int ButtonOrder { get; set; }
+
+ #region ֶ
+
+ [Description("")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string CreateUser { get; set; } = "";
+
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; } = DateTime.Now;
+
+
+ [Description("ע")]
+ public string Remark { get; set; }
+
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ #endregion
+
+ public bool Enable { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TA_CONFIG.cs b/Models/DataCenterTables/TA_CONFIG.cs
new file mode 100644
index 0000000..ccc3f36
--- /dev/null
+++ b/Models/DataCenterTables/TA_CONFIG.cs
@@ -0,0 +1,63 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ϵͳ")]
+ public class TA_CONFIG : ITable, IEnable
+ {
+ [IsDataGridColum(true, 1)]
+ [Index("IndexConfig", Order = 0, IsUnique = true, IsClustered = false)]
+ [Description("")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string ConfigName { get; set; }
+
+ [IsDataGridColum(true, 2)]
+ [Required(AllowEmptyStrings = true)]
+ [Description("ֵ")]
+ [StringLength(50)]
+ public string ConfigValue { get; set; }
+
+ [IsDataGridColum(true, 3)]
+ [Description("˵")]
+ [StringLength(500)]
+ public string ConfigDesc { get; set; }
+
+
+ [IsDataGridColum(true, 4)]
+ [Required(AllowEmptyStrings = true)]
+ [Description("")]
+ public EnumConfigType ConfigType { get; set; } = EnumConfigType.STRING;
+
+ #region ֶ
+
+ [Description("")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string CreateUser { get; set; } = "";
+
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+
+ [Description("ע")]
+ public string Remark { get; set; }
+
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ #endregion
+
+ public bool Enable { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TA_DEPT.cs b/Models/DataCenterTables/TA_DEPT.cs
new file mode 100644
index 0000000..3d9e00b
--- /dev/null
+++ b/Models/DataCenterTables/TA_DEPT.cs
@@ -0,0 +1,65 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ű")]
+ public class TA_DEPT : IUpdatableTable, IEnable,IDomainSite
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("ű")]
+ [Required(ErrorMessage = "űŲΪ.")]
+ [Index("IndexDept", Order = 0, IsUnique = true, IsClustered = false)]
+ [StringLength(50)]
+ public string DeptCode { get; set; }
+
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [Required(ErrorMessage = "ƲΪ.")]
+ [StringLength(50)]
+ public string DeptName { get; set; }
+
+ [Description("Ƿѡ")]
+ [NotMapped]
+ public bool IsChecked { get; set; }
+
+ #region ֶ
+
+ [Description("")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string CreateUser { get; set; } = "";
+
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; } = DateTime.Now;
+
+
+ [IsDataGridColum(true, 3)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ #endregion
+
+ public bool Enable { get; set; }
+ public string Domain { get; set; }
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TA_MENU.cs b/Models/DataCenterTables/TA_MENU.cs
new file mode 100644
index 0000000..b3f50a0
--- /dev/null
+++ b/Models/DataCenterTables/TA_MENU.cs
@@ -0,0 +1,74 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("菜单表")]
+ public class TA_MENU : IUpdatableTable, IEnable
+ {
+ [Description("菜单编号")]
+ [Required]
+ [Index("IndexMenu", Order = 0, IsUnique = true, IsClustered = false)]
+ [StringLength(50)]
+ public string MenuCode { get; set; }
+
+ [Description("菜单名称")]
+ [Required]
+ [StringLength(50)]
+ public string MenuName { get; set; }
+
+ [Description("上级菜单")]
+ [Required]
+ [StringLength(50)]
+ public string ParentCode { get; set; }
+
+ [Description("显示顺序")]
+ public int DisplayOrder { get; set; }
+
+ [Description("图标名称")]
+ [Required]
+ [StringLength(50)]
+ public string IconName { get; set; }
+
+ [Description("菜单级别")]
+ public int Level { get; set; }
+
+ [Description("是否选中")]
+ [NotMapped]
+ public bool IsChecked { get; set; }
+
+ #region 公共字段
+
+ [Description("创建人")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+
+ [Description("创建时间")]
+ public DateTime CreateTime { get; set; }
+
+ [Description("修改人")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+
+ [Description("备注")]
+ public string Remark { get; set; }
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ #endregion
+
+ public bool Enable { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TA_TABLE.cs b/Models/DataCenterTables/TA_TABLE.cs
new file mode 100644
index 0000000..6f0ea7b
--- /dev/null
+++ b/Models/DataCenterTables/TA_TABLE.cs
@@ -0,0 +1,61 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ϣ")]
+ public class TA_TABLE : IUpdatableTable, IEnable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [Required(ErrorMessage = "űŲΪ.")]
+ [Index("IndexDept", Order = 0, IsUnique = true, IsClustered = false)]
+ [StringLength(50)]
+ public string TableCode { get; set; }
+
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [Required(ErrorMessage = "ƲΪ.")]
+ [StringLength(50)]
+ public string TableName { get; set; }
+
+ [Description("Ƿѡ")]
+ [NotMapped]
+ public bool IsChecked { get; set; }
+
+ #region ֶ
+
+ [Description("")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ #endregion
+
+ public bool Enable { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TA_TASK.cs b/Models/DataCenterTables/TA_TASK.cs
new file mode 100644
index 0000000..f885684
--- /dev/null
+++ b/Models/DataCenterTables/TA_TASK.cs
@@ -0,0 +1,69 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("")]
+ public class TA_TASK : IUpdatableTable, ISoftDelete
+ {
+ [NotMapped]
+ [Description("")]
+ public Guid TaskID => GUID;
+
+
+ [Description("״̬")]
+ public EnumTaskState TaskState { get; set; } = EnumTaskState.Unread;
+
+ [Description("")]
+ [StringLength(50)]
+ public string TableName { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Creator { get; set; }
+
+ [Description("")]
+ public int DataCount { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+
+
+ [Key]
+ [Description("")]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TA_TASK_HIS.cs b/Models/DataCenterTables/TA_TASK_HIS.cs
new file mode 100644
index 0000000..570b638
--- /dev/null
+++ b/Models/DataCenterTables/TA_TASK_HIS.cs
@@ -0,0 +1,72 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ʷ")]
+ ///
+ /// ʷ
+ ///
+ public class TA_TASK_HIS : IUpdatableTable, ISoftDelete
+ {
+ [NotMapped]
+ [Description("")]
+ public Guid TaskId => GUID;
+
+
+ [Description("״̬")]
+ public EnumTaskState TaskState { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string TableName { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Creator { get; set; }
+
+ [Description("")]
+ public int DataCount { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+
+
+ [Key]
+ [Description("")]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TA_USER.cs b/Models/DataCenterTables/TA_USER.cs
new file mode 100644
index 0000000..e3dd79c
--- /dev/null
+++ b/Models/DataCenterTables/TA_USER.cs
@@ -0,0 +1,135 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("û")]
+ public class TA_USER : IUpdatableTable, ISoftDelete, IEnable, INotifyPropertyChanged
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("û")]
+ [Required(ErrorMessage = "ûΪ")]
+ [Index("IndexUser", Order = 0, IsUnique = true, IsClustered = false)]
+ [StringLength(50)]
+ public string UserName { get; set; }
+
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [Required(ErrorMessage = "벻Ϊ")]
+ [StringLength(50)]
+ public string Password { get; set; }
+
+ [IsDataGridColum(true, 3)]
+ [Description("ʵ")]
+ [StringLength(50)]
+ public string TrueName { get; set; }
+
+ [IsDataGridColum(true, 7)]
+ [ColumnSource(ColumnSourceType.TABLE, typeof(TA_DEPT),
+ new[] {"DeptCode", "DeptName"})] //, "CompanyDeptSelector"
+ [Description("ű")]
+ [Required(ErrorMessage = "űŲΪ")]
+ [StringLength(50)]
+ public string DeptCode { get; set; }
+
+ [ColumnSource(ColumnSourceType.ENUM, typeof(EnumUserType))]
+ [IsDataGridColum(true, 5)]
+ [Description("û")]
+ public EnumUserType UserType { get; set; } = EnumUserType.Admin;
+
+
+ [IsDataGridColum(true, 12)]
+ [Description("ʼ")]
+ [StringLength(50)]
+ public string Email { get; set; }
+
+ [IsDataGridColum(true, 13)]
+ [Description("ϵ绰1")]
+ [StringLength(50)]
+ public string Phone1 { get; set; }
+
+ [IsDataGridColum(true, 14)]
+ [Description("ϵ绰2")]
+ [StringLength(50)]
+ public string Phone2 { get; set; }
+
+ [IsDataGridColum(true, 9)]
+ [Description("¼ʱ")]
+ [Column(TypeName = "datetime2")]
+ public DateTime? LastLoginTime { get; set; }
+
+ [IsDataGridColum(true, 10)]
+ [Description("¼IPַ")]
+ [StringLength(50)]
+ public string LastLoginIp { get; set; }
+
+ [IsDataGridColum(true, 11)]
+ [Description("¼")]
+ [StringLength(50)]
+ public string LastLoginClient { get; set; }
+
+ [IsDataGridColum(true, 8)]
+ [Index("IndexUserSessionId", Order = 0, IsUnique = false, IsClustered = false)]
+ [Description("Ự")]
+ [StringLength(50)]
+ public string SessionId { get; set; }
+
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+
+ [Description("Ƿ")]
+ public bool Enable { get; set; }
+
+ #region ֶ
+
+ [Description("")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string CreateUser { get; set; } = "";
+
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; } = "";
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; } = DateTime.Now;
+
+
+ [IsDataGridColum(true, 15)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ #endregion
+
+
+ #region INotifyPropertyChangedӿ
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public void NotityPropertyChanged(string propertyName)
+ {
+ if (PropertyChanged != null)
+ {
+ PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TA_USER_BUTTON.cs b/Models/DataCenterTables/TA_USER_BUTTON.cs
new file mode 100644
index 0000000..4967480
--- /dev/null
+++ b/Models/DataCenterTables/TA_USER_BUTTON.cs
@@ -0,0 +1,63 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ûťȨ")]
+ public class TA_USER_BUTTON : IUpdatableTable, IEnable
+ {
+ [Description("û")]
+ [Required(AllowEmptyStrings = true)]
+ [Index("IndexUserButton", Order = 0, IsUnique = true, IsClustered = false)]
+ [StringLength(50)]
+ public string UserName { get; set; }
+
+ [Description("")]
+ [Required(AllowEmptyStrings = true)]
+ [Index("IndexUserButton", Order = 1, IsUnique = true, IsClustered = false)]
+ [StringLength(50)]
+ public string TableName { get; set; }
+
+
+ [Description("ť")]
+ [Required(AllowEmptyStrings = true)]
+ [Index("IndexUserButton", Order = 2, IsUnique = true, IsClustered = false)]
+ [StringLength(50)]
+ public string ButtonCode { get; set; }
+
+ #region ֶ
+
+ [Description("")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string CreateUser { get; set; } = "";
+
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; } = DateTime.Now;
+
+
+ [Description("ע")]
+ public string Remark { get; set; }
+
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ #endregion
+
+ public bool Enable { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TA_USER_MENU.cs b/Models/DataCenterTables/TA_USER_MENU.cs
new file mode 100644
index 0000000..f3efb2c
--- /dev/null
+++ b/Models/DataCenterTables/TA_USER_MENU.cs
@@ -0,0 +1,57 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("û˵Ȩ")]
+ public class TA_USER_MENU : IUpdatableTable, IEnable
+ {
+ [Description("û")]
+ [Required(AllowEmptyStrings = true)]
+ [Index("IndexUserMenu", Order = 0, IsUnique = true, IsClustered = false)]
+ [StringLength(50)]
+ public string UserName { get; set; }
+
+
+ [Description("˵")]
+ [Required(AllowEmptyStrings = true)]
+ [Index("IndexUserMenu", Order = 1, IsUnique = true, IsClustered = false)]
+ [StringLength(50)]
+ public string MenuCode { get; set; }
+
+ #region ֶ
+
+ [Description("")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; } = DateTime.Now;
+
+
+ [Description("ע")]
+ public string Remark { get; set; }
+
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ #endregion
+
+ public bool Enable { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TA_USER_TABLE.cs b/Models/DataCenterTables/TA_USER_TABLE.cs
new file mode 100644
index 0000000..4e03578
--- /dev/null
+++ b/Models/DataCenterTables/TA_USER_TABLE.cs
@@ -0,0 +1,57 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ûȨ")]
+ public class TA_USER_TABLE : IUpdatableTable, IEnable
+ {
+ [Description("û")]
+ [Required(AllowEmptyStrings = true)]
+ [Index("IndexUserTable", Order = 0, IsUnique = true, IsClustered = false)]
+ [StringLength(50)]
+ public string UserName { get; set; }
+
+
+ [Description("")]
+ [Required(AllowEmptyStrings = true)]
+ [Index("IndexUserTable", Order = 1, IsUnique = true, IsClustered = false)]
+ [StringLength(50)]
+ public string TableName { get; set; }
+
+ #region ֶ
+
+ [Description("")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; } = DateTime.Now;
+
+
+ [Description("ע")]
+ public string Remark { get; set; }
+
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ #endregion
+
+ public bool Enable { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TL_DATA_CHANGE.cs b/Models/DataCenterTables/TL_DATA_CHANGE.cs
new file mode 100644
index 0000000..bf2ff17
--- /dev/null
+++ b/Models/DataCenterTables/TL_DATA_CHANGE.cs
@@ -0,0 +1,56 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("数据变更日志")]
+ public class TL_DATA_CHANGE : ITable, IEnable
+ {
+ [Required(AllowEmptyStrings = true)]
+ [Description("日志类型")]
+ public EnumBaseDataLogType LogType { get; set; }
+
+ [Required(AllowEmptyStrings = true)]
+ [Description("数据类型")]
+ [StringLength(50)]
+ public string DataType { get; set; }
+
+ [Required(AllowEmptyStrings = true)]
+ [Description("原值")]
+ public string OldValue { get; set; }
+
+ [Required(AllowEmptyStrings = true)]
+ [Description("新值")]
+ public string NewValue { get; set; }
+
+ #region 公共字段
+
+ [Description("创建人")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string CreateUser { get; set; } = "";
+
+ [Description("创建时间")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+
+ [IsDataGridColum(true, 3)]
+ [Description("备注")]
+ public string Remark { get; set; }
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ #endregion
+
+ public bool Enable { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TL_EXCEPTION.cs b/Models/DataCenterTables/TL_EXCEPTION.cs
new file mode 100644
index 0000000..5ee9e85
--- /dev/null
+++ b/Models/DataCenterTables/TL_EXCEPTION.cs
@@ -0,0 +1,48 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("异常日志表")]
+ public class TL_EXCEPTION : ITable
+ {
+ [Description("日志类型")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string LogType { get; set; }
+
+ [Description("异常消息")]
+ public string ExMessage { get; set; }
+
+ [Description("异常信息")]
+ public string ExString { get; set; }
+
+ #region 公共字段
+
+ [Description("创建人")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string CreateUser { get; set; } = "";
+
+ [Description("创建时间")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+
+ [IsDataGridColum(true, 3)]
+ [Description("备注")]
+ public string Remark { get; set; }
+
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TL_LOGIN.cs b/Models/DataCenterTables/TL_LOGIN.cs
new file mode 100644
index 0000000..80be20c
--- /dev/null
+++ b/Models/DataCenterTables/TL_LOGIN.cs
@@ -0,0 +1,67 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Utils;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("登录日志表")]
+ public class TL_LOGIN : ITable
+ {
+ [Description("日志类型")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string Type { get; set; }
+
+ [Description("客户端电脑名称")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(200)]
+ public string Client { get; set; }
+
+ [Description("客户端IP")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(200)]
+ public string IP { get; set; }
+
+ [Description("会话编号")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(200)]
+ public string SessionId { get; set; }
+
+ [Description("信息")]
+ [StringLength(200)]
+ public string Message { get; set; }
+
+ //public override string ToString()
+ //{
+ // return EntitiesHelper.GetPropertiesString(this);
+ //}
+
+ #region 公共字段
+
+ [Description("创建人")]
+ [Required(AllowEmptyStrings = true)]
+ [StringLength(50)]
+ public string CreateUser { get; set; } = "";
+
+ [Description("创建时间")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+
+ [IsDataGridColum(true, 3)]
+ [Description("备注")]
+ public string Remark { get; set; }
+
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_ACCOUNT.cs b/Models/DataCenterTables/TS_ACCOUNT.cs
new file mode 100644
index 0000000..7e21d07
--- /dev/null
+++ b/Models/DataCenterTables/TS_ACCOUNT.cs
@@ -0,0 +1,52 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ŀ")]
+ public class TS_ACCOUNT : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexAccount", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_BOM.cs b/Models/DataCenterTables/TS_BOM.cs
new file mode 100644
index 0000000..84f8dac
--- /dev/null
+++ b/Models/DataCenterTables/TS_BOM.cs
@@ -0,0 +1,102 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("BOM")]
+ public class TS_BOM : IUpdatableTable, ISoftDelete, IDomainSite
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexBom", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string ParentPart { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string ComponentPart { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("ο")]
+ [StringLength(50)]
+ public string Reference { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("Ч")]
+ public DateTime StartEffective { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("ÿ")]
+ public decimal QuantityPer { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("ṹ")]
+ [StringLength(50)]
+ public string StructureType { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("Ч")]
+ public DateTime EndEffective { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ע")]
+ [StringLength(50)]
+ public string Remarks { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("Ʒ")]
+ public decimal Scrap { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ǰ")]
+ public int LeadTimeOffset { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ public int Operation { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("")]
+ public int SequenceNumber { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("Ԥٷֱ")]
+ public decimal FporecastPercent { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("")]
+ [StringLength(50)]
+ public string OptionGroup { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("")]
+ [StringLength(50)]
+ public string Process { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 18)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_CODE.cs b/Models/DataCenterTables/TS_CODE.cs
new file mode 100644
index 0000000..85322f5
--- /dev/null
+++ b/Models/DataCenterTables/TS_CODE.cs
@@ -0,0 +1,84 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ͨô")]
+ public class TS_CODE : IUpdatableTable, ISoftDelete,INotifyPropertyChanged
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("ͨô")]
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexCode", Order = 0, IsUnique = true, IsClustered = false)]
+ [StringLength(50)]
+ public string Code { get; set; }
+
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 3)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+
+ #region IsChecked
+
+ private bool _isChecked = false;
+
+ [NotMapped]
+ public bool IsChecked
+ {
+ get { return _isChecked; }
+ set
+ {
+ _isChecked = value;
+ NotityPropertyChanged("IsChecked");
+ }
+ }
+
+ #endregion
+
+ #region INotifyPropertyChangedӿ
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public void NotityPropertyChanged(string propertyName)
+ {
+ if (PropertyChanged != null)
+ {
+ PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_CODE_TYPE.cs b/Models/DataCenterTables/TS_CODE_TYPE.cs
new file mode 100644
index 0000000..0dc67cc
--- /dev/null
+++ b/Models/DataCenterTables/TS_CODE_TYPE.cs
@@ -0,0 +1,53 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ͨôͱ")]
+ public class TS_CODE_TYPE : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexCodeType", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("ͨʹ")]
+ [StringLength(50)]
+ public string Code { get; set; }
+
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 3)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_COLOR.cs b/Models/DataCenterTables/TS_COLOR.cs
new file mode 100644
index 0000000..180a085
--- /dev/null
+++ b/Models/DataCenterTables/TS_COLOR.cs
@@ -0,0 +1,52 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ɫ")]
+ public class TS_COLOR : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexColor", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_COST_CENTER.cs b/Models/DataCenterTables/TS_COST_CENTER.cs
new file mode 100644
index 0000000..c8ca932
--- /dev/null
+++ b/Models/DataCenterTables/TS_COST_CENTER.cs
@@ -0,0 +1,52 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ɱı")]
+ public class TS_COST_CENTER : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexCostCenter", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_CUSTOMER.cs b/Models/DataCenterTables/TS_CUSTOMER.cs
new file mode 100644
index 0000000..0d53d11
--- /dev/null
+++ b/Models/DataCenterTables/TS_CUSTOMER.cs
@@ -0,0 +1,312 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ͻ")]
+ public class TS_CUSTOMER : IUpdatableTable, ISoftDelete, IDomainSite
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexCustomer", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("ͻ")]
+ [StringLength(50)]
+ public string CustomerCode { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("ͻ")]
+ [StringLength(50)]
+ public string CustomerName { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string SearchName { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("м")]
+ [StringLength(50)]
+ public string SecondName { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("")]
+ [StringLength(50)]
+ public string ThirdName { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string GroupName { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string Active { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ͻַ")]
+ [StringLength(50)]
+ public string Address1 { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("ͻַ")]
+ [StringLength(50)]
+ public string Address2 { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ͻַ")]
+ [StringLength(50)]
+ public string Address3 { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("ʱ")]
+ [StringLength(50)]
+ public string ZipCode { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("")]
+ [StringLength(50)]
+ public string City { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("")]
+ [StringLength(50)]
+ public string Country { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("绰")]
+ [StringLength(50)]
+ public string Telephone { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("ʡ")]
+ [StringLength(50)]
+ public string province { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ [StringLength(50)]
+ public string County { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("")]
+ [StringLength(50)]
+ public string Fax { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("Դ")]
+ [StringLength(50)]
+ public string LanguageCode { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("ʼ")]
+ [StringLength(50)]
+ public string Email { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("ַ")]
+ [StringLength(50)]
+ public string Internet { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("˰ַ")]
+ [StringLength(50)]
+ public string AddressIsTaxable { get; set; }
+ [IsDataGridColum(true, 22)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string AddressIsTaxIncluded { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string FederalTax { get; set; }
+ [IsDataGridColum(true, 24)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string StateTax { get; set; }
+ [IsDataGridColum(true, 25)]
+ [Description("˰1")]
+ [StringLength(50)]
+ public string MiscTax1 { get; set; }
+ [IsDataGridColum(true, 26)]
+ [Description("˰2")]
+ [StringLength(50)]
+ public string MiscTax2 { get; set; }
+ [IsDataGridColum(true, 27)]
+ [Description("˰3")]
+ [StringLength(50)]
+ public string MiscTax3 { get; set; }
+ [IsDataGridColum(true, 28)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string TaxInCity { get; set; }
+ [IsDataGridColum(true, 29)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string TaxZone { get; set; }
+ [IsDataGridColum(true, 30)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string TaxClass { get; set; }
+ [IsDataGridColum(true, 31)]
+ [Description("˰;")]
+ [StringLength(50)]
+ public string TaxUsage { get; set; }
+ [IsDataGridColum(true, 32)]
+ [Description("")]
+ [StringLength(50)]
+ public string Title { get; set; }
+ [IsDataGridColum(true, 33)]
+ [Description("ϵ")]
+ [StringLength(50)]
+ public string ContactName { get; set; }
+ [IsDataGridColum(true, 34)]
+ [Description("д")]
+ [StringLength(50)]
+ public string Initials { get; set; }
+ [IsDataGridColum(true, 35)]
+ [Description("")]
+ [StringLength(50)]
+ public string Function { get; set; }
+ [IsDataGridColum(true, 36)]
+ [Description("Ա")]
+ [StringLength(50)]
+ public string Gender { get; set; }
+ [IsDataGridColum(true, 37)]
+ [Description("Ҫϵ")]
+ [StringLength(50)]
+ public string ContactIsPrimary { get; set; }
+ [IsDataGridColum(true, 38)]
+ [Description("Ҫϵ")]
+ [StringLength(50)]
+ public string ContactIsSecondary { get; set; }
+ [IsDataGridColum(true, 39)]
+ [Description("")]
+ [StringLength(50)]
+ public string Compens { get; set; }
+ [IsDataGridColum(true, 40)]
+ [Description("Ʊļ")]
+ [StringLength(50)]
+ public string GlProfileInvoice { get; set; }
+ [IsDataGridColum(true, 41)]
+ [Description("Ʊݿļ")]
+ [StringLength(50)]
+ public string GlProfileCreditNote { get; set; }
+ [IsDataGridColum(true, 42)]
+ [Description("Ԥļ")]
+ [StringLength(50)]
+ public string GlProfilePrepayment { get; set; }
+ [IsDataGridColum(true, 43)]
+ [Description("ۼļ")]
+ [StringLength(50)]
+ public string GLProfileDeduction { get; set; }
+ [IsDataGridColum(true, 44)]
+ [Description("˿ļ")]
+ [StringLength(50)]
+ public string AccountGLProfile { get; set; }
+ [IsDataGridColum(true, 45)]
+ [Description("ÿļ")]
+ [StringLength(50)]
+ public string FinanceChargeProfile { get; set; }
+ [IsDataGridColum(true, 46)]
+ [Description("˻ļ")]
+ [StringLength(50)]
+ public string SubAccountProfile { get; set; }
+ [IsDataGridColum(true, 47)]
+ [Description("")]
+ [StringLength(50)]
+ public string Currency { get; set; }
+ [IsDataGridColum(true, 48)]
+ [Description("ͻ")]
+ [StringLength(50)]
+ public string Customertype { get; set; }
+ [IsDataGridColum(true, 49)]
+ [Description("֧")]
+ [StringLength(50)]
+ public string CreditTerms { get; set; }
+ [IsDataGridColum(true, 50)]
+ [Description("Ʊ״̬")]
+ [StringLength(50)]
+ public string InvoiceStatusCode { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string PaymentGroup { get; set; }
+
+ [Description("˵ϸ")]
+ [StringLength(50)]
+ public string BillingSchedule { get; set; }
+
+ [Description("Ʊտ")]
+ [StringLength(50)]
+ public string BillPayee { get; set; }
+
+ [Description("ƱȨ")]
+ [StringLength(50)]
+ public string InvoicebyAuthorization { get; set; }
+ [IsDataGridColum(true, 51)]
+ [Description("Ա")]
+ [StringLength(50)]
+ public string SalesPerson { get; set; }
+ [IsDataGridColum(true, 52)]
+ [Description("ʽ")]
+ [StringLength(50)]
+ public string ShipVia { get; set; }
+ [IsDataGridColum(true, 53)]
+ [Description("ת˰")]
+ [StringLength(50)]
+ public string Resale { get; set; }
+ [IsDataGridColum(true, 54)]
+ [Description("ע")]
+ [StringLength(50)]
+ public string Remarks { get; set; }
+ [IsDataGridColum(true, 55)]
+ [Description("")]
+ [StringLength(50)]
+ public string Region { get; set; }
+ [IsDataGridColum(true, 56)]
+ [Description("ۿ۱")]
+ [StringLength(50)]
+ public string DiscountTable { get; set; }
+ [IsDataGridColum(true, 57)]
+ [Description("̶۸")]
+ [StringLength(50)]
+ public string FixfdPrice { get; set; }
+ [IsDataGridColum(true, 58)]
+ [Description("ռ˼")]
+ [StringLength(50)]
+ public string DayBookSet { get; set; }
+ [IsDataGridColum(true, 59)]
+ [Description("иʽ")]
+ [StringLength(50)]
+ public string BankFormat { get; set; }
+ [IsDataGridColum(true, 60)]
+ [Description("ͻ")]
+ [StringLength(50)]
+ public string CustomerBank { get; set; }
+ [IsDataGridColum(true, 61)]
+ [Description("")]
+ [StringLength(50)]
+ public string OwnBank { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 62)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 63)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 64)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [IsDataGridColum(true, 65)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [IsDataGridColum(true, 66)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_CUSTOMER_PART.cs b/Models/DataCenterTables/TS_CUSTOMER_PART.cs
new file mode 100644
index 0000000..622a2f2
--- /dev/null
+++ b/Models/DataCenterTables/TS_CUSTOMER_PART.cs
@@ -0,0 +1,68 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ͻ")]
+ public class TS_CUSTOMER_PART : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexCustomerPart", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("ͻ/")]
+ [StringLength(50)]
+ public string CustomerShipto { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("ͻĿ")]
+ [StringLength(50)]
+ public string CustomerPart { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ע")]
+ [StringLength(50)]
+ public string Comment { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("ʾͻ")]
+ [StringLength(50)]
+ public string DisplayCustomerPart { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("ͻϹ̱")]
+ [StringLength(50)]
+ public string CustomerPartEcoNbr { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 9)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_CUSTOMER_TYPE.cs b/Models/DataCenterTables/TS_CUSTOMER_TYPE.cs
new file mode 100644
index 0000000..4aba711
--- /dev/null
+++ b/Models/DataCenterTables/TS_CUSTOMER_TYPE.cs
@@ -0,0 +1,52 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ͻͱ")]
+ public class TS_CUSTOMER_TYPE : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexCustomerType", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_DEPARTMENT.cs b/Models/DataCenterTables/TS_DEPARTMENT.cs
new file mode 100644
index 0000000..960f178
--- /dev/null
+++ b/Models/DataCenterTables/TS_DEPARTMENT.cs
@@ -0,0 +1,60 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ű")]
+ public class TS_DEPARTMENT : IUpdatableTable, ISoftDelete,IDomainSite
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexDepartMent", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("Ŵ")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_DOMAIN.cs b/Models/DataCenterTables/TS_DOMAIN.cs
new file mode 100644
index 0000000..c54f4dc
--- /dev/null
+++ b/Models/DataCenterTables/TS_DOMAIN.cs
@@ -0,0 +1,52 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ݱ")]
+ public class TS_DOMAIN : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexDoMain", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_EDI_DATA.cs b/Models/DataCenterTables/TS_EDI_DATA.cs
new file mode 100644
index 0000000..34c6fac
--- /dev/null
+++ b/Models/DataCenterTables/TS_EDI_DATA.cs
@@ -0,0 +1,86 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("EDIݱ")]
+ public class TS_EDI_DATA : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexEdiData", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("۶")]
+ [StringLength(50)]
+ public string CustomerOrder { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string ShipFrom { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("ͻ")]
+ [StringLength(50)]
+ public string Customer { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ͻ")]
+ [StringLength(50)]
+ public string CustomerPart { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("к")]
+ public int Line { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string Part { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ɹ")]
+ [StringLength(50)]
+ public string PurchaseOrder { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ͻο")]
+ [StringLength(50)]
+ public string CustomerReference { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ public DateTime ReceiveDate { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ʱ")]
+ public DateTime ReceiveTime { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ public DateTime DemandDate { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("")]
+ public decimal DemandQuantity { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 15)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_ENTITY.cs b/Models/DataCenterTables/TS_ENTITY.cs
new file mode 100644
index 0000000..956d334
--- /dev/null
+++ b/Models/DataCenterTables/TS_ENTITY.cs
@@ -0,0 +1,52 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ƶλ")]
+ public class TS_ENTITY : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexEntity", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("Ƶλ")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_LINE.cs b/Models/DataCenterTables/TS_LINE.cs
new file mode 100644
index 0000000..e0da8c5
--- /dev/null
+++ b/Models/DataCenterTables/TS_LINE.cs
@@ -0,0 +1,99 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("߱")]
+ public class TS_LINE : IUpdatableTable, ISoftDelete, IDomain
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexLine", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string ProductionLine { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("˵")]
+ [StringLength(50)]
+ public string Description { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("/Сʱ")]
+ public decimal UnitsHour { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("дС")]
+ public bool EnableRunSize { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public decimal NumberOfLines { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ʱ仺-")]
+ public int DurationBuffer { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ʱ仺ʱ")]
+ [StringLength(50)]
+ public string DurationBufferHMS { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("ʱ-")]
+ public int SetupTime { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ʱ")]
+ [StringLength(50)]
+ public string SetupTimeHMS { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("Զ̶")]
+ public bool LnAutofirm { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("ϴԶ̶")]
+ public DateTime LnLastAutofirm { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("ID")]
+ [StringLength(50)]
+ public string LnScheduler { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("")]
+ [StringLength(50)]
+ public string Dtendlit { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("ں")]
+ public int EndNumber { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 18)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_LINE_PART.cs b/Models/DataCenterTables/TS_LINE_PART.cs
new file mode 100644
index 0000000..2c6846b
--- /dev/null
+++ b/Models/DataCenterTables/TS_LINE_PART.cs
@@ -0,0 +1,113 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ϵ")]
+ public class TS_LINE_PART : IUpdatableTable, ISoftDelete, IDomain
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexLinePart", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string ProductionLine { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʼ")]
+ public DateTime StartDate { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("/Сʱ")]
+ public decimal UnitsHour { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public decimal NumberOfLines { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ʱ-")]
+ public int SetupTime { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ʱ")]
+ [StringLength(50)]
+ public string SetupTimeHMS { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ public bool PrimaryLine { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("Ա")]
+ public decimal SetupCrew { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("С")]
+ public int SetSize { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("ȫԱ")]
+ public decimal RunCrew { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("С")]
+ public int RunSize { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("嵥")]
+ [StringLength(50)]
+ public string BomCode { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("")]
+ [StringLength(50)]
+ public string Routing { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("ID")]
+ [StringLength(50)]
+ public string ToolId { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("˳1")]
+ [StringLength(50)]
+ public string RunSequence1 { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("˳2")]
+ [StringLength(50)]
+ public string RunSequence2 { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("ע")]
+ public bool Comments { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 22)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+ [IsDataGridColum(true, 24)]
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_LOCATION.cs b/Models/DataCenterTables/TS_LOCATION.cs
new file mode 100644
index 0000000..5b72c63
--- /dev/null
+++ b/Models/DataCenterTables/TS_LOCATION.cs
@@ -0,0 +1,101 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("λ")]
+ public class TS_LOCATION : IUpdatableTable, ISoftDelete, IDomain
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("ص")]
+ [StringLength(50)]
+
+ public string Site { get; set; }
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexLocation", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 2)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Location { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("״̬")]
+ [StringLength(50)]
+ public string InventoryStatus { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("Ŀ")]
+ [StringLength(50)]
+ public string Project { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public DateTime DateCreated { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ public bool Permanent { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ [StringLength(50)]
+ public string Type { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ public bool SinglePart { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("/ο")]
+ public bool SingleLotReference { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ public decimal Capacity { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Um { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("λ")]
+ public bool ReservedLocations { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("ʵַ")]
+ [StringLength(50)]
+ public string PhysicalAddress { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("״̬")]
+ [StringLength(50)]
+ public string Status { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 18)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_MES_DATA.cs b/Models/DataCenterTables/TS_MES_DATA.cs
new file mode 100644
index 0000000..b136857
--- /dev/null
+++ b/Models/DataCenterTables/TS_MES_DATA.cs
@@ -0,0 +1,40 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Mesݱ")]
+ public class TS_MES_DATA : IUpdatableTable, ISoftDelete
+ {
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 3)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_PACK.cs b/Models/DataCenterTables/TS_PACK.cs
new file mode 100644
index 0000000..efe3d55
--- /dev/null
+++ b/Models/DataCenterTables/TS_PACK.cs
@@ -0,0 +1,67 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("")]
+ public class TS_PACK : IUpdatableTable, ISoftDelete, IDomain
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("ص")]
+ [StringLength(50)]
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexPack", Order = 0, IsUnique = true, IsClustered = false)]
+ public string Site { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string UM { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("üλ")]
+ [StringLength(50)]
+ public string AlternateUm { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("λ")]
+ public int UmConversion { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 7)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_PART_DET.cs b/Models/DataCenterTables/TS_PART_DET.cs
new file mode 100644
index 0000000..c485c5f
--- /dev/null
+++ b/Models/DataCenterTables/TS_PART_DET.cs
@@ -0,0 +1,247 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ϸ")]
+ public class TS_PART_DET : IUpdatableTable, ISoftDelete, IDomain
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexPartDet", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("ABC ")]
+ [StringLength(50)]
+ public string AbcClass { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("ſ")]
+ [StringLength(50)]
+ public string LotControl { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Location { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string LocationType { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("Զ")]
+ public bool AutoMaticLotNumbers { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ƽ")]
+ public int AverageInterval { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("̵")]
+ public int CycleCountInterval { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ public int ShelfLife { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ؼ")]
+ public bool KeyPart { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("ɹջ״̬")]
+ [StringLength(50)]
+ public string PoReceiptStatus { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("Ч")]
+ public bool RctPoActive { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("ӹջ״̬")]
+ [StringLength(50)]
+ public string WoReceiptStatus { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("Ч")]
+ public bool RctWoActive { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("ǿ涩")]
+ [StringLength(50)]
+ public string MemoOrderType { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("ƻ")]
+ public bool MasterSchedule { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("ƻ")]
+ public bool PlanOrders { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("ʱ")]
+ public int TimeFence { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("")]
+ [StringLength(50)]
+ public string OrderPolicy { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("")]
+ public decimal OrderQuantity { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("")]
+ public int OrderPeriod { get; set; }
+ [IsDataGridColum(true, 22)]
+ [Description("ȫ")]
+ public decimal SafetyStock { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("ȫǰ")]
+ public decimal SafetyTime { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("ٶ")]
+ public decimal ReorderPoint { get; set; }
+ [IsDataGridColum(true, 25)]
+ [Description("ƻ")]
+ [StringLength(50)]
+ public string PlanningRev { get; set; }
+ [IsDataGridColum(true, 26)]
+ [Description("ԭ")]
+ public bool IssuePolicy { get; set; }
+ [IsDataGridColum(true, 27)]
+ [Description("ɹԱ/ƻԱ")]
+ [StringLength(50)]
+ public string BuyerPlanner { get; set; }
+ [IsDataGridColum(true, 28)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string Supplier { get; set; }
+ [IsDataGridColum(true, 29)]
+ [Description("ɹص")]
+ [StringLength(50)]
+ public string PoSite { get; set; }
+ [IsDataGridColum(true, 30)]
+ [Description("ɹ/")]
+ [StringLength(50)]
+ public string PurMfg { get; set; }
+ [IsDataGridColum(true, 31)]
+ [Description("")]
+ [StringLength(50)]
+ public string ConfigurationType { get; set; }
+ [IsDataGridColum(true, 32)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string InspectionLocation { get; set; }
+ [IsDataGridColum(true, 33)]
+ [Description("Ҫ")]
+ public bool InspectionRequired { get; set; }
+ [IsDataGridColum(true, 34)]
+ [Description("ǰ")]
+ public int InspectionLeadTime { get; set; }
+ [IsDataGridColum(true, 35)]
+ [Description("ۼǰ")]
+ public int CumulativeLeadTime { get; set; }
+ [IsDataGridColum(true, 36)]
+ [Description("ǰ")]
+ public int ManufacturingLedaTime { get; set; }
+ [IsDataGridColum(true, 37)]
+ [Description("ɹǰ")]
+ public int PurchaseLeadTime { get; set; }
+ [IsDataGridColum(true, 38)]
+ [Description("ATPʵʩˮƽ")]
+ [StringLength(50)]
+ public string AtpEnforcementLevel { get; set; }
+ [IsDataGridColum(true, 39)]
+ [Description("ϵATP")]
+ public bool FamilyATP { get; set; }
+ [IsDataGridColum(true, 40)]
+ [Description("ATPˮƽ")]
+ public int AtpHorizon { get; set; }
+ [IsDataGridColum(true, 41)]
+ [Description("1")]
+ [StringLength(50)]
+ public string RunSeq1 { get; set; }
+ [IsDataGridColum(true, 42)]
+ [Description("2")]
+ [StringLength(50)]
+ public string RunSeq2 { get; set; }
+ [IsDataGridColum(true, 43)]
+ [Description("")]
+ public bool Phantom { get; set; }
+ [IsDataGridColum(true, 44)]
+ [Description("С")]
+ public decimal MinimumOrder { get; set; }
+ [IsDataGridColum(true, 45)]
+ [Description("")]
+ public decimal MaximumOrder { get; set; }
+ [IsDataGridColum(true, 46)]
+ [Description("")]
+ public decimal OrderMultiple { get; set; }
+ [IsDataGridColum(true, 47)]
+ [Description("ڲĹ")]
+ public bool OperationBasedYield { get; set; }
+ [IsDataGridColum(true, 48)]
+ [Description("")]
+ public decimal YieldPercent { get; set; }
+ [IsDataGridColum(true, 49)]
+ [Description("ʱ")]
+ [StringLength(50)]
+ public string RunTime { get; set; }
+ [IsDataGridColum(true, 50)]
+ [Description("ʱ")]
+ public decimal SetupTime { get; set; }
+ [IsDataGridColum(true, 51)]
+ [Description("EMT")]
+ [StringLength(50)]
+ public string EmtType { get; set; }
+ [IsDataGridColum(true, 52)]
+ [Description("EMTԶ")]
+ public bool AutomaticEmtProcessing { get; set; }
+ [IsDataGridColum(true, 53)]
+ [Description("")]
+ [StringLength(50)]
+ public string NetWorkCode { get; set; }
+ [IsDataGridColum(true, 54)]
+ [Description("̴")]
+ [StringLength(50)]
+ public string RoutingCode { get; set; }
+ [IsDataGridColum(true, 55)]
+ [Description("嵥/䷽")]
+ [StringLength(50)]
+ public string BomFormulaCode { get; set; }
+ [IsDataGridColum(true, 56)]
+ [Description("")]
+ [StringLength(50)]
+ public string ReplenishmentMethod { get; set; }
+ [IsDataGridColum(true, 57)]
+ [Description("Ƿ")]
+ [StringLength(50)]
+ public string IsMaster { get; set; }
+ [IsDataGridColum(true, 58)]
+ [Description("ɫ")]
+ [StringLength(50)]
+ public string PartColor { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 59)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 60)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 61)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 62)]
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+ [IsDataGridColum(true, 63)]
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+ [IsDataGridColum(true, 64)]
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_PART_MSTR.cs b/Models/DataCenterTables/TS_PART_MSTR.cs
new file mode 100644
index 0000000..54ed280
--- /dev/null
+++ b/Models/DataCenterTables/TS_PART_MSTR.cs
@@ -0,0 +1,140 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("")]
+ public class TS_PART_MSTR : IUpdatableTable, ISoftDelete, IDomain
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexPartMstr", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("1")]
+ [StringLength(50)]
+ public string Desc1 { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("2")]
+ [StringLength(50)]
+ public string Desc2 { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Um { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("Ʒ")]
+ [StringLength(50)]
+ public string ProdLine { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public DateTime AddDate { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string DsgnGroup { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ [StringLength(50)]
+ public string PromotionGroup { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string PartType { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("״̬")]
+ [StringLength(50)]
+ public string Status { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ [StringLength(50)]
+ public string Group { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("ͼֽ")]
+ [StringLength(50)]
+ public string Drawing { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("Ŀ")]
+ [StringLength(50)]
+ public string PartRevision { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("ͼֽλ")]
+ [StringLength(50)]
+ public string DrawingLocation { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("С")]
+ [StringLength(50)]
+ public string Size { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("۸ۿ")]
+ [StringLength(50)]
+ public string PriceBreakCategory { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("")]
+ public bool AuxiliaryMaterial { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("߽")]
+ public bool OfflineSettlement { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("Qȼ")]
+ [StringLength(50)]
+ public string Qgrade { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("")]
+ [StringLength(50)]
+ public string WmsPartType { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("ʽ")]
+ [StringLength(50)]
+ public string ManageWay { get; set; }
+ [IsDataGridColum(true, 22)]
+ [Description("")]
+ [StringLength(50)]
+ public string InventoryCode { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("ͣ/")]
+ [StringLength(50)]
+ public string ManageType { get; set; }
+ [IsDataGridColum(true, 24)]
+ [Description("Ƿ")]
+ [StringLength(50)]
+ public string InspectType { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 24)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 25)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 27)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_PRODUCT_LINE.cs b/Models/DataCenterTables/TS_PRODUCT_LINE.cs
new file mode 100644
index 0000000..3485af9
--- /dev/null
+++ b/Models/DataCenterTables/TS_PRODUCT_LINE.cs
@@ -0,0 +1,58 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ʒ")]
+ public class TS_PRODUCT_LINE : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexPartMstr", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("Ʒ")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("Ӧ˰")]
+ public bool Taxable { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("˰")]
+ public int TaxClass { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 7)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_PROJECT.cs b/Models/DataCenterTables/TS_PROJECT.cs
new file mode 100644
index 0000000..41bf2e1
--- /dev/null
+++ b/Models/DataCenterTables/TS_PROJECT.cs
@@ -0,0 +1,52 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ŀ")]
+ public class TS_PROJECT : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexProject", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_PURCHASE_PRICE.cs b/Models/DataCenterTables/TS_PURCHASE_PRICE.cs
new file mode 100644
index 0000000..ce8a328
--- /dev/null
+++ b/Models/DataCenterTables/TS_PURCHASE_PRICE.cs
@@ -0,0 +1,84 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ɹ۸")]
+ public class TS_PURCHASE_PRICE : IUpdatableTable, ISoftDelete, IDomain
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexPurchasePrice", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("Ŀ")]
+ [StringLength(50)]
+ public string PriceList { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("˵")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("Ʒ")]
+ [StringLength(50)]
+ public string ProductLine { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("")]
+ [StringLength(50)]
+ public string Currency { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Um { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ʼ")]
+ public DateTime Start { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ public DateTime ExpireDate { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string AmountType { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("")]
+ public decimal Amount { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 13)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_ROUTING.cs b/Models/DataCenterTables/TS_ROUTING.cs
new file mode 100644
index 0000000..45baf11
--- /dev/null
+++ b/Models/DataCenterTables/TS_ROUTING.cs
@@ -0,0 +1,132 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ձ")]
+ public class TS_ROUTING : IUpdatableTable, ISoftDelete, IDomainSite
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexRouting", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("̴")]
+ [StringLength(50)]
+ public string RoutingCode { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ public int Operation { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("ʼ")]
+ public DateTime StartDate { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("")]
+ [StringLength(50)]
+ public string StandardOperration { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("")]
+ [StringLength(50)]
+ public string WorkCenter { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string Machine { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("˵")]
+ [StringLength(50)]
+ public string Description { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("/")]
+ public int MachinesPerOperation { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("ƽмӹ")]
+ public int OverlapUnits { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("Ŷʱ")]
+ public decimal QueueTime { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("ȴʱ")]
+ public decimal WaitTime { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("ֽεĹ")]
+ public bool MilestoneOperation { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("תǰ")]
+ public int SubcontractLt { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("Ա")]
+ public decimal SetupCrew { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("ȫԱ")]
+ public decimal RunCrew { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("ʱ")]
+ public decimal SetupTime { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("ʱ")]
+ public decimal RunTime { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("ƶʱ")]
+ public decimal MoveTime { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("")]
+ public DateTime EndDate { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("")]
+ public decimal YieldPercent { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("ߴ")]
+ [StringLength(50)]
+ public string ToolCode { get; set; }
+ [IsDataGridColum(true, 22)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string Supplier { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("ֵ")]
+ public decimal InventoryValue { get; set; }
+ [IsDataGridColum(true, 24)]
+ [Description("תɱ")]
+ public decimal SubcontractCost { get; set; }
+ [IsDataGridColum(true, 25)]
+ [Description("ע")]
+ public bool Comments { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 26)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 27)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 28)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_SALE_PRICE.cs b/Models/DataCenterTables/TS_SALE_PRICE.cs
new file mode 100644
index 0000000..3a6023f
--- /dev/null
+++ b/Models/DataCenterTables/TS_SALE_PRICE.cs
@@ -0,0 +1,84 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ۼ۸")]
+ public class TS_SALE_PRICE : IUpdatableTable, ISoftDelete, IDomain
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexSalePrice", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("Ŀ")]
+ [StringLength(50)]
+ public string PriceList { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("˵")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("Ʒ")]
+ [StringLength(50)]
+ public string ProductLine { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("")]
+ [StringLength(50)]
+ public string Currency { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Um { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ʼ")]
+ public DateTime Start { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ public DateTime ExpireDate { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string AmountType { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("")]
+ public decimal Amount { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 13)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_SHIFT.cs b/Models/DataCenterTables/TS_SHIFT.cs
new file mode 100644
index 0000000..9920911
--- /dev/null
+++ b/Models/DataCenterTables/TS_SHIFT.cs
@@ -0,0 +1,52 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ת")]
+ public class TS_SHIFT : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexShift", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_SITE.cs b/Models/DataCenterTables/TS_SITE.cs
new file mode 100644
index 0000000..2709d5d
--- /dev/null
+++ b/Models/DataCenterTables/TS_SITE.cs
@@ -0,0 +1,97 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ص")]
+ public class TS_SITE : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexSite", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("Ƶλ")]
+ [StringLength(50)]
+ public string Entity { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("״̬")]
+ [StringLength(50)]
+ public string Status { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("Զɿλ")]
+ public bool AutoLocation { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string InspLocation { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("EMTӦ")]
+ [StringLength(50)]
+ public string BtbSupplier { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("ⲿӦ")]
+ public bool ExtSupplier { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("תƲĿ")]
+ [StringLength(50)]
+ public string XferAcct { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("תƲ˻")]
+ [StringLength(50)]
+ public string XferSub { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("תƲɱ")]
+ [StringLength(50)]
+ public string XferCc { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("POλ")]
+ [StringLength(50)]
+ public string GitLocation { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("ʹüƻ/ȵĹ̨")]
+ public bool UsePlanSchedWbs { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 17)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_STAND_COST_PRICE.cs b/Models/DataCenterTables/TS_STAND_COST_PRICE.cs
new file mode 100644
index 0000000..0d964bf
--- /dev/null
+++ b/Models/DataCenterTables/TS_STAND_COST_PRICE.cs
@@ -0,0 +1,69 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ɱ۸")]
+ public class TS_STAND_COST_PRICE : IUpdatableTable, ISoftDelete, IDomain
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexStandCostPrice", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string Part { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("ϳɱ")]
+ public int MaterialCost { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("˹ɱ")]
+ public int LaborCost { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ӳɱ")]
+ public int BurdenCost { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("ɱ")]
+ public int OverheadCost { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("תɱ")]
+ public int SubcontrCost { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ɱ")]
+ public int CostSet { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 10)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_SUB_ACCOUNT.cs b/Models/DataCenterTables/TS_SUB_ACCOUNT.cs
new file mode 100644
index 0000000..c633764
--- /dev/null
+++ b/Models/DataCenterTables/TS_SUB_ACCOUNT.cs
@@ -0,0 +1,52 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("˻")]
+ public class TS_SUB_ACCOUNT : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexSubAccount", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("˻")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("˻")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_SUPPLIER.cs b/Models/DataCenterTables/TS_SUPPLIER.cs
new file mode 100644
index 0000000..3c5dfa7
--- /dev/null
+++ b/Models/DataCenterTables/TS_SUPPLIER.cs
@@ -0,0 +1,309 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ӧ̱")]
+ public class TS_SUPPLIER : IUpdatableTable, ISoftDelete, IDomain
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexSupplier", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("Ӧ̴")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string Name { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string SearchName { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("м")]
+ [StringLength(50)]
+ public string SecondName { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("")]
+ [StringLength(50)]
+ public string ThirdName { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string GroupName { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ public bool Active { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("Ӧ̵ַ")]
+ [StringLength(50)]
+ public string Address1 { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("Ӧ̵ַ")]
+ [StringLength(50)]
+ public string Address2 { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("Ӧ̵ַ")]
+ [StringLength(50)]
+ public string Address3 { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("ʱ")]
+ public int ZipCode { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("")]
+ [StringLength(50)]
+ public string City { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("")]
+ [StringLength(50)]
+ public string Country { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("绰")]
+ public int Telephone { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("ʡ")]
+ [StringLength(50)]
+ public string province { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ [StringLength(50)]
+ public string County { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("")]
+ public int Fax { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("Դ")]
+ [StringLength(50)]
+ public string LanguageCode { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("ʼ")]
+ public int Email { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("ַ")]
+ public int Internet { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("˰ַ")]
+ public bool AddressIsTaxable { get; set; }
+ [IsDataGridColum(true, 22)]
+ [Description("˰")]
+ public bool AddressIsTaxIncluded { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string FederalTax { get; set; }
+ [IsDataGridColum(true, 24)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string StateTax { get; set; }
+ [IsDataGridColum(true, 25)]
+ [Description("˰1")]
+ [StringLength(50)]
+ public string MiscTax1 { get; set; }
+ [IsDataGridColum(true, 26)]
+ [Description("˰2")]
+ [StringLength(50)]
+ public string MiscTax2 { get; set; }
+ [IsDataGridColum(true, 27)]
+ [Description("˰3")]
+ [StringLength(50)]
+ public string MiscTax3 { get; set; }
+ [IsDataGridColum(true, 28)]
+ [Description("˰")]
+ public bool TaxInCity { get; set; }
+ [IsDataGridColum(true, 29)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string TaxZone { get; set; }
+ [IsDataGridColum(true, 30)]
+ [Description("˰")]
+ public int TaxClass { get; set; }
+ [IsDataGridColum(true, 31)]
+ [Description("˰;")]
+ [StringLength(50)]
+ public string TaxUsage { get; set; }
+ [IsDataGridColum(true, 32)]
+ [Description("")]
+ [StringLength(50)]
+ public string Title { get; set; }
+ [IsDataGridColum(true, 33)]
+ [Description("ϵ")]
+ [StringLength(50)]
+ public string ContactName { get; set; }
+ [IsDataGridColum(true, 34)]
+ [Description("д")]
+ [StringLength(50)]
+ public string Initials { get; set; }
+ [IsDataGridColum(true, 35)]
+ [Description("")]
+ [StringLength(50)]
+ public string Function { get; set; }
+ [IsDataGridColum(true, 36)]
+ [Description("Ա")]
+ [StringLength(50)]
+ public string Gender { get; set; }
+ [IsDataGridColum(true, 37)]
+ [Description("Ҫϵ")]
+ public bool ContactIsPrimary { get; set; }
+ [IsDataGridColum(true, 38)]
+ [Description("Ҫϵ")]
+ public bool ContactIsSecondary { get; set; }
+ [IsDataGridColum(true, 39)]
+ [Description("")]
+ public bool Compens { get; set; }
+ [IsDataGridColum(true, 40)]
+ [Description("Ʊļ")]
+ public int GlProfileInvoice { get; set; }
+ [IsDataGridColum(true, 41)]
+ [Description("Ʊݿļ")]
+ public int GlProfileCreditNote { get; set; }
+ [IsDataGridColum(true, 42)]
+ [Description("Ԥļ")]
+ public int GlProfilePrepayment { get; set; }
+ [IsDataGridColum(true, 43)]
+ [Description("˿ļ")]
+ public int AccountGLProfile { get; set; }
+ [IsDataGridColum(true, 44)]
+ [Description("˻ļ")]
+ public int SubAccountProfile { get; set; }
+ [IsDataGridColum(true, 45)]
+ [Description("Ŵ")]
+ [StringLength(50)]
+ public string CreditAgencyReference { get; set; }
+ [IsDataGridColum(true, 46)]
+ [Description("̻")]
+ [StringLength(50)]
+ public string CommerceNumber { get; set; }
+ [IsDataGridColum(true, 47)]
+ [Description("TID֪ͨ")]
+ [StringLength(50)]
+ public string TidNotice { get; set; }
+ [IsDataGridColum(true, 48)]
+ [Description("ⲿͻ")]
+ [StringLength(50)]
+ public string ExternalCustomerNumber { get; set; }
+ [IsDataGridColum(true, 49)]
+ [Description("")]
+ [StringLength(50)]
+ public string Currency { get; set; }
+ [IsDataGridColum(true, 1505)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string SupplierType { get; set; }
+ [IsDataGridColum(true, 51)]
+ [Description("ɹ")]
+ [StringLength(50)]
+ public string Purchasetype { get; set; }
+ [IsDataGridColum(true, 52)]
+ [Description("֧")]
+ [StringLength(50)]
+ public string CreditTerms { get; set; }
+ [IsDataGridColum(true, 53)]
+ [Description("Ʊ״̬")]
+ [StringLength(50)]
+ public string InvoiceStatusCode { get; set; }
+ [IsDataGridColum(true, 54)]
+ [Description("")]
+ [StringLength(50)]
+ public string PaymentGroup { get; set; }
+ [IsDataGridColum(true, 55)]
+ [Description("ͻ")]
+ public bool SendRemittance { get; set; }
+ [IsDataGridColum(true, 56)]
+ [Description("ָ")]
+ public bool SplitAccount { get; set; }
+ [IsDataGridColum(true, 57)]
+ [Description("ʽ")]
+ [StringLength(50)]
+ public string ShipVia { get; set; }
+ [IsDataGridColum(true, 58)]
+ [Description("ע")]
+ [StringLength(50)]
+ public string Remarks { get; set; }
+ [IsDataGridColum(true, 59)]
+ [Description("")]
+ [StringLength(50)]
+ public string Carrier { get; set; }
+ [IsDataGridColum(true, 60)]
+ [Description("ɹϵ")]
+ [StringLength(50)]
+ public string Purchasecontact { get; set; }
+ [IsDataGridColum(true, 61)]
+ [Description("ռ˼")]
+ [StringLength(50)]
+ public string DayBookSet { get; set; }
+ [IsDataGridColum(true, 62)]
+ [Description("幩Ӧ")]
+ public bool KanBanSupplier { get; set; }
+ [IsDataGridColum(true, 63)]
+ [Description("")]
+ [StringLength(50)]
+ public string PromotionGroup { get; set; }
+ [IsDataGridColum(true, 64)]
+ [Description("ɹԱ")]
+ [StringLength(50)]
+ public string Buyer { get; set; }
+ [IsDataGridColum(true, 65)]
+ [Description("۸")]
+ [StringLength(50)]
+ public string PriceTable { get; set; }
+ [IsDataGridColum(true, 66)]
+ [Description("ۿ۱")]
+ [StringLength(50)]
+ public string DiscountTable { get; set; }
+ [IsDataGridColum(true, 67)]
+ [Description("̶۸")]
+ public bool FixedPrice { get; set; }
+ [IsDataGridColum(true, 68)]
+ [Description("۵۸")]
+ [StringLength(50)]
+ public string NonSoPrice { get; set; }
+ [IsDataGridColum(true, 69)]
+ [Description("иʽ")]
+ [StringLength(50)]
+ public string BankFormat { get; set; }
+ [IsDataGridColum(true, 70)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string SupplierBank { get; set; }
+ [IsDataGridColum(true, 71)]
+ [Description("")]
+ [StringLength(50)]
+ public string OwnBank { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 72)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 73)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 74)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_SUPPLIER_PART.cs b/Models/DataCenterTables/TS_SUPPLIER_PART.cs
new file mode 100644
index 0000000..f12e627
--- /dev/null
+++ b/Models/DataCenterTables/TS_SUPPLIER_PART.cs
@@ -0,0 +1,100 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ӧ")]
+ public class TS_SUPPLIER_PART : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexSupplierPart", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [Index("IndexSupplierPart", Order = 1, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 2)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string Supplier { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string SupplierPart { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Um { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("Ӧǰ")]
+ public int SupplierLeadTime { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("ʹÿͻ")]
+ public bool UseSoReductionPrice { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ͻ")]
+ public decimal SoPriceReduction { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ [StringLength(50)]
+ public string Currency { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("۵۸")]
+ public decimal QuotePrice { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("")]
+ public DateTime QuoteDate { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ public decimal QuoteQty { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("Ŀ")]
+ [StringLength(50)]
+ public string PriceList { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("")]
+ [StringLength(50)]
+ public string Manufacturer { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("")]
+ [StringLength(50)]
+ public string ManufacturerPart { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("ע")]
+ [StringLength(50)]
+ public string Comment { get; set; }
+
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 18)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_SUPPLIER_TYPE.cs b/Models/DataCenterTables/TS_SUPPLIER_TYPE.cs
new file mode 100644
index 0000000..93bd211
--- /dev/null
+++ b/Models/DataCenterTables/TS_SUPPLIER_TYPE.cs
@@ -0,0 +1,51 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ӧͱ")]
+ public class TS_SUPPLIER_TYPE : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexSupplierType", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_TEAM.cs b/Models/DataCenterTables/TS_TEAM.cs
new file mode 100644
index 0000000..44a30de
--- /dev/null
+++ b/Models/DataCenterTables/TS_TEAM.cs
@@ -0,0 +1,52 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ŷӱ")]
+ public class TS_TEAM : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexTeam", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true,2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_WMS_LOCATION.cs b/Models/DataCenterTables/TS_WMS_LOCATION.cs
new file mode 100644
index 0000000..b3f26be
--- /dev/null
+++ b/Models/DataCenterTables/TS_WMS_LOCATION.cs
@@ -0,0 +1,96 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("WMSλ")]
+ public class TS_WMS_LOCATION : IUpdatableTable, ISoftDelete, IDomainSite
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexWmsLocation", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Location { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("ERPλ")]
+ [StringLength(50)]
+ public string ErpLocation { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("")]
+ [StringLength(50)]
+ public string Area { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("״̬")]
+ [StringLength(50)]
+ public string InventoryStatus { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("Ա")]
+ [StringLength(50)]
+ public string WarehouseKeeper { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ֿ")]
+ [StringLength(50)]
+ public string WhseCode { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ public bool IsEnableNegativeStock { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ public bool AutoRemoveZeroStockDetail { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("")]
+ public decimal MaxBoxQty { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ public bool IsEnableMix { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("Ŀ")]
+ [StringLength(50)]
+ public string ProjectId { get; set; }
+
+
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 15)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TS_WORK_CENTER.cs b/Models/DataCenterTables/TS_WORK_CENTER.cs
new file mode 100644
index 0000000..2c552d7
--- /dev/null
+++ b/Models/DataCenterTables/TS_WORK_CENTER.cs
@@ -0,0 +1,102 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ı")]
+ public class TS_WORK_CENTER : IUpdatableTable, ISoftDelete
+ {
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexWorkCenter", Order = 0, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 1)]
+ [Description("Ĵ")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string Department { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("Զ̶")]
+ public bool AutoFirm { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("ϴԶ̶")]
+ public DateTime LastAutoFirm { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string Scheduler { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ȴʱ")]
+ public decimal Queue { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ȴʱ")]
+ public decimal Wait { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("豸/")]
+ public int MchOp { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("Ա")]
+ public decimal SetupMen { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("ȫԱ")]
+ public decimal RunCrew { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("")]
+ public decimal MchWkctr { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("")]
+ public decimal MchBdn { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("÷")]
+ public decimal SetupRte { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("˹")]
+ public decimal LbrRate { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("˹")]
+ public decimal BdnRate { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("˹")]
+ public decimal BdnPct { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("")]
+ [StringLength(50)]
+ public string Mch { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 21)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string UpdateUser { get; set; }
+
+ [Description("ʱ")]
+ public DateTime? UpdateTime { get; set; }
+
+ [Description("ɾ")]
+ public bool IsDeleted { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_ACCOUNT.cs b/Models/DataCenterTables/TT_ACCOUNT.cs
new file mode 100644
index 0000000..07869f6
--- /dev/null
+++ b/Models/DataCenterTables/TT_ACCOUNT.cs
@@ -0,0 +1,59 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+using CK.SCP.Models.ExchangeCenterTables;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ŀ")]
+ public class TT_ACCOUNT : TED_BASE, ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true,5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_BOM.cs b/Models/DataCenterTables/TT_BOM.cs
new file mode 100644
index 0000000..db1f658
--- /dev/null
+++ b/Models/DataCenterTables/TT_BOM.cs
@@ -0,0 +1,103 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("BOM")]
+
+ public class TT_BOM : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string ParentPart { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string ComponentPart { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("ο")]
+ [StringLength(50)]
+ public string Reference { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("Ч")]
+ public DateTime StartEffective { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("ÿ")]
+ public decimal QuantityPer { get; set; }
+ [IsDataGridColum(true,6)]
+ [Description("ṹ")]
+ [StringLength(50)]
+ public string StructureType { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("Ч")]
+ public DateTime EndEffective { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ע")]
+ [StringLength(50)]
+ public string Remarks { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("Ʒ")]
+ public decimal Scrap { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ǰ")]
+ public int LeadTimeOffset { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ public int Operation { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("")]
+ public int SequenceNumber { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("Ԥٷֱ")]
+ public decimal FporecastPercent { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("")]
+ [StringLength(50)]
+ public string OptionGroup { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("")]
+ [StringLength(50)]
+ public string Process { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 18)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_CODE.cs b/Models/DataCenterTables/TT_CODE.cs
new file mode 100644
index 0000000..daf9328
--- /dev/null
+++ b/Models/DataCenterTables/TT_CODE.cs
@@ -0,0 +1,60 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ͨô")]
+ public class TT_CODE : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("ͨô")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_CODE_TYPE.cs b/Models/DataCenterTables/TT_CODE_TYPE.cs
new file mode 100644
index 0000000..f06d850
--- /dev/null
+++ b/Models/DataCenterTables/TT_CODE_TYPE.cs
@@ -0,0 +1,59 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ͨôͱ")]
+ public class TT_CODE_TYPE : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("ͨʹ")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_COLOR.cs b/Models/DataCenterTables/TT_COLOR.cs
new file mode 100644
index 0000000..92a99d4
--- /dev/null
+++ b/Models/DataCenterTables/TT_COLOR.cs
@@ -0,0 +1,58 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ɫ")]
+ public class TT_COLOR : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_COST_CENTER.cs b/Models/DataCenterTables/TT_COST_CENTER.cs
new file mode 100644
index 0000000..8ef17b7
--- /dev/null
+++ b/Models/DataCenterTables/TT_COST_CENTER.cs
@@ -0,0 +1,58 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ɱı")]
+ public class TT_COST_CENTER : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_CUSTOMER.cs b/Models/DataCenterTables/TT_CUSTOMER.cs
new file mode 100644
index 0000000..5a60e40
--- /dev/null
+++ b/Models/DataCenterTables/TT_CUSTOMER.cs
@@ -0,0 +1,309 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ͻ")]
+ public class TT_CUSTOMER : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("ͻ")]
+ [StringLength(50)]
+ public string CustomerCode { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("ͻ")]
+ [StringLength(50)]
+ public string CustomerName { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string SearchName { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("м")]
+ [StringLength(50)]
+ public string SecondName { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("")]
+ [StringLength(50)]
+ public string ThirdName { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string GroupName { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string Active { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ͻַ")]
+ [StringLength(50)]
+ public string Address1 { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("ͻַ")]
+ [StringLength(50)]
+ public string Address2 { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ͻַ")]
+ [StringLength(50)]
+ public string Address3 { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("ʱ")]
+ [StringLength(50)]
+ public string ZipCode { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("")]
+ [StringLength(50)]
+ public string City { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("")]
+ [StringLength(50)]
+ public string Country { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("绰")]
+ [StringLength(50)]
+ public string Telephone { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("ʡ")]
+ [StringLength(50)]
+ public string province { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ [StringLength(50)]
+ public string County { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("")]
+ [StringLength(50)]
+ public string Fax { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("Դ")]
+ [StringLength(50)]
+ public string LanguageCode { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("ʼ")]
+ [StringLength(50)]
+ public string Email { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("ַ")]
+ [StringLength(50)]
+ public string Internet { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("˰ַ")]
+ [StringLength(50)]
+ public string AddressIsTaxable { get; set; }
+ [IsDataGridColum(true, 22)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string AddressIsTaxIncluded { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string FederalTax { get; set; }
+ [IsDataGridColum(true, 24)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string StateTax { get; set; }
+ [IsDataGridColum(true, 25)]
+ [Description("˰1")]
+ [StringLength(50)]
+ public string MiscTax1 { get; set; }
+ [IsDataGridColum(true, 26)]
+ [Description("˰2")]
+ [StringLength(50)]
+ public string MiscTax2 { get; set; }
+ [IsDataGridColum(true, 27)]
+ [Description("˰3")]
+ [StringLength(50)]
+ public string MiscTax3 { get; set; }
+ [IsDataGridColum(true, 28)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string TaxInCity { get; set; }
+ [IsDataGridColum(true, 29)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string TaxZone { get; set; }
+ [IsDataGridColum(true, 30)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string TaxClass { get; set; }
+ [IsDataGridColum(true, 31)]
+ [Description("˰;")]
+ [StringLength(50)]
+ public string TaxUsage { get; set; }
+ [IsDataGridColum(true, 32)]
+ [Description("")]
+ [StringLength(50)]
+ public string Title { get; set; }
+ [IsDataGridColum(true, 33)]
+ [Description("ϵ")]
+ [StringLength(50)]
+ public string ContactName { get; set; }
+ [IsDataGridColum(true, 34)]
+ [Description("д")]
+ [StringLength(50)]
+ public string Initials { get; set; }
+ [IsDataGridColum(true, 35)]
+ [Description("")]
+ [StringLength(50)]
+ public string Function { get; set; }
+ [IsDataGridColum(true, 36)]
+ [Description("Ա")]
+ [StringLength(50)]
+ public string Gender { get; set; }
+ [IsDataGridColum(true, 37)]
+ [Description("Ҫϵ")]
+ [StringLength(50)]
+ public string ContactIsPrimary { get; set; }
+ [IsDataGridColum(true, 38)]
+ [Description("Ҫϵ")]
+ [StringLength(50)]
+ public string ContactIsSecondary { get; set; }
+ [IsDataGridColum(true, 39)]
+ [Description("")]
+ [StringLength(50)]
+ public string Compens { get; set; }
+ [IsDataGridColum(true, 40)]
+ [Description("Ʊļ")]
+ [StringLength(50)]
+ public string GlProfileInvoice { get; set; }
+ [IsDataGridColum(true, 41)]
+ [Description("Ʊݿļ")]
+ [StringLength(50)]
+ public string GlProfileCreditNote { get; set; }
+ [IsDataGridColum(true, 42)]
+ [Description("Ԥļ")]
+ [StringLength(50)]
+ public string GlProfilePrepayment { get; set; }
+ [IsDataGridColum(true, 43)]
+ [Description("ۼļ")]
+ [StringLength(50)]
+ public string GLProfileDeduction { get; set; }
+ [IsDataGridColum(true, 44)]
+ [Description("˿ļ")]
+ [StringLength(50)]
+ public string AccountGLProfile { get; set; }
+ [IsDataGridColum(true, 45)]
+ [Description("ÿļ")]
+ [StringLength(50)]
+ public string FinanceChargeProfile { get; set; }
+ [IsDataGridColum(true, 46)]
+ [Description("˻ļ")]
+ [StringLength(50)]
+ public string SubAccountProfile { get; set; }
+ [IsDataGridColum(true, 47)]
+ [Description("")]
+ [StringLength(50)]
+ public string Currency { get; set; }
+ [IsDataGridColum(true, 48)]
+ [Description("ͻ")]
+ [StringLength(50)]
+ public string Customertype { get; set; }
+ [IsDataGridColum(true, 49)]
+ [Description("֧")]
+ [StringLength(50)]
+ public string CreditTerms { get; set; }
+ [IsDataGridColum(true, 50)]
+ [Description("Ʊ״̬")]
+ [StringLength(50)]
+ public string InvoiceStatusCode { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string PaymentGroup { get; set; }
+
+ [Description("˵ϸ")]
+ [StringLength(50)]
+ public string BillingSchedule { get; set; }
+
+ [Description("Ʊտ")]
+ [StringLength(50)]
+ public string BillPayee { get; set; }
+
+ [Description("ƱȨ")]
+ [StringLength(50)]
+ public string InvoicebyAuthorization { get; set; }
+ [IsDataGridColum(true, 51)]
+ [Description("Ա")]
+ [StringLength(50)]
+ public string SalesPerson { get; set; }
+ [IsDataGridColum(true, 52)]
+ [Description("ʽ")]
+ [StringLength(50)]
+ public string ShipVia { get; set; }
+ [IsDataGridColum(true, 53)]
+ [Description("ת˰")]
+ [StringLength(50)]
+ public string Resale { get; set; }
+ [IsDataGridColum(true, 54)]
+ [Description("ע")]
+ [StringLength(50)]
+ public string Remarks { get; set; }
+ [IsDataGridColum(true, 55)]
+ [Description("")]
+ [StringLength(50)]
+ public string Region { get; set; }
+ [IsDataGridColum(true, 56)]
+ [Description("ۿ۱")]
+ [StringLength(50)]
+ public string DiscountTable { get; set; }
+ [IsDataGridColum(true, 57)]
+ [Description("̶۸")]
+ [StringLength(50)]
+ public string FixfdPrice { get; set; }
+ [IsDataGridColum(true, 58)]
+ [Description("ռ˼")]
+ [StringLength(50)]
+ public string DayBookSet { get; set; }
+ [IsDataGridColum(true, 59)]
+ [Description("иʽ")]
+ [StringLength(50)]
+ public string BankFormat { get; set; }
+ [IsDataGridColum(true, 60)]
+ [Description("ͻ")]
+ [StringLength(50)]
+ public string CustomerBank { get; set; }
+ [IsDataGridColum(true, 61)]
+ [Description("")]
+ [StringLength(50)]
+ public string OwnBank { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 62)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 63)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 64)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 65)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_CUSTOMER_PART.cs b/Models/DataCenterTables/TT_CUSTOMER_PART.cs
new file mode 100644
index 0000000..29d9461
--- /dev/null
+++ b/Models/DataCenterTables/TT_CUSTOMER_PART.cs
@@ -0,0 +1,74 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ͻ")]
+ public class TT_CUSTOMER_PART : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("ͻ/")]
+ [StringLength(50)]
+ public string CustomerShipto { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("ͻĿ")]
+ [StringLength(50)]
+ public string CustomerPart { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ע")]
+ [StringLength(50)]
+ public string Comment { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("ʾͻ")]
+ [StringLength(50)]
+ public string DisplayCustomerPart { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("ͻϹ̱")]
+ [StringLength(50)]
+ public string CustomerPartEcoNbr { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 9)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_CUSTOMER_TYPE.cs b/Models/DataCenterTables/TT_CUSTOMER_TYPE.cs
new file mode 100644
index 0000000..5d2a498
--- /dev/null
+++ b/Models/DataCenterTables/TT_CUSTOMER_TYPE.cs
@@ -0,0 +1,58 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ͻͱ")]
+ public class TT_CUSTOMER_TYPE : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_DEPARTMENT.cs b/Models/DataCenterTables/TT_DEPARTMENT.cs
new file mode 100644
index 0000000..7d0ddf3
--- /dev/null
+++ b/Models/DataCenterTables/TT_DEPARTMENT.cs
@@ -0,0 +1,58 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ű")]
+ public class TT_DEPARTMENT : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("Ŵ")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_DOMAIN.cs b/Models/DataCenterTables/TT_DOMAIN.cs
new file mode 100644
index 0000000..30f56c5
--- /dev/null
+++ b/Models/DataCenterTables/TT_DOMAIN.cs
@@ -0,0 +1,58 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ݱ")]
+ public class TT_DOMAIN : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_EDI_DATA.cs b/Models/DataCenterTables/TT_EDI_DATA.cs
new file mode 100644
index 0000000..f1509b9
--- /dev/null
+++ b/Models/DataCenterTables/TT_EDI_DATA.cs
@@ -0,0 +1,96 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("EDIݱ")]
+ public class TT_EDI_DATA : TED_BASE,ITaskTable
+ {
+
+ [IsDataGridColum(true, 1)]
+ [Description("۶")]
+ [StringLength(50)]
+ public string CustomerOrder { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string ShipFrom { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("ͻ")]
+ [StringLength(50)]
+ public string Customer { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Required(ErrorMessage = "벻Ϊ")]
+ [Index("IndexEdiData", Order = 1, IsUnique = true, IsClustered = false)]
+ [Description("ͻ")]
+ [StringLength(50)]
+ public string CustomerPart { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("к")]
+ public int Line { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string Part { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ɹ")]
+ [StringLength(50)]
+ public string PurchaseOrder { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ͻο")]
+ [StringLength(50)]
+ public string CustomerReference { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ public DateTime ReceiveDate { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ʱ")]
+ public DateTime ReceiveTime { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ public DateTime DemandDate { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("")]
+ public decimal DemandQuantity { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 15)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_ENTITY.cs b/Models/DataCenterTables/TT_ENTITY.cs
new file mode 100644
index 0000000..e236438
--- /dev/null
+++ b/Models/DataCenterTables/TT_ENTITY.cs
@@ -0,0 +1,58 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ƶλ")]
+ public class TT_ENTITY : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("Ƶλ")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_LINE.cs b/Models/DataCenterTables/TT_LINE.cs
new file mode 100644
index 0000000..2f47177
--- /dev/null
+++ b/Models/DataCenterTables/TT_LINE.cs
@@ -0,0 +1,99 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("߱")]
+ public class TT_LINE : ITaskTable
+ {
+
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string ProductionLine { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("˵")]
+ [StringLength(50)]
+ public string Description { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("/Сʱ")]
+ public decimal UnitsHour { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("дС")]
+ public bool EnableRunSize { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public decimal NumberOfLines { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ʱ仺-")]
+ public int DurationBuffer { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ʱ仺ʱ")]
+ [StringLength(50)]
+ public string DurationBufferHMS { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("ʱ-")]
+ public int SetupTime { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ʱ")]
+ [StringLength(50)]
+ public string SetupTimeHMS { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("Զ̶")]
+ public bool LnAutofirm { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("ϴԶ̶")]
+ public DateTime LnLastAutofirm { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("ID")]
+ [StringLength(50)]
+ public string LnScheduler { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("")]
+ [StringLength(50)]
+ public string Dtendlit { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("ں")]
+ public int EndNumber { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 15)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_LINE_PART.cs b/Models/DataCenterTables/TT_LINE_PART.cs
new file mode 100644
index 0000000..8ef9fe3
--- /dev/null
+++ b/Models/DataCenterTables/TT_LINE_PART.cs
@@ -0,0 +1,114 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ϵ")]
+ public class TT_LINE_PART : TED_BASE,ITaskTable
+ {
+
+ [IsDataGridColum(true, 1)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [Index("IndexLinePart", Order = 1, IsUnique = true, IsClustered = false)]
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string ProductionLine { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʼ")]
+ public DateTime StartDate { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("/Сʱ")]
+ public decimal UnitsHour { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public decimal NumberOfLines { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ʱ-")]
+ public int SetupTime { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ʱ")]
+ [StringLength(50)]
+ public string SetupTimeHMS { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ public bool PrimaryLine { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("Ա")]
+ public decimal SetupCrew { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("С")]
+ public int SetSize { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("ȫԱ")]
+ public decimal RunCrew { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("С")]
+ public int RunSize { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("嵥")]
+ [StringLength(50)]
+ public string BomCode { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("")]
+ [StringLength(50)]
+ public string Routing { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("ID")]
+ [StringLength(50)]
+ public string ToolId { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("˳1")]
+ [StringLength(50)]
+ public string RunSequence1 { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("˳2")]
+ [StringLength(50)]
+ public string RunSequence2 { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("ע")]
+ public bool Comments { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 22)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 24)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 25)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+ [IsDataGridColum(true, 26)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_LOCATION.cs b/Models/DataCenterTables/TT_LOCATION.cs
new file mode 100644
index 0000000..0f35880
--- /dev/null
+++ b/Models/DataCenterTables/TT_LOCATION.cs
@@ -0,0 +1,103 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+using CK.SCP.Models.ExchangeCenterTables;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("λ")]
+ public class TT_LOCATION : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("ص")]
+ [StringLength(50)]
+
+ public string Site { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Location { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("״̬")]
+ [StringLength(50)]
+ public string InventoryStatus { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("Ŀ")]
+ [StringLength(50)]
+ public string Project { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public DateTime DateCreated { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ public bool Permanent { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ [StringLength(50)]
+ public string Type { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ public bool SinglePart { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("/ο")]
+ public bool SingleLotReference { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ public decimal Capacity { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Um { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("λ")]
+ public bool ReservedLocations { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("ʵַ")]
+ [StringLength(50)]
+ public string PhysicalAddress { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("״̬")]
+ [StringLength(50)]
+ public string Status { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 18)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_MES_DATA.cs b/Models/DataCenterTables/TT_MES_DATA.cs
new file mode 100644
index 0000000..e38ebf1
--- /dev/null
+++ b/Models/DataCenterTables/TT_MES_DATA.cs
@@ -0,0 +1,49 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Mesݱ")]
+ public class TT_MES_DATA : TED_BASE,ITaskTable
+ {
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 3)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_PACK.cs b/Models/DataCenterTables/TT_PACK.cs
new file mode 100644
index 0000000..98a7359
--- /dev/null
+++ b/Models/DataCenterTables/TT_PACK.cs
@@ -0,0 +1,66 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("")]
+ public class TT_PACK : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+
+ [IsDataGridColum(true, 2)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string UM { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("üλ")]
+ [StringLength(50)]
+ public string AlternateUm { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("λ")]
+ public int UmConversion { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 8)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_PART_DET.cs b/Models/DataCenterTables/TT_PART_DET.cs
new file mode 100644
index 0000000..fd68cff
--- /dev/null
+++ b/Models/DataCenterTables/TT_PART_DET.cs
@@ -0,0 +1,254 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ϸ")]
+ public class TT_PART_DET : TED_BASE,ITaskTable
+ {
+
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("ABC ")]
+ [StringLength(50)]
+ public string AbcClass { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("ſ")]
+ [StringLength(50)]
+ public string LotControl { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Location { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string LocationType { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("Զ")]
+ public bool AutoMaticLotNumbers { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ƽ")]
+ public int AverageInterval { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("̵")]
+ public int CycleCountInterval { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ public int ShelfLife { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ؼ")]
+ public bool KeyPart { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("ɹջ״̬")]
+ [StringLength(50)]
+ public string PoReceiptStatus { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("Ч")]
+ public bool RctPoActive { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("ӹջ״̬")]
+ [StringLength(50)]
+ public string WoReceiptStatus { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("Ч")]
+ public bool RctWoActive { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("ǿ涩")]
+ [StringLength(50)]
+ public string MemoOrderType { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("ƻ")]
+ public bool MasterSchedule { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("ƻ")]
+ public bool PlanOrders { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("ʱ")]
+ public int TimeFence { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("")]
+ [StringLength(50)]
+ public string OrderPolicy { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("")]
+ public decimal OrderQuantity { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("")]
+ public int OrderPeriod { get; set; }
+ [IsDataGridColum(true, 22)]
+ [Description("ȫ")]
+ public decimal SafetyStock { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("ȫǰ")]
+ public decimal SafetyTime { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("ٶ")]
+ public decimal ReorderPoint { get; set; }
+ [IsDataGridColum(true, 25)]
+ [Description("ƻ")]
+ [StringLength(50)]
+ public string PlanningRev { get; set; }
+ [IsDataGridColum(true, 26)]
+ [Description("ԭ")]
+ public bool IssuePolicy { get; set; }
+ [IsDataGridColum(true, 27)]
+ [Description("ɹԱ/ƻԱ")]
+ [StringLength(50)]
+ public string BuyerPlanner { get; set; }
+ [IsDataGridColum(true, 28)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string Supplier { get; set; }
+ [IsDataGridColum(true, 29)]
+ [Description("ɹص")]
+ [StringLength(50)]
+ public string PoSite { get; set; }
+ [IsDataGridColum(true, 30)]
+ [Description("ɹ/")]
+ [StringLength(50)]
+ public string PurMfg { get; set; }
+ [IsDataGridColum(true, 31)]
+ [Description("")]
+ [StringLength(50)]
+ public string ConfigurationType { get; set; }
+ [IsDataGridColum(true, 32)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string InspectionLocation { get; set; }
+ [IsDataGridColum(true, 33)]
+ [Description("Ҫ")]
+ public bool InspectionRequired { get; set; }
+ [IsDataGridColum(true, 34)]
+ [Description("ǰ")]
+ public int InspectionLeadTime { get; set; }
+ [IsDataGridColum(true, 35)]
+ [Description("ۼǰ")]
+ public int CumulativeLeadTime { get; set; }
+ [IsDataGridColum(true, 36)]
+ [Description("ǰ")]
+ public int ManufacturingLedaTime { get; set; }
+ [IsDataGridColum(true, 37)]
+ [Description("ɹǰ")]
+ public int PurchaseLeadTime { get; set; }
+ [IsDataGridColum(true, 38)]
+ [Description("ATPʵʩˮƽ")]
+ [StringLength(50)]
+ public string AtpEnforcementLevel { get; set; }
+ [IsDataGridColum(true, 39)]
+ [Description("ϵATP")]
+ public bool FamilyATP { get; set; }
+ [IsDataGridColum(true, 40)]
+ [Description("ATPˮƽ")]
+ public int AtpHorizon { get; set; }
+ [IsDataGridColum(true, 41)]
+ [Description("1")]
+ [StringLength(50)]
+ public string RunSeq1 { get; set; }
+ [IsDataGridColum(true, 42)]
+ [Description("2")]
+ [StringLength(50)]
+ public string RunSeq2 { get; set; }
+ [IsDataGridColum(true, 43)]
+ [Description("")]
+ public bool Phantom { get; set; }
+ [IsDataGridColum(true, 44)]
+ [Description("С")]
+ public decimal MinimumOrder { get; set; }
+ [IsDataGridColum(true, 45)]
+ [Description("")]
+ public decimal MaximumOrder { get; set; }
+ [IsDataGridColum(true, 46)]
+ [Description("")]
+ public decimal OrderMultiple { get; set; }
+ [IsDataGridColum(true, 47)]
+ [Description("ڲĹ")]
+ public bool OperationBasedYield { get; set; }
+ [IsDataGridColum(true, 48)]
+ [Description("")]
+ public decimal YieldPercent { get; set; }
+ [IsDataGridColum(true, 49)]
+ [Description("ʱ")]
+ [StringLength(50)]
+ public string RunTime { get; set; }
+ [IsDataGridColum(true, 50)]
+ [Description("ʱ")]
+ public decimal SetupTime { get; set; }
+ [IsDataGridColum(true, 51)]
+ [Description("EMT")]
+ [StringLength(50)]
+ public string EmtType { get; set; }
+ [IsDataGridColum(true, 52)]
+ [Description("EMTԶ")]
+ public bool AutomaticEmtProcessing { get; set; }
+ [IsDataGridColum(true, 53)]
+ [Description("")]
+ [StringLength(50)]
+ public string NetWorkCode { get; set; }
+ [IsDataGridColum(true, 54)]
+ [Description("̴")]
+ [StringLength(50)]
+ public string RoutingCode { get; set; }
+ [IsDataGridColum(true, 55)]
+ [Description("嵥/䷽")]
+ [StringLength(50)]
+ public string BomFormulaCode { get; set; }
+ [IsDataGridColum(true, 56)]
+ [Description("")]
+ [StringLength(50)]
+ public string ReplenishmentMethod { get; set; }
+ [IsDataGridColum(true, 57)]
+ [Description("Ƿ")]
+ [StringLength(50)]
+ public string IsMaster { get; set; }
+ [IsDataGridColum(true, 58)]
+ [Description("ɫ")]
+ [StringLength(50)]
+ public string PartColor { get; set; }
+
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 59)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 60)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 61)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 62)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 63)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 64)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_PART_MSTR.cs b/Models/DataCenterTables/TT_PART_MSTR.cs
new file mode 100644
index 0000000..5a2d6ad
--- /dev/null
+++ b/Models/DataCenterTables/TT_PART_MSTR.cs
@@ -0,0 +1,144 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("")]
+ public class TT_PART_MSTR : TED_BASE,ITaskTable
+ {
+
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("1")]
+ [StringLength(50)]
+ public string Desc1 { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("2")]
+ [StringLength(50)]
+ public string Desc2 { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Um { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("Ʒ")]
+ [StringLength(50)]
+ public string ProdLine { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public DateTime AddDate { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string DsgnGroup { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ [StringLength(50)]
+ public string PromotionGroup { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string PartType { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("״̬")]
+ [StringLength(50)]
+ public string Status { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ [StringLength(50)]
+ public string Group { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("ͼֽ")]
+ [StringLength(50)]
+ public string Drawing { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("Ŀ")]
+ [StringLength(50)]
+ public string PartRevision { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("ͼֽλ")]
+ [StringLength(50)]
+ public string DrawingLocation { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("С")]
+ [StringLength(50)]
+ public string Size { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("۸ۿ")]
+ [StringLength(50)]
+ public string PriceBreakCategory { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("")]
+ public bool AuxiliaryMaterial { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("߽")]
+ public bool OfflineSettlement { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("Qȼ")]
+ [StringLength(50)]
+ public string Qgrade { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("")]
+ [StringLength(50)]
+ public string WmsPartType { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("ʽ")]
+ [StringLength(50)]
+ public string ManageWay { get; set; }
+ [IsDataGridColum(true, 22)]
+ [Description("")]
+ [StringLength(50)]
+ public string InventoryCode { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("ͣ/")]
+ [StringLength(50)]
+ public string ManageType { get; set; }
+ [IsDataGridColum(true, 24)]
+ [Description("Ƿ")]
+ [StringLength(50)]
+ public string InspectType { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 25)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 26)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 27)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 28)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 29)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 30)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_PRODUCT_LINE.cs b/Models/DataCenterTables/TT_PRODUCT_LINE.cs
new file mode 100644
index 0000000..44dab7a
--- /dev/null
+++ b/Models/DataCenterTables/TT_PRODUCT_LINE.cs
@@ -0,0 +1,64 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ʒ")]
+ public class TT_PRODUCT_LINE : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("Ʒ")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("Ӧ˰")]
+ public bool Taxable { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("˰")]
+ public int TaxClass { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 7)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_PROJECT.cs b/Models/DataCenterTables/TT_PROJECT.cs
new file mode 100644
index 0000000..5695baf
--- /dev/null
+++ b/Models/DataCenterTables/TT_PROJECT.cs
@@ -0,0 +1,58 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ŀ")]
+ public class TT_PROJECT : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_PURCHASE_PRICE.cs b/Models/DataCenterTables/TT_PURCHASE_PRICE.cs
new file mode 100644
index 0000000..957621f
--- /dev/null
+++ b/Models/DataCenterTables/TT_PURCHASE_PRICE.cs
@@ -0,0 +1,88 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ɹ۸")]
+ public class TT_PURCHASE_PRICE : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("Ŀ")]
+ [StringLength(50)]
+ public string PriceList { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("˵")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("Ʒ")]
+ [StringLength(50)]
+ public string ProductLine { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("")]
+ [StringLength(50)]
+ public string Currency { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Um { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ʼ")]
+ public DateTime Start { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ public DateTime ExpireDate { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string AmountType { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("")]
+ public decimal Amount { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 13)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_ROUTING.cs b/Models/DataCenterTables/TT_ROUTING.cs
new file mode 100644
index 0000000..950879b
--- /dev/null
+++ b/Models/DataCenterTables/TT_ROUTING.cs
@@ -0,0 +1,132 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ձ")]
+ public class TT_ROUTING : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("̴")]
+ [StringLength(50)]
+ public string RoutingCode { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ public int Operation { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("ʼ")]
+ public DateTime StartDate { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("")]
+ [StringLength(50)]
+ public string StandardOperration { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("")]
+ [StringLength(50)]
+ public string WorkCenter { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string Machine { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("˵")]
+ [StringLength(50)]
+ public string Description { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("/")]
+ public int MachinesPerOperation { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("ƽмӹ")]
+ public int OverlapUnits { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("Ŷʱ")]
+ public decimal QueueTime { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("ȴʱ")]
+ public decimal WaitTime { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("ֽεĹ")]
+ public bool MilestoneOperation { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("תǰ")]
+ public int SubcontractLt { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("Ա")]
+ public decimal SetupCrew { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("ȫԱ")]
+ public decimal RunCrew { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("ʱ")]
+ public decimal SetupTime { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("ʱ")]
+ public decimal RunTime { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("ƶʱ")]
+ public decimal MoveTime { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("")]
+ public DateTime EndDate { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("")]
+ public decimal YieldPercent { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("ߴ")]
+ [StringLength(50)]
+ public string ToolCode { get; set; }
+ [IsDataGridColum(true, 22)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string Supplier { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("ֵ")]
+ public decimal InventoryValue { get; set; }
+ [IsDataGridColum(true, 24)]
+ [Description("תɱ")]
+ public decimal SubcontractCost { get; set; }
+ [IsDataGridColum(true, 25)]
+ [Description("ע")]
+ public bool Comments { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 26)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 27)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 28)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 29)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 30)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 31)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_SALE_PRICE.cs b/Models/DataCenterTables/TT_SALE_PRICE.cs
new file mode 100644
index 0000000..5098f77
--- /dev/null
+++ b/Models/DataCenterTables/TT_SALE_PRICE.cs
@@ -0,0 +1,89 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ۼ۸")]
+ public class TT_SALE_PRICE : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("Ŀ")]
+ [StringLength(50)]
+ public string PriceList { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("˵")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("Ʒ")]
+ [StringLength(50)]
+ public string ProductLine { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("")]
+ [StringLength(50)]
+ public string Currency { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Um { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ʼ")]
+ public DateTime Start { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ public DateTime ExpireDate { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ [StringLength(50)]
+ public string AmountType { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("")]
+ public decimal Amount { get; set; }
+
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 13)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_SHIFT.cs b/Models/DataCenterTables/TT_SHIFT.cs
new file mode 100644
index 0000000..238ed3b
--- /dev/null
+++ b/Models/DataCenterTables/TT_SHIFT.cs
@@ -0,0 +1,58 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ת")]
+ public class TT_SHIFT : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+ [IsDataGridColum(true, 5)]
+
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_SITE.cs b/Models/DataCenterTables/TT_SITE.cs
new file mode 100644
index 0000000..cc7cf59
--- /dev/null
+++ b/Models/DataCenterTables/TT_SITE.cs
@@ -0,0 +1,96 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ص")]
+ public class TT_SITE : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("Ƶλ")]
+ [StringLength(50)]
+ public string Entity { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("״̬")]
+ [StringLength(50)]
+ public string Status { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("Զɿλ")]
+ public bool AutoLocation { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string InspLocation { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("EMTӦ")]
+ [StringLength(50)]
+ public string BtbSupplier { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("ⲿӦ")]
+ public bool ExtSupplier { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("תƲĿ")]
+ [StringLength(50)]
+ public string XferAcct { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("תƲ˻")]
+ [StringLength(50)]
+ public string XferSub { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("תƲɱ")]
+ [StringLength(50)]
+ public string XferCc { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("POλ")]
+ [StringLength(50)]
+ public string GitLocation { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("ʹüƻ/ȵĹ̨")]
+ public bool UsePlanSchedWbs { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 17)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_STAND_COST_PRICE.cs b/Models/DataCenterTables/TT_STAND_COST_PRICE.cs
new file mode 100644
index 0000000..0685cf8
--- /dev/null
+++ b/Models/DataCenterTables/TT_STAND_COST_PRICE.cs
@@ -0,0 +1,73 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ɱ۸")]
+ public class TT_STAND_COST_PRICE : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string Part { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("ϳɱ")]
+ public int MaterialCost { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("˹ɱ")]
+ public int LaborCost { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ӳɱ")]
+ public int BurdenCost { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("ɱ")]
+ public int OverheadCost { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("תɱ")]
+ public int SubcontrCost { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ɱ")]
+ public int CostSet { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 10)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_SUB_ACCOUNT.cs b/Models/DataCenterTables/TT_SUB_ACCOUNT.cs
new file mode 100644
index 0000000..751b255
--- /dev/null
+++ b/Models/DataCenterTables/TT_SUB_ACCOUNT.cs
@@ -0,0 +1,58 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("˻")]
+ public class TT_SUB_ACCOUNT : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("˻")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("˻")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_SUPPLIER.cs b/Models/DataCenterTables/TT_SUPPLIER.cs
new file mode 100644
index 0000000..30eeb97
--- /dev/null
+++ b/Models/DataCenterTables/TT_SUPPLIER.cs
@@ -0,0 +1,313 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ӧ̱")]
+ public class TT_SUPPLIER : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("Ӧ̴")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string Name { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string SearchName { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("м")]
+ [StringLength(50)]
+ public string SecondName { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("")]
+ [StringLength(50)]
+ public string ThirdName { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string GroupName { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ public bool Active { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("Ӧ̵ַ")]
+ [StringLength(50)]
+ public string Address1 { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("Ӧ̵ַ")]
+ [StringLength(50)]
+ public string Address2 { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("Ӧ̵ַ")]
+ [StringLength(50)]
+ public string Address3 { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("ʱ")]
+ public int ZipCode { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("")]
+ [StringLength(50)]
+ public string City { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("")]
+ [StringLength(50)]
+ public string Country { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("绰")]
+ public int Telephone { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("ʡ")]
+ [StringLength(50)]
+ public string province { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ [StringLength(50)]
+ public string County { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("")]
+ public int Fax { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("Դ")]
+ [StringLength(50)]
+ public string LanguageCode { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("ʼ")]
+ public int Email { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("ַ")]
+ public int Internet { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("˰ַ")]
+ public bool AddressIsTaxable { get; set; }
+ [IsDataGridColum(true, 22)]
+ [Description("˰")]
+ public bool AddressIsTaxIncluded { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string FederalTax { get; set; }
+ [IsDataGridColum(true, 24)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string StateTax { get; set; }
+ [IsDataGridColum(true, 25)]
+ [Description("˰1")]
+ [StringLength(50)]
+ public string MiscTax1 { get; set; }
+ [IsDataGridColum(true, 26)]
+ [Description("˰2")]
+ [StringLength(50)]
+ public string MiscTax2 { get; set; }
+ [IsDataGridColum(true, 27)]
+ [Description("˰3")]
+ [StringLength(50)]
+ public string MiscTax3 { get; set; }
+ [IsDataGridColum(true, 28)]
+ [Description("˰")]
+ public bool TaxInCity { get; set; }
+ [IsDataGridColum(true, 29)]
+ [Description("˰")]
+ [StringLength(50)]
+ public string TaxZone { get; set; }
+ [IsDataGridColum(true, 30)]
+ [Description("˰")]
+ public int TaxClass { get; set; }
+ [IsDataGridColum(true, 31)]
+ [Description("˰;")]
+ [StringLength(50)]
+ public string TaxUsage { get; set; }
+ [IsDataGridColum(true, 32)]
+ [Description("")]
+ [StringLength(50)]
+ public string Title { get; set; }
+ [IsDataGridColum(true, 33)]
+ [Description("ϵ")]
+ [StringLength(50)]
+ public string ContactName { get; set; }
+ [IsDataGridColum(true, 34)]
+ [Description("д")]
+ [StringLength(50)]
+ public string Initials { get; set; }
+ [IsDataGridColum(true, 35)]
+ [Description("")]
+ [StringLength(50)]
+ public string Function { get; set; }
+ [IsDataGridColum(true, 36)]
+ [Description("Ա")]
+ [StringLength(50)]
+ public string Gender { get; set; }
+ [IsDataGridColum(true, 37)]
+ [Description("Ҫϵ")]
+ public bool ContactIsPrimary { get; set; }
+ [IsDataGridColum(true, 38)]
+ [Description("Ҫϵ")]
+ public bool ContactIsSecondary { get; set; }
+ [IsDataGridColum(true, 39)]
+ [Description("")]
+ public bool Compens { get; set; }
+ [IsDataGridColum(true, 40)]
+ [Description("Ʊļ")]
+ public int GlProfileInvoice { get; set; }
+ [IsDataGridColum(true, 41)]
+ [Description("Ʊݿļ")]
+ public int GlProfileCreditNote { get; set; }
+ [IsDataGridColum(true, 42)]
+ [Description("Ԥļ")]
+ public int GlProfilePrepayment { get; set; }
+ [IsDataGridColum(true, 43)]
+ [Description("˿ļ")]
+ public int AccountGLProfile { get; set; }
+ [IsDataGridColum(true, 44)]
+ [Description("˻ļ")]
+ public int SubAccountProfile { get; set; }
+ [IsDataGridColum(true, 45)]
+ [Description("Ŵ")]
+ [StringLength(50)]
+ public string CreditAgencyReference { get; set; }
+ [IsDataGridColum(true, 46)]
+ [Description("̻")]
+ [StringLength(50)]
+ public string CommerceNumber { get; set; }
+ [IsDataGridColum(true, 47)]
+ [Description("TID֪ͨ")]
+ [StringLength(50)]
+ public string TidNotice { get; set; }
+ [IsDataGridColum(true, 48)]
+ [Description("ⲿͻ")]
+ [StringLength(50)]
+ public string ExternalCustomerNumber { get; set; }
+ [IsDataGridColum(true, 49)]
+ [Description("")]
+ [StringLength(50)]
+ public string Currency { get; set; }
+ [IsDataGridColum(true, 1505)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string SupplierType { get; set; }
+ [IsDataGridColum(true, 51)]
+ [Description("ɹ")]
+ [StringLength(50)]
+ public string Purchasetype { get; set; }
+ [IsDataGridColum(true, 52)]
+ [Description("֧")]
+ [StringLength(50)]
+ public string CreditTerms { get; set; }
+ [IsDataGridColum(true, 53)]
+ [Description("Ʊ״̬")]
+ [StringLength(50)]
+ public string InvoiceStatusCode { get; set; }
+ [IsDataGridColum(true, 54)]
+ [Description("")]
+ [StringLength(50)]
+ public string PaymentGroup { get; set; }
+ [IsDataGridColum(true, 55)]
+ [Description("ͻ")]
+ public bool SendRemittance { get; set; }
+ [IsDataGridColum(true, 56)]
+ [Description("ָ")]
+ public bool SplitAccount { get; set; }
+ [IsDataGridColum(true, 57)]
+ [Description("ʽ")]
+ [StringLength(50)]
+ public string ShipVia { get; set; }
+ [IsDataGridColum(true, 58)]
+ [Description("ע")]
+ [StringLength(50)]
+ public string Remarks { get; set; }
+ [IsDataGridColum(true, 59)]
+ [Description("")]
+ [StringLength(50)]
+ public string Carrier { get; set; }
+ [IsDataGridColum(true, 60)]
+ [Description("ɹϵ")]
+ [StringLength(50)]
+ public string Purchasecontact { get; set; }
+ [IsDataGridColum(true, 61)]
+ [Description("ռ˼")]
+ [StringLength(50)]
+ public string DayBookSet { get; set; }
+ [IsDataGridColum(true, 62)]
+ [Description("幩Ӧ")]
+ public bool KanBanSupplier { get; set; }
+ [IsDataGridColum(true, 63)]
+ [Description("")]
+ [StringLength(50)]
+ public string PromotionGroup { get; set; }
+ [IsDataGridColum(true, 64)]
+ [Description("ɹԱ")]
+ [StringLength(50)]
+ public string Buyer { get; set; }
+ [IsDataGridColum(true, 65)]
+ [Description("۸")]
+ [StringLength(50)]
+ public string PriceTable { get; set; }
+ [IsDataGridColum(true, 66)]
+ [Description("ۿ۱")]
+ [StringLength(50)]
+ public string DiscountTable { get; set; }
+ [IsDataGridColum(true, 67)]
+ [Description("̶۸")]
+ public bool FixedPrice { get; set; }
+ [IsDataGridColum(true, 68)]
+ [Description("۵۸")]
+ [StringLength(50)]
+ public string NonSoPrice { get; set; }
+ [IsDataGridColum(true, 69)]
+ [Description("иʽ")]
+ [StringLength(50)]
+ public string BankFormat { get; set; }
+ [IsDataGridColum(true, 70)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string SupplierBank { get; set; }
+ [IsDataGridColum(true, 71)]
+ [Description("")]
+ [StringLength(50)]
+ public string OwnBank { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 72)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 73)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 74)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 75)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 76)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 77)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_SUPPLIER_PART.cs b/Models/DataCenterTables/TT_SUPPLIER_PART.cs
new file mode 100644
index 0000000..a768558
--- /dev/null
+++ b/Models/DataCenterTables/TT_SUPPLIER_PART.cs
@@ -0,0 +1,105 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ӧ")]
+ public class TT_SUPPLIER_PART : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("Ϻ")]
+ [StringLength(50)]
+ public string PartCode { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string Supplier { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("Ӧ")]
+ [StringLength(50)]
+ public string SupplierPart { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Um { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("Ӧǰ")]
+ public int SupplierLeadTime { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("ʹÿͻ")]
+ public bool UseSoReductionPrice { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ͻ")]
+ public decimal SoPriceReduction { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ [StringLength(50)]
+ public string Currency { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("۵۸")]
+ public decimal QuotePrice { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("")]
+ public DateTime QuoteDate { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ public decimal QuoteQty { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("Ŀ")]
+ [StringLength(50)]
+ public string PriceList { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("")]
+ [StringLength(50)]
+ public string Manufacturer { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("")]
+ [StringLength(50)]
+ public string ManufacturerPart { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("ע")]
+ [StringLength(50)]
+ public string Comment { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 18)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 21)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_SUPPLIER_TYPE.cs b/Models/DataCenterTables/TT_SUPPLIER_TYPE.cs
new file mode 100644
index 0000000..dc9ac4b
--- /dev/null
+++ b/Models/DataCenterTables/TT_SUPPLIER_TYPE.cs
@@ -0,0 +1,58 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ӧͱ")]
+ public class TT_SUPPLIER_TYPE : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_TEAM.cs b/Models/DataCenterTables/TT_TEAM.cs
new file mode 100644
index 0000000..3ce49a2
--- /dev/null
+++ b/Models/DataCenterTables/TT_TEAM.cs
@@ -0,0 +1,58 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("Ŷӱ")]
+ public class TT_TEAM : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 5)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_WMS_LOCATION.cs b/Models/DataCenterTables/TT_WMS_LOCATION.cs
new file mode 100644
index 0000000..165284a
--- /dev/null
+++ b/Models/DataCenterTables/TT_WMS_LOCATION.cs
@@ -0,0 +1,96 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("WMSλ")]
+ public class TT_WMS_LOCATION : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("λ")]
+ [StringLength(50)]
+ public string Location { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("ERPλ")]
+ [StringLength(50)]
+ public string ErpLocation { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("")]
+ [StringLength(50)]
+ public string Area { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("״̬")]
+ [StringLength(50)]
+ public string InventoryStatus { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("Ա")]
+ [StringLength(50)]
+ public string WarehouseKeeper { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ֿ")]
+ [StringLength(50)]
+ public string WhseCode { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("")]
+ public bool IsEnableNegativeStock { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("")]
+ public bool AutoRemoveZeroStockDetail { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("")]
+ public decimal MaxBoxQty { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("")]
+ public bool IsEnableMix { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("Ŀ")]
+ [StringLength(50)]
+ public string ProjectId { get; set; }
+
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+
+ [IsDataGridColum(true, 13)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 15)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 17)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/TT_WORK_CENTER.cs b/Models/DataCenterTables/TT_WORK_CENTER.cs
new file mode 100644
index 0000000..e2d433b
--- /dev/null
+++ b/Models/DataCenterTables/TT_WORK_CENTER.cs
@@ -0,0 +1,109 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using CK.SCP.Models.Attributes;
+using CK.SCP.Models.Base;
+using CK.SCP.Models.Enums;
+
+using CK.SCP.Models.ExchangeCenterTables;namespace CK.SCP.Models.DataCenterTables
+{
+ [Description("ı")]
+ public class TT_WORK_CENTER : TED_BASE,ITaskTable
+ {
+ [IsDataGridColum(true, 1)]
+ [Description("Ĵ")]
+ [StringLength(50)]
+ public string Code { get; set; }
+ [IsDataGridColum(true, 2)]
+ [Description("")]
+ [StringLength(50)]
+ public string Desc { get; set; }
+ [IsDataGridColum(true, 3)]
+ [Description("")]
+ [StringLength(50)]
+ public string Department { get; set; }
+ [IsDataGridColum(true, 4)]
+ [Description("Զ̶")]
+ public bool AutoFirm { get; set; }
+ [IsDataGridColum(true, 5)]
+ [Description("ϴԶ̶")]
+ public DateTime LastAutoFirm { get; set; }
+ [IsDataGridColum(true, 6)]
+ [Description("")]
+ [StringLength(50)]
+ public string Scheduler { get; set; }
+ [IsDataGridColum(true, 7)]
+ [Description("ȴʱ")]
+ public decimal Queue { get; set; }
+ [IsDataGridColum(true, 8)]
+ [Description("ȴʱ")]
+ public decimal Wait { get; set; }
+ [IsDataGridColum(true, 9)]
+ [Description("豸/")]
+ public int MchOp { get; set; }
+ [IsDataGridColum(true, 10)]
+ [Description("Ա")]
+ public decimal SetupMen { get; set; }
+ [IsDataGridColum(true, 11)]
+ [Description("ȫԱ")]
+ public decimal RunCrew { get; set; }
+ [IsDataGridColum(true, 12)]
+ [Description("")]
+ public decimal MchWkctr { get; set; }
+ [IsDataGridColum(true, 13)]
+ [Description("")]
+ public decimal MchBdn { get; set; }
+ [IsDataGridColum(true, 14)]
+ [Description("÷")]
+ public decimal SetupRte { get; set; }
+ [IsDataGridColum(true, 15)]
+ [Description("˹")]
+ public decimal LbrRate { get; set; }
+ [IsDataGridColum(true, 16)]
+ [Description("˹")]
+ public decimal BdnRate { get; set; }
+ [IsDataGridColum(true,17)]
+ [Description("˹")]
+ public decimal BdnPct { get; set; }
+ [IsDataGridColum(true, 18)]
+ [Description("")]
+ [StringLength(50)]
+ public string Mch { get; set; }
+
+ [Key]
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int UID { get; set; }
+ [IsDataGridColum(true, 19)]
+ [Description("")]
+ [StringLength(50)]
+ public string CreateUser { get; set; }
+ [IsDataGridColum(true, 20)]
+ [Description("ʱ")]
+ public DateTime CreateTime { get; set; }
+
+ [IsDataGridColum(true, 21)]
+ [Description("ע")]
+ public string Remark { get; set; }
+ [IsDataGridColum(true, 22)]
+ [Description("")]
+ public Guid TaskID { get; set; }
+ [IsDataGridColum(true, 23)]
+ [Description("")]
+ [StringLength(50)]
+ public string CommandType { get; set; }
+ [IsDataGridColum(true, 24)]
+ [Description("ID")]
+ public Guid DataID { get; set; }
+
+ [Description("")]
+ [StringLength(50)]
+ public string Domain { get; set; }
+
+ [Description("ص")]
+ [StringLength(50)]
+ public string Site { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Models/DataCenterTables/name.txt b/Models/DataCenterTables/name.txt
new file mode 100644
index 0000000..70ff882
Binary files /dev/null and b/Models/DataCenterTables/name.txt differ
diff --git a/Models/EntitiesFactory.cs b/Models/EntitiesFactory.cs
index 8279ef3..e5ec486 100644
--- a/Models/EntitiesFactory.cs
+++ b/Models/EntitiesFactory.cs
@@ -11,9 +11,24 @@ using CK.SCP.Models.Enums;
using CK.SCP.Models.UniApiEntity;
using CK.SCP.Utils;
using ChangKeTec.Wms.Models.Wms;
+using System.ComponentModel;
namespace CK.SCP.Models
{
+ public class LogModel : INotifyPropertyChanged
+ {
+ public string LogTime { get; set; }
+ public string LogMessage { get; set; }
+ public string TaskState { get; set; }
+ public string TableName { get; set; }
+ public string TaskId { get; set; }
+ public event PropertyChangedEventHandler PropertyChanged;
+ public void NotityPropertyChanged(string propertyName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
public static class EntitiesFactory
{
static EntitiesFactory()
@@ -21,6 +36,8 @@ namespace CK.SCP.Models
Database.SetInitializer(null);
Database.SetInitializer(null);
Database.SetInitializer(null);
+ Database.SetInitializer(null);
+ Database.SetInitializer(null);
}
public static ScpEntities CreateScpInstance()
@@ -87,6 +104,38 @@ namespace CK.SCP.Models
}
}
+ public static DataCenterContext CreateDataCenterInstance()
+ {
+ var dbSetting = GlobalConfig.DataCenterDB;
+ try
+ {
+ DataCenterContext db;
+ var strConn = GetEfConnectionString(dbSetting);
+ db = new DataCenterContext(strConn);
+
+ return db;
+ }
+ catch (SqlException ex)
+ {
+ throw new Exception($"ϵͳӵݿ:{dbSetting}õķ,ݿ,ûϢǷȷ{Environment.NewLine}{ex}");
+ }
+ }
+
+ public static ExchangeCenterContext CreateExchangeCenterInstance()
+ {
+ var dbSetting = GlobalConfig.ExchangeCenterDB;
+ try
+ {
+ ExchangeCenterContext db;
+ var strConn = GetEfConnectionString(dbSetting);
+ db = new ExchangeCenterContext(strConn);
+ return db;
+ }
+ catch (SqlException ex)
+ {
+ throw new Exception($"ϵͳӵݿ:{dbSetting}õķ,ݿ,ûϢǷȷ{Environment.NewLine}{ex}");
+ }
+ }
public static string GetEfConnectionString(DbSetting dbSetting)
{
diff --git a/Models/Enums/EnumBaseDataLogType.cs b/Models/Enums/EnumBaseDataLogType.cs
new file mode 100644
index 0000000..19516ba
--- /dev/null
+++ b/Models/Enums/EnumBaseDataLogType.cs
@@ -0,0 +1,13 @@
+using System;
+
+namespace CK.SCP.Models
+{
+ [Serializable]
+ public enum EnumBaseDataLogType
+ {
+ Select = 0,
+ Add = 1,
+ Update = 2,
+ Delete = 3
+ }
+}
\ No newline at end of file
diff --git a/Models/Enums/EnumConfigType.cs b/Models/Enums/EnumConfigType.cs
new file mode 100644
index 0000000..45d9615
--- /dev/null
+++ b/Models/Enums/EnumConfigType.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace CK.SCP.Models
+{
+ ///
+ /// -
+ ///
+ [Serializable]
+ public enum EnumConfigType
+ {
+ STRING = 0,
+ INT = 1,
+ FLOAT = 2,
+ BOOL = 3,
+ DATETIME = 4
+ }
+}
\ No newline at end of file
diff --git a/Models/Enums/EnumTaskState.cs b/Models/Enums/EnumTaskState.cs
new file mode 100644
index 0000000..f27c97d
--- /dev/null
+++ b/Models/Enums/EnumTaskState.cs
@@ -0,0 +1,25 @@
+using System.ComponentModel;
+
+namespace CK.SCP.Models
+{
+ public enum EnumTaskState
+ {
+
+ [Description("未读取")] Unread = 0,
+ [Description("执行中")] Processing = 1,
+ [Description("成功")] Success = 2,
+ [Description("失败")] Failed = 3,
+ [Description("部分失败")] PartialFailed = 4,
+ [Description("手动设置")] Menual = 5,
+ [Description("已取消")] Cancelled = 9,
+ }
+
+ public enum EnumCommandType
+ {
+ [Description("读取")] R = 0, //Read
+ [Description("添加")] A = 1, //Add
+ [Description("更新")] U = 2, //Update
+ [Description("添加或更新")] AU = 3, //AddOrUpdate
+ [Description("删除")] D = 9, //Delete
+ }
+}
\ No newline at end of file
diff --git a/Models/Enums/EnumUserType.cs b/Models/Enums/EnumUserType.cs
new file mode 100644
index 0000000..6f4bb55
--- /dev/null
+++ b/Models/Enums/EnumUserType.cs
@@ -0,0 +1,15 @@
+using System;
+
+namespace CK.SCP.Models
+{
+ ///
+ /// û-TA_User.UserTye
+ ///
+ [Serializable]
+ public enum EnumUserType
+ {
+ Admin = 1,
+ SuperVisor = 2,
+ User = 3
+ }
+}
\ No newline at end of file
diff --git a/Models/ExchangeCenterContext.cs b/Models/ExchangeCenterContext.cs
new file mode 100644
index 0000000..c51d448
--- /dev/null
+++ b/Models/ExchangeCenterContext.cs
@@ -0,0 +1,111 @@
+using System.Data.Entity;
+using System.Data.Entity.ModelConfiguration.Conventions;
+using CK.SCP.Models.ExchangeCenterTables;
+
+namespace CK.SCP.Models
+{
+ [DbConfigurationType(typeof(SqlDbConfiguration))]
+ public class ExchangeCenterContext : DbContext
+ {
+ public ExchangeCenterContext() : base("name=ExchangeCenterContext")
+ {
+
+
+ }
+
+ public ExchangeCenterContext(string strConn) : base(strConn)
+ {
+
+
+ //Database.SetInitializer(new ExchangeCenterDatabaseInitializer());
+ }
+
+ public virtual DbSet TEA_CONFIG { get; set; }
+ public virtual DbSet TEA_TASK { get; set; }
+ public virtual DbSet TEA_TASK_SUB { get; set; }
+ public virtual DbSet TEA_TASK_SUB_HIS { get; set; }
+ public virtual DbSet TEA_DATA_ERROR_LOG { get; set; }
+ public virtual DbSet TEA_TASK_SUB_READ_LOG { get; set; }
+ public virtual DbSet TEA_TABLE { get; set; }
+ public virtual DbSet TEA_SYSTEM { get; set; }
+ public virtual DbSet TEA_SUBSCRIBE { get; set; }
+ public virtual DbSet TES_SUPPLIER { get; set; }
+ public virtual DbSet TES_CUSTOMER { get; set; }
+ public virtual DbSet TES_DOMAIN { get; set; }
+ public virtual DbSet TES_WORK_CENTER { get; set; }
+ public virtual DbSet TES_SUPPLIER_TYPE { get; set; }
+ public virtual DbSet TES_SUB_ACCOUNT { get; set; }
+ public virtual DbSet TES_SITE { get; set; }
+ public virtual DbSet