Files
WMS/HHWMS.Web/Models/Configs/Location.cs
T
zhougf 42c26b2800 feat(入库流程): 实现完整的入库流程逻辑
1. 在IUnitWork接口和实现中添加Save方法用于保存更改
2. 完善WCS任务状态处理逻辑,区分线边库和成品库的不同处理流程
3. 实现入库控制器SubmitReceipt方法,包含库位分配、任务创建、库存记录等完整流程
4. 修改LocationTypeEnum枚举值定义,将L改为C表示成品库位
5. 优化库位查询逻辑,增加高度和类型过滤条件
6. 修改容器类型从枚举改为静态类定义
7. 修复LocationController中库位编码生成格式
8. 在WcsRequest中添加LocationType字段用于库位类型区分
2025-06-20 22:20:35 +08:00

112 lines
3.4 KiB
C#

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web.Models;
[Table("Location")]
public class Location : BasePoco
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public new int ID { get; set; }
public LocationZone Zone { get; set; }
[Display(Name = "Location.ZoneCode", Description = "库位编码")]
public int ZoneId { get; set; }
[Display(Name = "Location.Code", Description = "库位编码")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string Code { get; set; }
[Display(Name = "Location.Type", Description = "库位类型")]
public LocationTypeEnum Type { get; set; }
[Display(Name = "Location.Status", Description = "库位状态")]
public LocationStatusEnum Status { get; set; }
[Display(Name = "Location.RoadWay", Description = "巷道")]
[Required(ErrorMessage = "Validate.{0}required")]
public short RoadWay { get; set; }
[Display(Name = "Location.Row", Description = "行")]
public short Row { get; set; }
[Display(Name = "Location.Line", Description = "列")]
[Required(ErrorMessage = "Validate.{0}required")]
public short Line { get; set; }
[Display(Name = "Location.Layer", Description = "层")]
[Required(ErrorMessage = "Validate.{0}required")]
public short Layer { get; set; }
[Display(Name = "Location.RowFlag", Description = "内外标识,0:外仓位,1:里仓位")]
public RowFlagEnum RowFlag { get; set; }
[Display(Name = "Location.ContainerCode", Description = "容器编码")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string ContainerCode { get; set; }
[Display(Name = "Location.IsStop", Description = "是否禁用")]
public bool IsStop { get; set; }
[Display(Name = "System.Length", Description = "长")]
[Column(TypeName = "decimal(8,3)")]
public decimal? Length { get; set; }
[Display(Name = "System.Width", Description = "宽")]
[Column(TypeName = "decimal(8,3)")]
public decimal? Width { get; set; }
[Display(Name = "System.Height", Description = "高")]
[Column(TypeName = "decimal(8,3)")]
public decimal? Height { get; set; }
[Display(Name = "Location.ContiguousCode", Description = "相邻库位")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string ContiguousCode { get; set; }
public Guid? Version { get; set; }
}
public enum LocationTypeEnum : short
{
/// <summary>
/// 成品库位
/// </summary>
[Display(Name = "LocationTypeEnum.L")]
C = 0,
/// <summary>
/// 模具库位
/// </summary>
[Display(Name = "LocationTypeEnum.M")]
M = 1,
/// <summary>
/// 线边库位
/// </summary>
[Display(Name = "LocationTypeEnum.X")]
X = 2
}
public enum LocationStatusEnum : short
{
[Display(Name = "LocationStatusEnum.Empty")]
Empty = 0,
[Display(Name = "LocationStatusEnum.EmptyContainer")]
EmptyContainer = 1,
[Display(Name = "LocationStatusEnum.Some")]
Some = 2,
[Display(Name = "LocationStatusEnum.Full")]
Full = 3,
[Display(Name = "LocationStatusEnum.Locked")]
Locked = 4,
}
public enum RowFlagEnum : short
{
[Display(Name = "RowFlagEnum.Outer")]
Outer = 0,
[Display(Name = "RowFlagEnum.Inner")]
Inner = 1,
}