MaterialCodeMatch.cs
2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
using System;
namespace Model
{
/// <summary>
/// 物料模板条码匹配条件
/// </summary>
public class MaterialCodeMatch
{
public int CodeID { get; set; } = -1;
public string Keyword { get; set; } = "";
/// <summary>
/// 是否匹配开头
/// </summary>
public bool MatchStart { get; set; } = false;
/// <summary>
/// 匹配中间
/// </summary>
public bool MatchMiddle { get; set; } = false;
/// <summary>
/// 是否匹配结尾
/// </summary>
public bool MatchEnd { get; set; } = false;
/// <summary>
/// 是否使用分隔字符
/// </summary>
public bool MatchSplit { get; set; } = false;
/// <summary>
/// 是否检查条码类型
/// </summary>
public bool CheckCodeType { get; set; } = false;
/// <summary>
/// 条码类型
/// </summary>
public string CodeType { get; set; } = "";
public string StartText { get; set; } = "";
public string MiddleText { get; set; } = "";
public int MatchMiddleType { get; set; } = -1;
public int MiddleTextCount { get; set; } = 1;
public string EndText { get; set; } = "";
public string SplitText { get; set; } = "";
/// <summary>
/// 大小写敏感
/// </summary>
public bool CaseSensitive { get; set; } = false;
public bool MatchMinLength { get; set; } = false;
public bool MatchMaxLength { get; set; } = false;
public int MinLength { get; set; } = 0;
public int MaxLength { get; set; } = 0;
public int SubstringStart { get; set; } = 0;
public int SubstringLength { get; set; } = 1;
public int SplitPart { get; set; } = 1;
public bool MatchISNumber { get; set; } = false;
/// <summary>
/// 特征条码
/// </summary>
public bool Characteristic { get; set; } = false;
public MaterialCodeMatch Clone()
{
MaterialCodeMatch node = new();
System.Reflection.PropertyInfo[] destination = node.GetType().GetProperties();
System.Reflection.PropertyInfo[] orgin = GetType().GetProperties();
for (int i = 0; i < destination.Length; i++)
destination[i].SetValue(node, orgin[i].GetValue(this));
return node;
}
}
}