服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2025-04-18 c3bb5047c194a0145caca7681f0df5a8feeaaa9b
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
using System;
using SqlSugar;
using System.Linq;
using System.ComponentModel;
using System.Collections.Generic;
 
namespace Tiger.Model
{
    /// <summary>
    /// 实体:盘点单
    /// </summary>
    [Description("Primary:ID")]
    [Serializable]
    [SugarTable("WMS_COUNT")]
    public class WMS_COUNT : DbEntityWithAuth
    {
        #region 构造函数
        /// <summary>
        /// 实体:盘点单
        /// </summary>
        public WMS_COUNT() {}
        #endregion
 
        #region 公共属性
        /// <summary>
        /// 盘点单号
        /// </summary>
        public string COUNT_NO { get; set; }
        /// <summary>
        /// 盘点模式(0Partial抽盘|2All全盘)
        /// </summary>
        public int COUNT_MODE { get; set; }
        /// <summary>
        /// 盘点类型(0Annual年盘|1Quarterly季盘|2Monthly月盘|3Weekly周盘|4Daily日盘)
        /// </summary>
        public int COUNT_TYPE { get; set; }
        /// <summary>
        /// 状态(0New新创建|1Counting盘点中|2Paused暂停中|3Closed已关闭|4Cancel作废)
        /// </summary>
        public int STATUS { get; set; }
        /// <summary>
        /// 盘点范围:组织代码,多个用","分割
        /// </summary>
        public string ORG_CODE { get; set; }
        /// <summary>
        /// 盘点范围:仓库代码,多个用","分割
        /// </summary>
        public string WH_IDS { get; set; }
        /// <summary>
        /// 盘点范围:储区代码,多个用","分割
        /// </summary>
        public string REGION_IDS { get; set; }
        /// <summary>
        /// 盘点范围:货架编码,多个用","分割
        /// </summary>
        public string SHELF_IDS { get; set; }
        /// <summary>
        /// 盘点范围:储位编码,多个用","分割
        /// </summary>
        public string LOCATION_IDS { get; set; }
        /// <summary>
        /// 物料编码列表,多个用","分割
        /// </summary>
        public string ITEM_CODE_LIST { get; set; }
        /// <summary>
        /// 物料编码关键字,多个用","分割
        /// </summary>
        public string ITEM_CODE_LIKE { get; set; }
        /// <summary>
        /// 库存镜像创建时间
        /// </summary>
        public DateTime MIRROR_DATE { get; set; } = DateTime.MinValue;
        /// <summary>
        /// 盘点开始时间
        /// </summary>
        public DateTime BEGIN_DATE { get; set; } = DateTime.MinValue;
        /// <summary>
        /// 盘点结束时间
        /// </summary>
        public DateTime END_DATE { get; set; } = DateTime.MinValue;
        /// <summary>
        /// 审核人
        /// </summary>
        public string REVIEWER { get; set; }
        /// <summary>
        /// 审核日期
        /// </summary>
        public DateTime REVIEW_DATE { get; set; } = DateTime.MinValue;
        /// <summary>
        /// 备注
        /// </summary>
        public string REMARK { get; set; }
        #endregion
 
        #region 虚拟属性
        /*例子
        [SugarColumn(IsIgnore = true)]
        public string FieldName { get; set; }
        */
        [SugarColumn(IsIgnore = true)]
        public List<string> OrgCodeList => (ORG_CODE ?? "").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
        [SugarColumn(IsIgnore = true)]
        public List<string> WhIdList => (WH_IDS ?? "").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
        [SugarColumn(IsIgnore = true)]
        public List<string> RegionIdList => (REGION_IDS ?? "").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
        [SugarColumn(IsIgnore = true)]
        public List<string> ShelfIdList => (SHELF_IDS ?? "").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
        [SugarColumn(IsIgnore = true)]
        public List<string> LocationIdList => (LOCATION_IDS ?? "").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
        [SugarColumn(IsIgnore = true)]
        public List<string> ItemCodeList => (ITEM_CODE_LIST ?? "").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
        [SugarColumn(IsIgnore = true)]
        public List<string> ItemCodeLikeList => (ITEM_CODE_LIKE ?? "").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
        #endregion
 
