czw
2025-06-17 74a352255e4a8d7cd10eaaab8cb44f568f88b6c2
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
using HH.WCS.QingXigongchang.process;
using HH.WCS.QingXigongchang.util;
using SqlSugar;
using System;
 
namespace HH.WCS.QingXigongchang.wms
{
 
    //---------------------------------------仓库信息---------------------------------------
    public class BaseModel
    {
        [SugarColumn(IsPrimaryKey = true)]
        public string S_ID { get; set; } = Guid.NewGuid().ToString("D");
        public string S_CREATOR_ID { get; set; } = "sa";
        public string S_CREATOR_NAME { get; set; } = "超级用户";
        public DateTime T_CREATE { get; set; } = DateTime.Now;
        public DateTime T_MODIFY { get; set; } = DateTime.Now;
 
 
    }
    //均州现场
    //[SugarTable("TN_0038")]
 
    //[SugarTable("TN_0129")]//198服务器
    [SuGG("入库排锁表")]
    public class InworkRecord : BaseModel
    {
        public string SQL_PLineNo { get; set; }
        public string S_Fule_Code { get; set; }
        public string S_IP_Address { get; set; }
        public string S_AREA_CODE { get; set; }
        public string N_ROW { get; set; }
    }
 
    public class locCntItem
    {
        public string S_LOC_CODE { get; set; }
        public int N_CURRENT_NUM { get; internal set; }
        public string S_AREA_CODE { get; internal set; }
        public int N_ROW { get; internal set; }
        public int N_COL { get; internal set; }
        /// <summary>
        /// 1 零头1   2零头2 (标签特有) 3 整托
        /// </summary>
        public int HalfOrFull { get; internal set; } = 0;
 
        [SugarColumn(IsIgnore = true)]
        public string HalfFull
        {
            get
            {
                switch (this.HalfOrFull)
                {
                    case 1:
                        return "零头1";
 
                    case 2:
                        return "零头2";
 
                    case 3:
                        return "整托";
                    default: return this.HalfOrFull + "未知";
                }
            }
        }
        public string S_NOTE { get; internal set; }
        public string S_CNTR_CODE { get; internal set; }
        public string S_TYPE { get; internal set; }
        public int N_LAYER { get; internal set; }
        public string S_ITEM_CODE { get; internal set; }
        public string S_ITEM_NAME { get; internal set; }
        public string S_CJ_NAME { get; set; }
    }
 
 
    [SuGG("货位表")]//TN_0010新安江
    public class Location : BaseModel
    {
        /// <summary>
        /// 货位码
        /// </summary>
        public string S_LOC_CODE { get; set; }
        //库区码
        public string S_AREA_CODE { get; set; }
 
        //[SugarColumn(IsIgnore = true)]
        public string S_Fule_LOC { get; set; }
        /// <summary>
        /// 仓库名称表
        /// </summary>
        public string S_WH_CODE { get; set; }
        //容量  可容纳层数
        public int N_CAPACITY { get; set; }
        /// <summary>
        // - 瓶坯用作 瓶坯机号(名称)
 
 
        // -  瓶坯空框区  用作标识有空框
        // -  不用了。 换 S_NOTE
        /// </summary>
        public string S_AGV_SITE { get; set; }
 
        /// <summary>
        /// 备注 - 标注机器。  瓶盖用,瓶坯配置了独立库区 
        /// </summary>
        public string S_NOTE { get; set; }
        /// <summary>
        /// 需要注意
        /// </summary>
        //[SugarColumn(IsIgnore = true)]
        public int N_AGV_CODE { get; set; }
 
        // 大于0有货。  0 没货,
        public int N_CURRENT_NUM { get; set; }
        // 搬运时
        /// <summary>
        /// 置满时间
        /// </summary>
        public DateTime? T_FULL_TIME { get; set; }
        public DateTime? T_EMPTY_TIME { get; set; }
        // 巷道
        public int N_ROADWAY { get; set; }
 
        // 竖排 
        public int N_ROW { get; set; }
        // 横列
        public int N_COL { get; set; }
        // - 考虑用作层数
        public int N_LAYER { get; set; }
        /// <summary>
        /// 无/入库锁/出库锁/其它锁
        /// </summary>
        public string S_LOCK_STATE
        {
            get; set;
        }
        //public string S_DEEP { get; set; }
 
        [SugarColumn(IsIgnore = true)]
        [Navigate(NavigateType.OneToMany, nameof(S_LOC_CODE))]
        public LocCntrRel LocCntrRel { get; set; }
 
        [SugarColumn(IsIgnore = true)]
        public string Batch { get; set; }
        //[SugarColumn(IsIgnore = true)]
        //[Navigate(NavigateType.OneToMany, nameof(S_LOC_CODE))]
        //public List<LocCntrRel> LocCntrRels { get; set; }
 
    }
    //均州现场
    //[SugarTable("TN_0039")]
    //198服务器
    /// <summary>
    /// 货位容器表
    /// </summary>
 
