| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsContainers; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Domain.Entities.Auditing; |
| | |
| | | public class WmsContainer : FullAuditedAggregateRoot<Guid> |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainer"/> class. |
| | | /// ID |
| | | /// </summary> |
| | | protected WmsContainer() |
| | | { |
| | | } |
| | | public Guid Id { get; set; } |
| | | /// <summary> |
| | | /// 托盘编号 |
| | | /// </summary> |
| | | public string ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainer"/> class. |
| | | /// 托盘类型 |
| | | /// </summary> |
| | | /// <param name="id">The identifier.</param> |
| | | /// <param name="code">The code.</param> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="sort">The sort.</param> |
| | | /// <param name="remark">The remark.</param> |
| | | public WmsContainer(Guid id, string code, string name, int sort = 0, string remark = null) : base(id) |
| | | { |
| | | Code = Check.NotNullOrWhiteSpace(code, "编号", WmsContainerConsts.MaxCodeLength); |
| | | Name = Check.NotNullOrWhiteSpace(name, "名称", WmsContainerConsts.MaxNameLength); |
| | | Sort = sort; |
| | | Remark = Check.Length(remark, "备注", WmsContainerConsts.MaxRemarkLength); |
| | | } |
| | | public ContainerTypeEnum ContainerType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 编号 |
| | | /// 托盘状态 |
| | | /// </summary> |
| | | public virtual string Code { get; protected set; } |
| | | public ContainerStatusEnum ContainerStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 名称 |
| | | /// 长度 |
| | | /// </summary> |
| | | public virtual string Name { get; protected set; } |
| | | public decimal? SpecLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 宽度 |
| | | /// </summary> |
| | | public decimal? SpecWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 高度 |
| | | /// </summary> |
| | | public decimal? SpecHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 限长 |
| | | /// </summary> |
| | | public decimal? LimitLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 限宽 |
| | | /// </summary> |
| | | public decimal? LimitWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 限高 |
| | | /// </summary> |
| | | public decimal? LimitHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 载重上限 |
| | | /// </summary> |
| | | public decimal? MaxWeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 异常数量 |
| | | /// </summary> |
| | | public int? ExceptionNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | ///物料数量 |
| | | /// </summary> |
| | | public int? MaterialNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 冗余字段1 - 预留扩展用途 |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 冗余字段2 - 预留扩展用途 |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 冗余字段3 - 预留扩展用途 |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 排序 |
| | | /// </summary> |
| | | public virtual int Sort { get; protected set; } |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 备注 |
| | | /// </summary> |
| | | public virtual string Remark { get; protected set; } |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否禁用 |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; protected set; } |
| | | |
| | | /// <summary> |
| | | /// Updates the specified code. |
| | | /// </summary> |
| | | /// <param name="code">The code.</param> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="remark">The remark.</param> |
| | | public virtual void Update(string code, string name, string remark = null, bool? isDisabled = null) |
| | | { |
| | | Code = Check.NotNullOrWhiteSpace(code, "编号", WmsContainerConsts.MaxCodeLength); |
| | | Name = Check.NotNullOrWhiteSpace(name, "名称", WmsContainerConsts.MaxNameLength); |
| | | Remark = Check.Length(remark, "备注", WmsContainerConsts.MaxRemarkLength); |
| | | IsDisabled = isDisabled ?? IsDisabled; |
| | | } |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort. |
| | |
| | | Sort = sort; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Clones the specified create. |
| | | /// </summary> |
| | | /// <param name="create">The create.</param> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="i">The i.</param> |
| | | /// <returns></returns> |
| | | public WmsContainer Clone(Guid create, string name, int i) |
| | | { |
| | | return new WmsContainer(create, Code, name, i, Remark); |
| | | } |
| | | } |
| | | } |