        #region 外键属性
        /*例子
        //一对一外键导航
        [Navigate(NavigateType.OneToOne, nameof(ClassAId))]//一对一 ClassAId是WMS_COUNT类里面的外键ID字段
        public ClassA ClassA { get; set; } //注意禁止手动赋值,只能是null
        //一对多外键导航
        [Navigate(NavigateType.OneToMany, nameof(ClassA.WMS_COUNTId))]//ClassA表中的WMS_COUNTId
        public List<ClassA> ClassAList { get; set; }//注意禁止手动赋值,只能是null
        //多对多外键导航
        [Navigate(typeof(MappingClass), nameof(MappingClass.WMS_COUNTId), nameof(MappingClass.ClassAId))]//注意顺序
        public List<ClassA> ClassAList { get; set; } //注意禁止手动赋值,只能是null
        */
        [Navigate(NavigateType.OneToMany, nameof(WMS_COUNT_LDTL.COUNT_NO), nameof(COUNT_NO))]
        public List<WMS_COUNT_LDTL> LDtlsWithGhost { get; set; }//注意禁止手动赋值,只能是null
        [SugarColumn(IsIgnore = true)]
        public List<WMS_COUNT_LDTL> LDtls => LDtlsWithGhost?.Where(q => !q.GHOST_ROW).ToList();
        [Navigate(NavigateType.OneToMany, nameof(WMS_COUNT_MDTL.COUNT_NO), nameof(COUNT_NO))]
        public List<WMS_COUNT_MDTL> MDtlsWithGhost { get; set; }//注意禁止手动赋值,只能是null
        [SugarColumn(IsIgnore = true)]
        public List<WMS_COUNT_MDTL> MDtls => MDtlsWithGhost?.Where(q => !q.GHOST_ROW).ToList();
 
        [Navigate(NavigateType.OneToMany, nameof(WMS_COUNT_SUM.COUNT_NO), nameof(COUNT_NO))]
        public List<WMS_COUNT_SUM> SumListWithGhost { get; set; }//注意禁止手动赋值,只能是null
        [SugarColumn(IsIgnore = true)]
        public List<WMS_COUNT_SUM> SumList => SumListWithGhost?.Where(q => !q.GHOST_ROW).ToList();
        #endregion
 
        #region 枚举变量
        /*例子
        public enum FieldNames
        {
            [Description("枚举描述0")]
            Enum0,
            [Description("枚举描述1")]
            Enum1,
        }
        */
        /// <summary>
        ///  盘点模式(0Partial抽盘|2All全盘)
        /// </summary>
        public enum COUNT_MODEs
        {
            [Description("抽盘")]
            Partial,
            [Description("全盘")]
            ALL,
        }
        /// <summary>
        ///  盘点类型(0Annual年盘|1Quarterly季盘|2Monthly月盘|3Weekly周盘|4Daily日盘)
        /// </summary>
        public enum COUNT_TYPEs
        {
            [Description("年盘")]
            Annual,
            [Description("季盘")]
            Quarterly,
            [Description("月盘")]
            Monthly,
            [Description("周盘")]
            Weekly,
            [Description("日盘")]
            Daily,
        }
        /// <summary>
        ///  状态(0New新创建|1Counting盘点中|2Paused暂停中|3Closed已关闭|4Cancel作废)
        /// </summary>
        public enum STATUSs
        {
            [Description("新创建")]
            New,
            [Description("盘点中")]
            Counting,
            [Description("暂停中")]
            Paused,
            [Description("已关闭")]
            Closed,
            [Description("作废")]
            Cancel,
        }
        #endregion
 
        #region 公共方法
 
        #endregion
 
    }//endClass
}