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
using iWareSAP.PARAM.Entity;
using System.Text;
namespace iWareSAP.IDOC.Entity
{
    public class Stock
    {
        /// <summary>
        /// 1物料号
        /// </summary>
        public string MATNR { get; set; }
 
        /// <summary>
        /// 2物料描述
        /// </summary>
        public string MAKTX { get; set; }
 
        /// <summary>
        /// 3打印格式
        /// </summary>
        public string YYBCEZNDR { get; set; }
 
        /// <summary>
        /// 4物料组
        /// </summary>
        public string GROUP { get; set; }
 
 
        /// <summary>
        /// 5价格
        /// </summary>
        public string PRICE { get; set; }
 
 
        /// <summary>
        /// 6数量
        /// </summary>
        public string PEINH { get; set; }
 
 
        /// <summary>
        /// 7单位
        /// </summary>
        public string MEINS { get; set; }
 
 
        /// <summary>
        /// 8工厂
        /// </summary>
        public string WERKS { get; set; }
 
        /// <summary>
        /// 9存储位置
        /// </summary>
        public string LGORT { get; set; }
 
 
        /// <summary>
        /// 10序列号
        /// 
        /// </summary>
        public string SOBKZ { get; set; }
 
 
        /// <summary>
        /// 11供应商
        /// </summary>
        public string LIFNR { get; set; }
 
        /// <summary>
        /// 12销售订单
        /// </summary>
        public string VBELN { get; set; }
 
 
        /// <summary>
        /// 13项目
        /// </summary>
        public string POSNR { get; set; }
 
        /// <summary>
        /// 14UU库存
        /// </summary>
        public string LABST { get; set; }
 
        /// <summary>
        /// 15传递入库
        /// </summary>
        public string UMLME { get; set; }
 
        /// <summary>
        /// 16QI入库
        /// </summary>
        public string INSME { get; set; }
 
        /// <summary>
        /// 17剩余量
        /// </summary>
        public string EINME { get; set; }
 
        /// <summary>
        /// 18锁定
        /// </summary>
        public string BLOCK { get; set; }
 
        /// <summary>
        /// 19返回值
        /// </summary>
        public string RETME { get; set; }       
 
        /// <summary>
        /// 20子项总数
        /// </summary>
        public string SUBTO { get; set; }
 
        
        /// <summary>
        /// 构造函数
        /// </summary>
        public Stock() { }
 
        /// <summary>
        /// 构造函数
        /// </summary>
        public Stock(string line)
        {
            var spliterChar = Encoding.UTF8.GetString(new byte[] { 9 });
            var args = line.Split(spliterChar.ToCharArray());
            MATNR = args[0]; 
            MAKTX = args[1];
            YYBCEZNDR = args[2];
            GROUP = args[3];
            PRICE = args[4]; 
            PEINH = args[5]; 
            MEINS = args[6]; 
            WERKS = args[7]; 
            LGORT = args[8]; 
            SOBKZ = args[9]; 
            LIFNR = args[10]; 
            VBELN = args[11]; 
            POSNR = args[12]; 
            LABST = args[13]; 
            UMLME = args[14]; 
            INSME = args[15]; 
            EINME = args[16]; 
            BLOCK = args[17]; 
            RETME = args[18]; 
            SUBTO = args[19];
        }
 
        public WmsWcfService.ProductStock ToWmsProductStock()
        {
            return new WmsWcfService.ProductStock
            {
                SaleCode = VBELN,
                SaleItem = POSNR,
                materialName = MAKTX,
                materialCode = MATNR,
                stockUnit = MEINS,
                stockQuantity = decimal.Parse(SUBTO)
            };
        }
 
        public override string ToString()
        {
            return string.Format("MATNR(物料号)={0},MAKTX(物料描述)={1},YYBCEZNDR(打印格式)={2},GROUP(物料组)={3},PRICE(价格)={4},PEINH (数量)={5},MEINS(单位)={6},WERKS(工厂)={7},LGORT(存储位置)={8},SOBKZ(序列号)={9},LIFNR(供应商)={10},VBELN(销售订单)={11},POSNR(项目)={12},UU库存(LABST)={13},传递入库(UMLME)={14},INSME(QI入库)={15},EINME(剩余量)={16},BLOCK (锁定)={17},RETME(返回值)={18}, SUBTO(子项总数)={19}", MATNR, MAKTX, YYBCEZNDR, GROUP, PRICE, PEINH, MEINS, WERKS, LGORT, SOBKZ, LIFNR, VBELN, POSNR, LABST, UMLME, INSME, EINME, BLOCK, RETME, SUBTO);  
        }
    }
}