schangxiang@126.com
2025-09-09 3d8966ba2c81e7e0365c8b123e861d18ee4f94f5
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
using iWareSAP.PARAM.Entity;
using System.Collections.Generic;
using System.Text;
namespace iWareSAP.IDOC.Entity
{
    public class PickList
    {
        /// <summary>
        /// 1保留号
        /// </summary>
        public string RSNUM { get; set; }
 
        /// <summary>
        /// 2保留行号
        /// </summary>
        public string RSPOS { get; set; }
 
        /// <summary>
        /// 3删除项
        /// </summary>
        public string XLOEK { get; set; }
 
        /// <summary>
        /// 4运行移动
        /// </summary>
        public string XWAOK { get; set; }
 
 
        /// <summary>
        /// 5最后发放
        /// </summary>
        public string KZEAR { get; set; }
 
 
        /// <summary>
        /// 6缺失部分
        /// </summary>
        public string XFEHL { get; set; }
 
 
        /// <summary>
        /// 7物料号
        /// </summary>
        public string MATNR { get; set; }
 
 
        /// <summary>
        /// 8工厂
        /// </summary>
        public string WERKS { get; set; }
 
        /// <summary>
        /// 9存储位置
        /// </summary>
        public string LGORT { get; set; }
 
 
        /// <summary>
        /// 10物料供应区域
        /// 
        /// </summary>
        public string PRVBE { get; set; }
 
 
        /// <summary>
        /// 11存储指示
        /// </summary>
        public string SOBKZ { get; set; }
 
        /// <summary>
        /// 12日期
        /// </summary>
        public string BDTER { get; set; }
 
 
        /// <summary>
        /// 13数量
        /// </summary>
        public string BDMNG { get; set; }
 
        /// <summary>
        /// 14单位
        /// </summary>
        public string MEINS { get; set; }
 
        /// <summary>
        /// 15数量是否固定
        /// </summary>
        public string FMENG { get; set; }
 
 
        /// <summary>
        /// 16收回数量
        /// </summary>
        public string ENMNG { get; set; }
 
        /// <summary>
        /// 17 单号
        /// </summary>
        public string AUFNR { get; set; }
 
        /// <summary>
        /// 18相关物料
        /// </summary>
        public string BAUGR { get; set; }
 
        /// <summary>
        /// 19移动类型
        /// </summary>
        public string BWART { get; set; }       
 
        /// <summary>
        /// 20 G/L账号
        /// </summary>
        public string SAKNR { get; set; }
 
        /// <summary>
        /// 21销售订单
        /// </summary>
        public string KDAUF { get; set; }
 
        /// <summary>
        /// 22销售订单行号
        /// </summary>
        public string KDPOS { get; set; }
 
        /// <summary>
        /// 22套数
        /// </summary>
        public string GAMNG { get; set; }
 
 
 
        /// <summary>
        /// 构造函数
        /// </summary>
        public PickList() { }
 
        /// <summary>
        /// 构造函数
        /// </summary>
        public PickList(string line)
        {
            var spliterChar = Encoding.UTF8.GetString(new byte[] { 9 });
            var args = line.Split(spliterChar.ToCharArray());
            RSNUM = args[0]; 
            RSPOS = args[1];
            XLOEK = args[2];
            XWAOK = args[3];
            KZEAR = args[4]; 
            XFEHL = args[5]; 
            MATNR = args[6]; 
            WERKS = args[7]; 
            LGORT = args[8]; 
            PRVBE = args[9]; 
            SOBKZ = args[10]; 
            BDTER = args[11]; 
            BDMNG = args[12]; 
            MEINS = args[13]; 
            FMENG = args[14]; 
            ENMNG = args[15]; 
            AUFNR = args[16]; 
            BAUGR = args[17]; 
            BWART = args[18]; 
            SAKNR = args[19]; 
            KDAUF = args[20];
            KDPOS = args[21];
            GAMNG = args.Length > 22 ? args[22].Trim() : "6";
        }
 
        public WmsWcfService.SaleOrder ToWmsSaleOrder()
        {
            return new WmsWcfService.SaleOrder
            {
                productNumber = BAUGR,
                productName = "",
                orderNumber = AUFNR,
                orderQuantity = string.IsNullOrEmpty(GAMNG) ? 1 : (int)decimal.Parse(GAMNG),
                saleCode =  KDAUF,
                ReservationNumber = RSNUM
            };
        }
 
        public WmsWcfService.SaleOrderList ToWmsSaleOrderList()
        {
            return new WmsWcfService.SaleOrderList
            {
               saleItem = KDPOS,
               materialCode = MATNR,
               materialName = "",
               exitQty = decimal.Parse(BDMNG),
               stockUnit = MEINS,
               batch = RSPOS,
               storageLocation = LGORT
            };
        }
 
 
 
        public override string ToString()
        {
            return string.Format("RSNUM(保留号)={0},RSPOS(保留行号)={1},XLOEK(删除项)={2},XWAOK(允许移动)={3},KZEAR(最后发放)={4},XFEHL(缺失部分)={5},MATNR(物料号)={6}, WERKS(工厂)={7},LGORT(存储位置)={8},PRVBE(物料供应区域)={9},SOBKZ (存储指示)={10},BDTER (日期)={11},BDMNG (数量)={12},MEINS (单位)={13}, FMENG(数量是否固定)={14},ENMNG(收回数量)={15},AUFNR(单号)={16},BAUGR (相关物料)={17},BWART (移动类型)={18}, SAKNR(G/L账号)={19}, KDAUF(销售订单)={20}, KDPOS(销售订单行号)={21}, OrderQuantity={22}", RSNUM, RSPOS, XLOEK, XWAOK, KZEAR, XFEHL, MATNR, WERKS, LGORT, PRVBE, SOBKZ, BDTER, BDMNG, MEINS, FMENG, ENMNG, AUFNR, BAUGR, BWART, SAKNR, KDAUF, KDPOS, GAMNG);  
        }
    }
}