    //[SugarTable("TN_0130")]
    //[SugarTable("TN_0011")]
    [SuGG("托盘货位表")]
    public class LocCntrRel : BaseModel
    {
        /// <summary>
        /// 注意,mapper方式不需要
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public string S_LOC_CODE { get; set; }
        public string S_CNTR_CODE { get; set; }
 
        /// <summary>
        /// 空筐 -> 即产Y  非即产N
        /// 瓶坯 -> 物料iTEMCODE ===>  改 产线+物料  ”lineNo+物料“
        /// 成品 -> 版型
        /// 瓶盖 -> 产线 ||  取消 2024年12月9日 10:02:10 改=> LineNo>物料  ||-- 2024年12月9日 10:16:23  改=>
        /// </summary>
        public string S_TYPE { get; set; }
 
 
        [SugarColumn(IsIgnore = true)]
        [Navigate(NavigateType.OneToOne, nameof(S_CNTR_CODE))]
        public CntrItemRel CntrItemRel { get; set; }
        [SugarColumn(IsIgnore = true)]
        [Navigate(NavigateType.OneToOne, nameof(S_CNTR_CODE))]
        public Container Container { get; set; }
 
        [SugarColumn(IsIgnore = true)]
        public LocCntrRel Reference { get; set; }
        public LocCntrRel Clone()
        {
            var clone = (LocCntrRel)this.MemberwiseClone();
            if (this.Reference != null)
            {
                clone.Reference = (LocCntrRel)this.Reference.Clone();
            }
            return clone;
        }
    }
    //均州现场
    //[SugarTable("TN_0028")]
    //198服务器
    //[SugarTable("TN_0116")]
    [SuGG("托盘物料表")]
    public class CntrItemRel : BaseModel
    {
        [SugarColumn(IsPrimaryKey = true)]
        public string S_CNTR_CODE { get; set; }
        public string S_ITEM_CODE { get; set; }
        public string S_ITEM_NAME { get; set; }
        public string S_BATCH_NO { get; set; }
        public string F_QTY { get; set; }
        public string B_TYPE { get; set; }
        /// <summary>
        /// 半托1 0.5 半托2。 0.75  满托 1 
        /// </summary>
        public double N_BQ_TRAY_TYPE { get; set; } = 1;
 
        /// <summary>
        /// 厂家
        /// </summary>
        public string S_CJ_NAME { get; set; }
 
        public int ItemLayer { get; set; }
        [SugarColumn(IsIgnore = true)]
        public int qty
        {
            get
            {
                int q = 0;
                int.TryParse(F_QTY, out q);
                return q;
            }
        }
        public string S_ITEM_STATE { get; set; } = "无";
 
 
        [SugarColumn(IsIgnore = true)]
        public CntrItemRel Reference { get; set; }
        public CntrItemRel Clone()
        {
            var clone = (CntrItemRel)this.MemberwiseClone();
            if (this.Reference != null)
            {
                clone.Reference = (CntrItemRel)this.Reference.Clone();
            }
            return clone;
        }
        /// <summary>
        ///  下线是的工单号_isFule  GDH1000001_Y
        /// </summary>
        [SugarColumn(IsIgnore = !TaskProcess.UPFule)]
        public string S_ORDER_NO { get; set; }
 
        [SugarColumn(IsIgnore = !TaskProcess.UPFule)]
        public DateTime? Off_T { get; set; }
 
        [SugarColumn(IsIgnore = !TaskProcess.UPFule)]
        public string Off_report { get; set; }
 
        [SugarColumn(IsIgnore = !TaskProcess.UPFule)]
        public DateTime? In_T { get; set; }
 
        [SugarColumn(IsIgnore = !TaskProcess.UPFule)]
        public string In_report { get; set; }
 
        [SugarColumn(IsIgnore = !TaskProcess.UPFule)]
        public DateTime? Out_T { get; set; }
 
        [SugarColumn(IsIgnore = !TaskProcess.UPFule)]
        public string Out_report { get; set; }
 
        [SugarColumn(IsIgnore = !TaskProcess.UPFule)]
        public string Out_LingNo { get; set; }
 
        [SugarColumn(IsIgnore = !TaskProcess.UPFule)]
        public DateTime? DoF_T { get; set; }
 
        [SugarColumn(IsIgnore = !TaskProcess.UPFule)]
        public string DoF_report { get; set; }
 
 
 
    }
 
 
    [SuGG("物料表")]
    public class ItemInfo : BaseModel
    {
        public string S_ITEM_CODE { get; set; }
        public string S_ITEM_NAME { get; set; }
        public int trayHeight { get; set; }
        public int ItemLayer { get; set; }
 
        //物料所在托盘的可堆叠层数。    《》与货位容量取 最小值。 
        public int MaxLayer { get; set; }
        public string B_Type { get; set; }
        /// <summary>
        /// 逗号连接, 标签编码。 - 
        /// </summary>
        public string S_BQ_NAME { get; set; }
    }
 
    [SuGG("自由线段表")]
    public class FreeLineInfo : BaseModel
    {
        public string area { get; set; }
        public int row { get; set; }
        public int minCol { get; set; }
        public int maxCol { get; set; }
        public int bit1 { get; set; }
        public int bit2 { get; set; }
 
    }
    //均州现场
    //[SugarTable("TN_0029")]
 
