schangxiang@126.com
2025-09-19 0821aa23eabe557c0d9ef5dbe6989c68be35d1fe
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
using iWareSAP.IDOC.Entity;
using UtilDll.COMMON.EnumType;
using UtilDll.UTIL;
namespace iWareSAP.PARAM.Entity
{
    public class MaterialEntity
    {
        /// <summary>
        /// 1零件编号
        /// </summary>
        public string productCode    {get; set;}    
 
        /// <summary>
        /// 2零件名称
        /// </summary>
        public string productName    {get; set;}    
 
        
 
        /// <summary>
        /// 3关联码
        /// </summary>
        public string relationCode {get; set;}    
 
        /// <summary>
        /// 4条码(小单位条码)
        /// </summary>
        public string productModel {get; set;}        
  
        /// <summary>
        /// 5货主Id
        /// </summary>
 
        public int consignor_Id { get; set;}        
 
        /// <summary>
        /// 6货主编号
        /// </summary>
        public string consignorCode {get; set;}        
 
        /// <summary>
        /// 7货主名称
        /// </summary>
        public string consignorName {get; set;}    
        
        /// <summary>
        /// 8供应商Id
        /// </summary>
        public int provider_Id {get; set;}
        
        /// <summary>
        /// 9供应商编号
        /// </summary>
        public string providerCode {get; set;}    
 
 
        /// <summary>
        /// 10供应商名称
        /// </summary>
        public string providerShortName {get; set;}        
 
        /// <summary>
        /// 12图片子表
        /// </summary>
        public string imageList {get; set;}    
 
        /// <summary>
        /// 13是否可用
        /// </summary>
        public int enable {get; set;}        
 
        /// <summary>
        /// 14采购价
        /// </summary>
        public int purchasePrice {get; set;}    
    
 
        /// <summary>
        /// 15商品规格
        /// </summary>
        public string productSpec {get; set;}    
 
 
        /// <summary>
        /// 16品牌ID
        /// </summary>
        public string brand_Id {get; set;}        
 
        /// <summary>
        /// 17品牌名称
        /// </summary>
        public string brandName {get; set;}        
 
        
        /// <summary>
        /// 18货品描述
        /// </summary>
    
        public string productDesc {get; set;}
    
 
        /// <summary>
        /// 19库存预警值
        /// </summary>
        public string storageLower {get; set;}        
 
 
        /// <summary>
        /// 20重量
        /// </summary>
        public decimal weight {get; set;}
 
 
 
        /// <summary>
        /// 22商品类别
        /// </summary>
        public string typeName {get; set;}    
 
        /// <summary>
        /// 23销售价
        /// </summary>
        
        public int salePrice {get; set;}
 
 
        /// <summary>
        /// 24税率
        /// </summary>
        public int rate {get; set;}    
 
 
        /// <summary>
        /// 25小单位
        /// </summary>
        public string smallUnit {get; set;}
 
        /// <summary>
        /// 26大单位
        /// </summary>
        public string bigUnit    {get; set;}    
 
        /// <summary>
        /// 27大包装条码    
        /// </summary>
        public string bigBarcode {get; set;}    
 
        /// <summary>
        /// 28大单位换算(和小单位换算)
        /// </summary>
        public string unitConvert{get; set;}        
 
        /// <summary>
        /// 29中单位
        /// </summary>
        public string middleUnit{get; set;}        
 
        /// <summary>
        /// 30中包装条码
        /// </summary>
        public string middleBarcode{get; set;}        
 
        /// <summary>
        /// 31中单位换算(和小单位换算)
        /// </summary>
        public string middleUnitConvert{get; set;}        
 
        /// <summary>
        /// 32型号
        /// </summary>
        public string productModelNo{get; set;}        
 
        /// <summary>
        /// 33保质期(天)
        /// </summary>
        public int shelfLifeDay{get; set;}        
 
        /// <summary>
        /// 34禁收天数
        /// </summary>
        public int noReceivingRate{get; set;}        
 
        
        /// <summary>
        /// 35停售提前时长(天)    
        /// </summary>
        public int stopSaleday{get; set;}    
 
 
 
 
        /// <summary>
        /// 构造函数
        /// </summary>
        public MaterialEntity() { }
 
 
 
        /// <summary>
        /// 构造函数
        /// </summary>
        public MaterialEntity(Material material) 
        {
            productCode = material.MATNR;//物料号
            productName = material.MAKTX_ZH;//中文描述
            productDesc = material.MAKTX_EN;//英文描述
            relationCode = material.RN; //保留号
            smallUnit = material.MEINS;//单位
            var w = string.IsNullOrEmpty(material.BRGEW) ? 0.0m : decimal.Parse(material.BRGEW);//重量
            weight = decimal.Parse(StringHelper.ConvertToString(w));
            bigUnit = material.GEWEI;//重量单位
            productModel = string.IsNullOrEmpty(material.PRCTR) ? "未知" : material.PRCTR;//成本中心
            brandName = material.WERKS;//工厂
 
 
            unitConvert = material.UMREZ1;//基础单位分子1
            middleUnit = material.UMREN1;//基础单位分母1
            middleBarcode = material.MEINH1;//转换单位1
            middleUnitConvert = material.UMREZ2;//基础单位分子2
            productModelNo = material.UMREN2;//基础单位分母2
            typeName = material.MEINH2;//转换单位2
            
 
            consignor_Id = 30;
            consignorName = "默认货主";
            consignorCode = "HZ20180002";
            
         
            enable = (int)EYesOrNo.是;
            provider_Id = -100;
            providerCode = "默认供应商";
            providerShortName = "";
        }
 
 
        //public override string ToString()
        //{
        //    return string.Format("storeItemId(ERP行号ID,行号)={0},productCode(商品编号,物料号)={1},productName(商品名称)={2},productModel(条码,保留号)={3},quantityOrder(明细数量,数量)={4},salePrice(销售价)={5},rowTotal(销售金额)={6},subTotal(折后金额)={7},salePriceDiscount(折后单价)={8},productSpec(规格,单号)={9},remark(备注)={10},storeOrderId(ERP订单ID)={11},state(状态)={12},smallUnit(小单位,单位)={13},bigUnit(大单位,销售订单)={14},bigBarcode(大包装条码,移动类型)={15},bigQty(大单位数量)={16},unitConvert(大单位换算(和小单位换算))={17},middleUnit(中单位,销售订单行号)={18},middleBarcode(中包装条码)={19},middleQty(中单位数量)={20},middleUnitConvert(中单位换算(和小单位换算))={21},productModelNo(型号,相关物料)={22},virtualStorage(ERP库别,工厂)={23}, virtualStorageName(ERP库别名称,存储位置)={24}", storeItemId, productCode, productName, productModel, quantityOrder, salePrice, rowTotal, subTotal, salePriceDiscount, productSpec, remark, storeOrderId, state, smallUnit, bigUnit, bigBarcode, bigQty, unitConvert, middleUnit, middleBarcode, middleQty, middleUnitConvert, productModelNo, virtualStorage, virtualStorageName);
        //}
    }
}