You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.3 KiB
60 lines
1.3 KiB
using System.ComponentModel.DataAnnotations;
|
|
using System.Text;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace Win_in.Sfs.Scp.WebApi.Asns;
|
|
|
|
/// <summary>
|
|
/// Hierarchical Level
|
|
/// 层级结构
|
|
/// </summary>
|
|
public abstract class HL
|
|
{
|
|
/// <summary>
|
|
/// Hierarchical Id Number
|
|
/// 层级编号
|
|
/// </summary>
|
|
[StringLength(12,MinimumLength = 1)]
|
|
public string HL01 { get; set; }
|
|
|
|
/// <summary>
|
|
/// Hierarchical Parent Id
|
|
/// 父级编号
|
|
/// </summary>
|
|
[StringLength(12,MinimumLength = 1)]
|
|
public string HL02 { get; set; }
|
|
|
|
/// <summary>
|
|
/// Hierarchical Level Code
|
|
/// "S" = Shipment
|
|
/// "T" = Tare
|
|
/// "I" = Item
|
|
/// 层级等级代码
|
|
/// </summary>
|
|
[StringLength(2,MinimumLength = 1)]
|
|
public string HL03 { get;}
|
|
public string HL04 { get;}
|
|
|
|
public HL(LevelType hl03,string code,string parentCode="")
|
|
{
|
|
HL01 = code;
|
|
HL02 = parentCode;
|
|
HL03 = hl03.ToString();
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return "HL"
|
|
+ X12Const.ElementSeparator + HL01
|
|
+ X12Const.ElementSeparator + HL02
|
|
+ X12Const.ElementSeparator + HL03;
|
|
|
|
}
|
|
|
|
public enum LevelType
|
|
{
|
|
S,
|
|
T,
|
|
I
|
|
}
|
|
}
|