    //[SugarTable("TN_0117")]//198服务器
 
    //[SugarTable("TN_0018")]//新安江
    [SuGG("密集锁排")]
    public class RowLock : BaseModel
    {
        public string S_AREA_CODE { get; set; }
        public int N_ROW { get; set; }
        public string S_LOCK_STATE { get; set; }
        public string S_WORK_MODE { get; set; } = "";
        public string S_LOCK_SRC { get; set; }
        public DateTime T_LOCK_TIME { get; set; }
        public DateTime T_UNLOCK_TIME { get; set; }
    }
 
    //均州现场
    //[SugarTable("TN_0026")]
    //198服务器
    //[SugarTable("TN_0114")]
    [SuGG("托盘表")]
    public class Container : BaseModel
    {
        /// <summary>
        /// 容器编码
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public string S_CNTR_CODE { get; set; }
        /// <summary>
        /// 大/小板 集化板
        /// </summary>
        public string S_TYPE { get; set; }
        /// <summary>
        /// 规格
        /// </summary>
        public string S_SPEC { get; set; }
        /// <summary>
        /// 容器用途
        /// </summary>
        public string N_PURPOSE { get; set; }
        /// <summary>
        /// 容器来源
        /// </summary>
        public string S_SRC { get; set; }
        /// <summary>
        /// 容器目的地
        /// </summary>
        public string S_DEST { get; set; }
        /// <summary>
        /// 容器状态(空-已清洁-无-转运-待生产)
        /// </summary>
        public string S_CNTR_STATE { get; set; }
    }
 
    [SuGG("库容表")]
    public class KuRong : BaseModel
    {
        public string StorageLoc { get; set; }
        public int MaxCapacity { get; set; }
        public int FilledCapacity { get; set; }
        public string ProductItem { get; set; }
        public int AvailableCapacity { get; set; }
        public int DesiredCapacity { get; set; }
        public int CRC { get; set; }
        public int RAC { get; set; }
    }
    //均州现场
    //[SugarTable("dbo.")]
 
    //[SugarTable("dbo.TN_0098")]//198服务器
 
    //[SugarTable("dbo.TN_0004")]//新安江
    [SuGG("任务表")]
    public class WMSTask : BaseModel
    {
        public string S_DEPART_NAME { get; set; }
        public string S_TASK_NO { get; set; }
        public string S_START_LAREA { get; set; }
        public string S_END_LAREA { get; set; }
        public string S_START_LOC { get; set; }
        public string S_END_LOC { get; set; }
        public string S_TWO_END_LOC { get; set; }
        public string S_TYPE { get; set; }
        public string S_NOTE { get; set; }
        public string S_SRC_SYS { get; set; }
        public string S_SRC_NO { get; set; }
        /// <summary>
        /// agv/人工/输送线
        /// </summary>
        public string S_WORK_MODE { get; set; }
        public DateTime? T_START_TIME { get; set; }
        public DateTime? T_END_TIME { get; set; }
        /// <summary>
        /// 任务状态
        /// </summary>
        public string S_B_STATE { get; set; }
        public int N_PRIORITY { get; set; }
        /// <summary>
        /// 搬运的托盘号,多个用英文逗号分开
        /// </summary>
        public string S_CNTRS { get; set; }
        public string S_EQ_NO { get; set; }
        /// <summary>
        /// 起点层
        /// </summary>
        public int N_START_LAYER { get; set; }
        /// <summary>
        /// 终点层
        /// </summary>
        public int N_END_LAYER { get; set; }
        /// <summary>
        /// 搬运的托盘数量
        /// </summary>
        public int N_CNTR_COUNT { get; set; }
 
 
    }
 
    //均州现场
    //[SugarTable("dbo.")]
    //198服务器
    //[SugarTable("dbo.TN_0146")]
    //新安江
    //[SugarTable("dbo.TN_0027")]
    [SuGG("任务动作表")]
    public class WmsTaskAction : BaseModel
    {
        public string S_TASK_NO { get; set; }
        public string S_ACTION_CODE { get; set; }
        /// <summary>
        /// 设备号
        /// </summary>
        public string S_EQ_NO { get; set; }
        /// <summary>
        /// 设备类型
        /// </summary>
        public string S_EQ_TYPE { get; set; }
        /// <summary>
        /// 其它数据
        /// </summary>
        public string S_DATA { get; set; }
    }
 
    //均州现场
    //[SugarTable("dbo.")]
 
    //[SugarTable("dbo.TN_0023")]//新安江
    //[SugarTable("dbo.TN_0132")]//198服务器
    [SuGG("货位扩展表")]
    public class LocationExt : BaseModel
    {
        /// <summary>
        /// 货位
        /// </summary>
        public string S_LOC_CODE { get; set; }
        /// <summary>
        /// agv站点
        /// </summary>
        public string S_AGV_SITE { get; set; }
        /// <summary>
        /// 标识
        /// </summary>
        public string S_PICKUP_POINT { get; set; }
 
    }
 
 
}