using iWareCommon.Common.Entity; using iWareCommon.Utils; using iWareDataCore.ORM; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace iWareDataCore.BASE.Entity { public class PlaceMaterialViewEntity : ICommonEntity { /// /// 1物料主键 /// public int Id { get; set; } /// /// 2创建时间 /// public DateTime CreateTime { get; set; } /// /// 3更新时间 /// public DateTime UpdateTime { get; set; } /// /// 4库位号 /// public string PlaceCode { get; set; } /// /// 5库位状态 /// public int Status { get; set; } /// /// 6库位是否锁定 /// public int IsLock { get; set; } /// /// 7库位是否执行完成 /// public int IsExecute { get; set; } /// /// 8库位类型名称 /// public string PlaceTypeName { get; set; } /// /// 9库位类型备注 /// public string PlaceTypeRemark { get; set; } /// /// 10物料名 /// public string Name { get; set; } /// /// 11物料号 /// public string MaterialCode { get; set; } /// /// 12物料描述 /// public string Description { get; set; } /// /// 13物料类型备注 /// public string TypeRemark { get; set; } /// /// 14物料类型名称 /// public string TypeName { get; set; } /// /// 15物料状态 /// public int MaterialStatus { get; set; } /// /// 16库位id /// public int PlaceId { get; set; } /// /// 17物料id /// public int MaterialId { get; set; } /// /// 18物料视图备注 /// public string Remark { get; set; } /// /// 19库位层 /// public int Layer { get; set; } /// /// 20库位列 /// public int Col { get; set; } /// /// 21库位排 /// public int Row { get; set; } /// /// 22库位类型id /// public int PlaceTypeId { get; set; } /// /// 23IP /// public string Ip { get; set; } /// /// 24下一节点 /// public string Point { get; set; } /// /// 25物料版本 /// public string Version { get; set; } /// /// 26船级社 /// public string ClassificationSociety { get; set; } /// /// 27分段号 /// public string SerialNo { get; set; } /// /// 28垂直位置 /// public string VerticalPosition { get; set; } /// /// 29重量 /// public string Weight { get; set; } /// /// 30发放工程号 /// public string IssueprojectNo { get; set; } /// /// 31接收工程号 /// public string ProcurementProjectNo { get; set; } /// /// 32切割类型 /// public string CuttingType { get; set; } /// /// 33页码 /// public string PageNo { get; set; } /// /// 34厚 /// public string Thick { get; set; } /// /// 35宽 /// public string Wide { get; set; } /// /// 36长 /// public string Length { get; set; } /// /// 37记号笔 /// public string MarkingPen { get; set; } /// /// 38分道 /// public string Laneseparation { get; set; } /// /// 39物料类型 /// public int MaterialType { get; set; } /// /// 无参构造 /// public PlaceMaterialViewEntity() { } /// /// 有参构造 /// /// orm映射的类 public PlaceMaterialViewEntity(BASEPlaceMaterialView material) { EntityPropHelper.CopyProp(material, this, GetColumnMap()); } /// /// 将对象转换成ORM中的类型 /// /// Orm中的BASEPlaceMaterialView类型 public BASEPlaceMaterialView ToOrm() { BASEPlaceMaterialView material = new BASEPlaceMaterialView(); EntityPropHelper.CopyProp(this, material, GetColumnMap()); return material; } /// /// 获取自定义角色类中的字段名为键,orm中对象的字段名为值的字段 /// /// public static Dictionary GetColumnMap() { return new Dictionary() { { "Id", "id"}, { "CreateTime", "createtime"}, { "PlaceCode", "placecode"}, { "UpdateTime", "updatetime"}, { "Status", "status"}, { "IsLock", "islock"}, { "IsExecute", "isexecute"}, { "PlaceTypeName", "placetypename"}, { "PlaceTypeRemark","placetyperemark"}, { "Name", "name"}, { "MaterialCode","materialcode"}, { "Description", "description"}, { "TypeRemark", "typeremark"}, { "TypeName","typename"}, { "MaterialStatus", "materialstatus"}, { "PlaceId", "placeid"}, { "MaterialId","materialid"}, { "Remark", "remark"}, { "Layer", "layer"}, { "Col", "col"}, { "Row", "row"}, { "PlaceTypeId","placetypeid"}, { "Ip","ip"}, { "Point","point"}, { "Version","version"}, { "ClassificationSociety","classificationsociety"}, { "SerialNo","serialno"}, { "VerticalPosition","verticalposition"}, { "Weight","weight"}, { "IssueprojectNo","issueprojectno"}, { "ProcurementProjectNo","procurementprojectno"}, { "CuttingType","cuttingtype"}, { "PageNo","pageno"}, { "Thick","thick"}, { "Wide","wide"}, { "Length","length"}, { "MarkingPen","markingpen"}, { "Laneseparation","laneseparation"}, { "MaterialType","materialtype"} }; } /// /// 根据PlaceMaterialViewEntity的字段转BASEPlaceMaterialView的字段 /// /// PlaceMaterialViewEntity的字段 /// BASEPlaceMaterialView public static string GetColumnName(string name) { var columnMap = GetColumnMap(); return columnMap.ContainsKey(name) ? columnMap[name] : name; } /// /// 获取PlaceMaterialViewEntity对应的表名 /// /// 表名 public static string GetTableName() { return "[dbo].[BASEPlaceMaterialView]"; } } }