lss
2025-05-15 c3e54976ff231a4ac5404248794b98e23b6dc8ce
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
using HH.WCS.JiaTong.models;
using SqlSugar;
using System;
 
namespace HH.WCS.JiaTong
{
 
    [SugarTable("TN_Task")]
    public class WCSTask : BaseModel
    {
 
 
        public string S_DATA { get; set; }
        public int N_SORT_NO { get; set; }
        /// <summary>
        /// 起点库区
        /// </summary>
        public string S_START_AREA { get; set; }
        /// <summary>
        /// 终点库区
        /// </summary>
        public string S_END_AREA { get; set; }
        /// <summary>
        /// 起点货位
        /// </summary>
        public string S_START_LOC { get; set; }
        /// <summary>
        /// 终点货位
        /// </summary>
        public string S_END_LOC { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string S_NOTE { get; set; }
        public DateTime? T_START_TIME { get; set; }
        public DateTime? T_END_TIME { get; set; }
        /// <summary>
        /// 来源单号
        /// </summary>
        public string S_EQ_NO { get; set; }
        /// <summary>
        /// 来源单号
        /// </summary>
        public string S_WMS_NO { get; set; }
        /// <summary>
        /// 任务类型
        /// </summary>
        public string S_TYPE { get; set; }
        /// <summary>
        /// 任务状态 (0等待    1已推送        2执行    3完成    4错误)
        /// </summary>
        public string S_B_STATE { get; set; } = "等待";
        /// <summary>
        /// 任务动作码(1 开始执行,2 任务完成 ,3 开始取货,4 取货完成,5 开始放货,6 放货完成 ,7 任务取消,)
        /// </summary>
        public int N_B_STATE { get; set; }
        /// <summary>
        /// 起点库区编码
        /// </summary>
        public string S_START_WH { get; set; }
        /// <summary>
        /// 终点库区编码
        /// </summary>
        public string S_END_WH { get; set; }
 
        public string S_START_SITE { get; set; }
 
        public int S_START_SITE_LAYER { get; set; }
        public string S_END_SITE { get; set; }
 
        public int S_END_SITE_LAYER { get; set; }
        /// <summary>
        ///0无 1NDC 2天目 3国自 4PLC 5杭奥
        /// </summary>
        public int N_SCHEDULE_TYPE { get; set; }
        /// <summary>
        /// 下发设备
        /// </summary>
        public string S_SCHEDULE_TYPE { get; set; }
 
        public int N_TYPE { get; set; }
 
        /// <summary>
        /// 任务来源类型 1.钢丝立库  2.胶片库  3.预备库 ,4.原材料库,通过物料确认任务来源 5 mes 6 wms
        /// </summary>
        public int Z_TYPE { get; set; }
        public string S_FACTORY { get; set; } = util.Settings.FacCode;
        /// <summary>
        /// 任务优先级
        /// </summary>
        public int N_PRIORITY { get; set; }
        public string S_ERR { get; set; }
        public string S_OP_CODE { get; set; }
        /// <summary>
        /// 任务编码
        /// </summary>
        public string S_CODE { get; set; }
        public int N_ERR { get; set; }
        public string S_EQ_TASK_CODE { get; set; }
        public string S_STATE_PRE { get; set; }
        public int N_REVIEW_RESULT { get; set; }
        /// <summary>
        /// 托盘编码
        /// </summary>
        public string S_CNTR_CODE { get; set; }
        public string S_OP_NAME { get; set; }
        public string S_WORKSHOP_NO { get; set; }
        public string S_WORKSHOP_NAME { get; set; }
 
        /// <summary>
        /// 起点层
        /// </summary>
        public int N_START_LAYER { get; internal set; }
        //终点层
        public int N_END_LAYER { get; internal set; }
        /// <summary>
        /// 托盘数量
        /// </summary>
        public int N_CNTR_COUNT { get; internal set; }
 
        internal static string GetSchedule(int scheduleType)
        {
            //0无 1NDC 2天目 3国自 4输送机 5立库
            var scheduleTypeName = "";
            switch (scheduleType)
            {
                case 0: scheduleTypeName = "无"; break;
                case 1: scheduleTypeName = "NDC"; break;
                case 2: scheduleTypeName = "天目"; break;
                case 3: scheduleTypeName = "国自"; break;
                case 4: scheduleTypeName = "PLC"; break;
                case 5: scheduleTypeName = "杭奥"; break;
            }
            return scheduleTypeName;
        }
 
        internal static string GetStateStr(int state)
        {
            //0等待      1已推送        2执行    3完成    4错误
            var status = "";
            switch (state)
            {
                case 0: status = "等待"; break;
                case 1: status = "已推送"; break;
                case 2: status = "执行"; break;
                case 3: status = "完成"; break;
                case 4: status = "错误"; break;
            }
            return status;
        }
    }
}