服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2025-04-01 08343d90d3aa73dd5ec89aaf7b3815e22eba0eb1
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
using System;
using SqlSugar;
using System.Linq;
using System.ComponentModel;
using System.Collections.Generic;
using Tiger.Model.Extensions;
 
namespace Tiger.Model
{
    /// <summary>
    /// 实体:备料任务(WMS)
    /// </summary>
    [Description("Primary:ID")]
    [DisplayName("备料任务(WMS)")]
    [Serializable]
    [SugarTable("BIZ_WMS_PREP")]
    public class BIZ_WMS_PREP : DbEntityWithAuth
    {
        #region 构造函数
        /// <summary>
        /// 实体:备料任务(WMS)
        /// </summary>
        public BIZ_WMS_PREP() {}
        #endregion
 
        #region 公共属性
        /// <summary>
        /// 备料任务号
        /// </summary>
        [DisplayName("备料任务号")]
        public string ORDER_NO { get; set; }
        /// <summary>
        /// 业务类型(0Others其他备料|1Requisition领料单备料|2WorkOrder工单备料|3Outsourcing委外备料)
        /// </summary>
        [DisplayName("业务类型(0Others其他备料|1Requisition领料单备料|2WorkOrder工单备料|3Outsourcing委外备料)")]
        public int BIZ_TYPE { get; set; }
        /// <summary>
        /// 状态(0Init初始化|1Called已叫料|2WaitPick待捡料|3Picking捡料中|4Picked已捡完|5Sended已发料|6Close已关闭|7Cancel作废)
        /// </summary>
        [DisplayName("状态(0Init初始化|1Called已叫料|2WaitPick待捡料|3Picking捡料中|4Picked已捡完|5Sended已发料|6Close已关闭|7Cancel作废)")]
        public int STATUS { get; set; }
        /// <summary>
        /// 来源单据编码,多个用“,”分隔
        /// </summary>
        [DisplayName("来源单据编码,多个用“,”分隔")]
        public string SOURCE_CODE { get; set; }
        /// <summary>
        /// 来源单号,多个用“,”分隔,跟编码一一对应
        /// </summary>
        [DisplayName("来源单号,多个用“,”分隔,跟编码一一对应")]
        public string SOURCE_ORDER { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [DisplayName("备注")]
        public string REMARK { get; set; }
        #endregion
 
        #region 虚拟属性
        /*例子
        [SugarColumn(IsIgnore = true)]
        public string FieldName { get; set; }
        */
        [SugarColumn(IsIgnore = true)]
        public BIZ_WMS_PREP_BTH CurBatch => Batchs?.OrderBy(q => q.CALL_TIME).FirstOrDefault(q => q.STATUS < STATUSs.Close.GetValue());
        #endregion
 
        #region 外键属性
        /*例子
        //一对一外键导航
        [Navigate(NavigateType.OneToOne, nameof(ClassAId))]//一对一 ClassAId是BIZ_WMS_PREP类里面的外键ID字段
        public ClassA ClassA { get; set; } //注意禁止手动赋值,只能是null
        //一对多外键导航
        [Navigate(NavigateType.OneToMany, nameof(ClassA.BIZ_WMS_PREPId))]//ClassA表中的BIZ_WMS_PREPId
        public List<ClassA> ClassAList { get; set; }//注意禁止手动赋值,只能是null
        //多对多外键导航
        [Navigate(typeof(MappingClass), nameof(MappingClass.BIZ_WMS_PREPId), nameof(MappingClass.ClassAId))]//注意顺序
        public List<ClassA> ClassAList { get; set; } //注意禁止手动赋值,只能是null
        */
        [Navigate(NavigateType.OneToMany, nameof(BIZ_WMS_PREP_SRC.ORDER_NO), nameof(ORDER_NO), "GHOST_ROW = 0")]//一对一 ClassAId是BIZ_WMS_PREP类里面的外键ID字段
        public List<BIZ_WMS_PREP_SRC> SourceOrders { get; set; } //注意禁止手动赋值,只能是null
        [Navigate(NavigateType.OneToMany, nameof(BIZ_WMS_PREP_SRC_DTL.ORDER_NO), nameof(ORDER_NO), "GHOST_ROW = 0")]//一对一 ClassAId是BIZ_WMS_PREP类里面的外键ID字段
        public List<BIZ_WMS_PREP_SRC_DTL> SourceDetails { get; set; } //注意禁止手动赋值,只能是null
        [Navigate(NavigateType.OneToMany, nameof(BIZ_WMS_PREP_DTL.ORDER_NO), nameof(ORDER_NO), "GHOST_ROW = 0")]//一对一 ClassAId是BIZ_WMS_PREP类里面的外键ID字段
        public List<BIZ_WMS_PREP_DTL> Details { get; set; } //注意禁止手动赋值,只能是null
        [Navigate(NavigateType.OneToMany, nameof(BIZ_WMS_PREP_BTH.ORDER_NO), nameof(ORDER_NO), "GHOST_ROW = 0")]//一对一 ClassAId是BIZ_WMS_PREP类里面的外键ID字段
        public List<BIZ_WMS_PREP_BTH> Batchs { get; set; } //注意禁止手动赋值,只能是null
        [Navigate(NavigateType.OneToMany, nameof(BIZ_WMS_PREP_SN.ORDER_NO), nameof(ORDER_NO), "GHOST_ROW = 0")]//一对一 ClassAId是BIZ_WMS_PREP类里面的外键ID字段
        public List<BIZ_WMS_PREP_SN> SnList { get; set; } //注意禁止手动赋值,只能是null
        #endregion
 
        #region 枚举变量
        /*例子
        public enum FieldNames
        {
            [Description("枚举描述0")]
            Enum0,
            [Description("枚举描述1")]
            Enum1,
        }
        */
 
        /// <summary>
        /// 枚举:业务类型(0Others其他备料|1Requisition领料单备料|2WorkOrder工单备料|3Outsourcing委外备料)
        /// </summary>
        public enum BIZ_TYPEs
        {
            [Description("其他备料")]
            Others = 0,
            [Description("领料单备料")]
            Requisition = 1,
            [Description("工单备料")]
            WorkOrder = 2,
            [Description("委外备料")]
            Outsourcing = 3,
        }
 
        /// <summary>
        /// 枚举:状态(0Init初始化|1Called已叫料|2WaitPick待捡料|3Picking捡料中|4Picked已捡完|5Sended已发料|6Close已关闭|7Cancel作废)
        /// </summary>
        public enum STATUSs
        {
            [Description("初始化")]
            Init = 0,
            [Description("已叫料")]
            Called = 1,
            [Description("待捡料")]
            WaitPick = 2,
            [Description("捡料中")]
            Picking = 3,
            [Description("已捡完")]
            Picked = 4,
            [Description("已发料")]
            Sended = 5,
            [Description("已关闭")]
            Close = 6,
            [Description("作废")]
            Cancel = 7,
        }
        #endregion
 
        #region 公共方法
 
        #endregion
 
    }//endClass
}