库位表重新生成,一些数据使用enum type status

加上数据权限zoneCode
This commit is contained in:
zhougf committed 2025-04-30 19:59:47 +08:00
1 parent b0a6dcc035
commit b005422b01
25 files changed
+361 -541

No files matched your search

+89 -52
View File
@@ -3,73 +3,110 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web.Models
namespace HHWMS.Web.Models;
[Table("Location")]
public class Location : BasePoco
{
[Table("Location")]
public class Location : BasePoco
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public new int ID { get; set; }
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public new int ID { get; set; }
[Display(Name = "Location.Code", Description = "库位编码")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string Code { get; set; }
public LocationZone LocationZone { get; set; }
[Display(Name = "Location.ZoneCode", Description = "库位编码")]
public int LocationZoneId { get; set; }
[Display(Name = "Location.Type", Description = "库位类型")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
[Required(ErrorMessage = "Validate.{0}required")]
public string Type { get; set; }
[Display(Name = "Location.Code", Description = "库位编码")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string Code { get; set; }
[Display(Name = "Location.Status", Description = "库位状态")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string Status { get; set; }
[Display(Name = "Location.Type", Description = "库位类型")]
public LocationTypeEnum Type { get; set; }
[Display(Name = "Location.Row", Description = "行")]
public short Row { get; set; }
[Display(Name = "Location.Status", Description = "库位状态")]
public LocationStatusEnum Status { get; set; }
[Display(Name = "Location.Line", Description = "列")]
[Required(ErrorMessage = "Validate.{0}required")]
public short Line { get; set; }
[Display(Name = "Location.RoadWay", Description = "巷道")]
[Required(ErrorMessage = "Validate.{0}required")]
public short? RoadWay { get; set; }
[Display(Name = "Location.Layer", Description = "层")]
[Required(ErrorMessage = "Validate.{0}required")]
public short Layer { get; set; }
[Display(Name = "Location.Row", Description = "行")]
public short Row { get; set; }
[Display(Name = "Location.RoadWay", Description = "巷道")]
[Required(ErrorMessage = "Validate.{0}required")]
public short? RoadWay { get; set; }
[Display(Name = "Location.Line", Description = "列")]
[Required(ErrorMessage = "Validate.{0}required")]
public short Line { get; set; }
[Display(Name = "Location.RowFlag", Description = "内外标识,0:外仓位,1:里仓位")]
public short? RowFlag { get; set; }
[Display(Name = "Location.Layer", Description = "层")]
[Required(ErrorMessage = "Validate.{0}required")]
public short Layer { get; set; }
[Display(Name = "Location.ContainerCode", Description = "容器编码")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string ContainerCode { get; set; }
[Display(Name = "Location.RowFlag", Description = "内外标识,0:外仓位,1:里仓位")]
public RowFlagEnum RowFlag { get; set; }
[Display(Name = "Location.ZoneCode", Description = "库区")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string ZoneCode { 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 = "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.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.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 = "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; }
[Display(Name = "Location.ContiguousCode", Description = "相邻库位")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string ContiguousCode { get; set; }
public Guid? Version { get; set; }
}
public Guid? Version { get; set; }
}
public enum LocationTypeEnum : short
{
/// <summary>
/// 立库
/// </summary>
[Display(Name = "LocationTypeEnum.L")]
L = 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,
}
+23
View File
@@ -0,0 +1,23 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web.Models
{
[Table("LocationZone")]
public class LocationZone : BasePoco
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public new int ID { get; set; }
[Display(Name = "Location.ZoneCode", Description = "库区")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string ZoneCode { get; set; }
[Display(Name = "Location.ZoneName", Description = "名称")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string Name { get; set; }
}
}
-114
View File
@@ -274,118 +274,4 @@ namespace HHWMS.Web.Models
}
/// <summary>
/// 区域
/// </summary>
public static class ZoneCodeEnum
{
/// <summary>
/// 盘料库 = "L";
/// </summary>
public const string 盘料库 = "L";
/// <summary>
/// 散料库 = "C";
/// </summary>
public const string 散料库 = "C";
/// <summary>
/// 货架库 = "P";
/// </summary>
public const string 货架库 = "P";
}
/// <summary>
/// 区域
/// </summary>
public static class LocationTypeEnum
{
/// <summary>
/// 盘料库位 = "L";
/// </summary>
public const string 盘料库位 = "L";
/// <summary>
/// 料塔 = "T";
/// </summary>
public const string 料塔 = "T";
/// <summary>
/// 机械臂工位 = "G2";
/// </summary>
public const string 机械臂工位 = "G2";
/// <summary>
/// 堆垛机工位 = "G1";
/// </summary>
public const string 堆垛机工位 = "G1";
/// <summary>
/// 散料库 = "C";
/// </summary>
public const string 散料库位 = "C";
/// <summary>
/// 散料库站台 = "C1";
/// </summary>
public const string 散料库站台 = "C1";
}
/// <summary>
/// 站台类型
/// </summary>
public static class StationCode
{
/// <summary>
/// 散料库左抽屉 = "C02-02-18-03";
/// </summary>
public const string 散料库左抽屉 = "C02-02-18-03";
/// <summary>
/// 散料库右抽屉 = "C02-01-18-03";
/// </summary>
public const string 散料库右抽屉 = "C02-01-18-03";
/// <summary>
/// 盘料库左工位 = "L01-02-34-02";
/// </summary>
public const string 盘料库左工位 = "L01-02-34-02";
/// <summary>
/// 盘料库右工位 = "L01-01-34-02";
/// </summary>
public const string 盘料库右工位 = "L01-01-34-02";
/// <summary>
/// 左料塔 = "L01";
/// </summary>
public const string 左料塔 = "L01";
/// <summary>
/// 右料塔 = "L02";
/// </summary>
public const string 右料塔 = "L02";
/// <summary>
/// 左料塔工位 = "L01-01";
/// </summary>
public const string 左料塔工位 = "L01-01";
/// <summary>
/// 右料塔工位 = "L01-02";
/// </summary>
public const string 右料塔工位 = "L01-02";
}
/// <summary>
/// 料塔类型
/// </summary>
public enum LiaoTaTypeEnum : int
{
// 1: 20层料塔类型1; 2:16层料塔类型1; 3:20层料塔类型2 4:16层料塔类型2
L01 = 1,
L02 = 2
}
}