username@email.com
2025-05-09 66beb245e516809514642c00922f0339bf760518
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
482
483
484
485
486
/**  
*OA_CorporateClients.cs
*
*功 能: N / A
* 类 名: OA_CorporateClients
*
* Ver    变更日期             负责人  变更内容
* ───────────────────────────────────
* V0.01  2013-4-2 14:27:43   N / A    初版
  *
  *
  *
  *
  *
  *
  */
 
using System;
using CY.Infrastructure.Domain;
using CY.Infrastructure.Common;
 
namespace CY.Model
{
    /// <summary>
    /// 印刷参数
    /// </summary>
    [Serializable]
    public partial class OA_Kaipiaonew : IAggregateRoot
    {
        #region Model
        /// <summary>
        /// Keyid
        /// </summary>
        public int Keyid { get; set; }
        /// <summary>
        ///  FirmId
        /// </summary>
        public Guid FirmId { get; set; }
        /// <summary>
        /// 客户id
        /// </summary>
        public Guid BuyerId { get; set; }
        /// <summary>
        /// 客户id
        /// </summary>
        public string BuyerName { get; set; }
 
        public int? BusinessManagerId { get; set; }
 
        public string BusinessManager { get; set; }
 
        /// <summary>
        /// 说明
        /// </summary>
        public string remark { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string Creater
        {
            get;
            set;
        }
 
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime
        {
            get;
            set;
        }
 
        /// <summary>
        /// 创建时间
        /// </summary>
        public string CreateTimeName
        {
            get {
                if (CreateTime.HasValue)
                {
                    return CreateTime.Value.ToString("yyyy-MM-dd");
                }
                else
                {
                    return "";
                }
              
            }
            
        }
        /// <summary>
        /// 修改人
        /// </summary>
        public string Updater
        {
            get;
            set;
        }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? LastUpdateTime
        {
            get;
            set;
        }
 
        public string SellerOrderId
        {
            get;
            set;
        }
 
        /// <summary>
        /// 数量
        /// </summary>
        public int shuliang
        {
            get
            {
                if (!string.IsNullOrEmpty(SellerOrderId))
                {
                    return SellerOrderId.Trim(',').Split(',').Length;
                }
                else
                {
                    return 0;
                }
 
            }
 
        }
 
 
        /// <summary>
        /// 逾期天数
        /// </summary>
        public int yuqi
        {
            get
            {
                if (CreateTime.HasValue)
                {
                    var sss = DateTime.Now;
                    if (sss.Year == CreateTime.Value.Year && sss.Month == CreateTime.Value.Month)
                    {
                        return 0;
                    }
                    else
                    {
                        var dateTime = CreateTime.Value.AddMonths(1);
                        DateTime date1 = new DateTime(dateTime.Year, dateTime.Month, 1);
                       
                        TimeSpan diff = sss.Subtract(date1);
                        return diff.Days;
                    }
                   
                }
                else
                {
                    return 0;
                }
 
            }
 
        }
 
 
        public string Fapiaohaoma { get; set; }
        public string Kaipiaoshuoming { get; set; }
        
        public decimal? Jine { get; set; }
 
 
        public int? Kaipiaoshenqing
        {
            get;
            set;
        }
 
        public string KaipiaoshenqingName { get; set; }
 
 
        public string Nashuirenshibiehao { get; set; }
 
        public string dizhidianhua { get; set; }
 
        public string Kaihuhang { get; set; }
 
        public decimal? Shoukuanjine { get; set; }
        public DateTime? ShoukuanTime
        {
            get;
            set;
        }
 
        public string ShoukuanCreater
        {
            get;
            set;
        }
 
 
 
        public int? Chexiaozhuangtai { get; set; }
        public DateTime? ChexiaoTime
        {
            get;
            set;
        }
 
        public string ChexiaoCreater
        {
            get;
            set;
        }
 
       
 
 
        public int? Kehuqianshou
        {
            get;
            set;
        }
        public string KehuqianshouName { get; set; }
 
        public string Qianshoutupian { get; set; }
        public DateTime? KehuqianshouTime { get; set; }
 
        public string KehuqianshouCreater
        {
            get;
            set;
        }
 
        public DateTime? KaipiaoquerenTime { get; set; }
 
        public string KaipiaoquerenCreater
        {
            get;
            set;
        }
 
 
 
        public DateTime? CuishouTime { get; set; }
 
 
        /// <summary>
        /// 创建时间
        /// </summary>
        public string CuishouTimeName
        {
            get
            {
                if (CuishouTime.HasValue)
                {
                    return CuishouTime.Value.ToString("MM-dd HH:mm");
                }
                else
                {
                    return "";
                }
 
            }
 
        }
 
        public string CuishouCreater
        {
            get;
            set;
        }
 
 
        #endregion Model
 
        #region Visiter
 
        /// <summary>
        /// 属性访问器
        /// </summary>
        /// <param name="name">属性名</param>
        /// <param name="index">索引</param>
        /// <param name="isChange">是否将指定属性设置为传入值</param>
        /// <param name="value">需要赋予的值</param>
        /// <returns>与名称对应的属性值</returns>
        public object Visiter(string name, int? index = -1, bool isChange = false, object value = null)
        {
            object theValue = null;
 
 
            if ("Keyid".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 1)
            {
                this.Keyid = isChange ? MyConvert.ConvertToInt32(value).Value : Keyid;
                theValue = this.Keyid;
            }
            else if ("FirmId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 2)
            {
                this.FirmId = isChange ? MyConvert.ConvertToGuid(value) : FirmId;
                theValue = this.FirmId;
            }
            else if ("BuyerId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 3)
            {
                this.BuyerId = isChange ? MyConvert.ConvertToGuid(value) : BuyerId;
                theValue = this.BuyerId;
            }
            else if ("BuyerName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 4)
            {
                this.BuyerName = isChange ? MyConvert.ConvertToString(value) : BuyerName;
                theValue = this.BuyerName;
            }
 
            else if ("BusinessManagerId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 5)
            {
                this.BusinessManagerId = isChange ? MyConvert.ConvertToInt32(value) : BusinessManagerId;
                theValue = this.BusinessManagerId;
            }
            else if ("BusinessManager".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 6)
            {
                this.BusinessManager = isChange ? MyConvert.ConvertToString(value) : BusinessManager;
                theValue = this.BusinessManager;
            }
            else if ("Kaipiaoshenqing".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 7)
            {
                this.Kaipiaoshenqing = isChange ? MyConvert.ConvertToInt32(value) : Kaipiaoshenqing;
                theValue = this.Kaipiaoshenqing;
            }
            else if ("KaipiaoshenqingName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 8)
            {
                this.KaipiaoshenqingName = isChange ? MyConvert.ConvertToString(value) : KaipiaoshenqingName;
                theValue = this.KaipiaoshenqingName;
            }
            else if ("Kehuqianshou".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 9)
            {
                this.Kehuqianshou = isChange ? MyConvert.ConvertToInt32(value) : Kehuqianshou;
                theValue = this.Kehuqianshou;
            }
            else if ("KehuqianshouName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 10)
            {
                this.KehuqianshouName = isChange ? MyConvert.ConvertToString(value) : KehuqianshouName;
                theValue = this.KehuqianshouName;
            }
            else if ("KehuqianshouTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 11)
            {
                this.KehuqianshouTime = isChange ? MyConvert.ConvertToDateTime(value) : KehuqianshouTime;
                theValue = this.KehuqianshouTime;
            }
            else if ("KehuqianshouCreater".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 12)
            {
                this.KehuqianshouCreater = isChange ? MyConvert.ConvertToString(value) : KehuqianshouCreater;
                theValue = this.KehuqianshouCreater;
            }
            else if ("KaipiaoquerenTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 13)
            {
                this.KaipiaoquerenTime = isChange ? MyConvert.ConvertToDateTime(value) : KaipiaoquerenTime;
                theValue = this.KaipiaoquerenTime;
            }
            else if ("KaipiaoquerenCreater".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 13)
            {
                this.KaipiaoquerenCreater = isChange ? MyConvert.ConvertToString(value) : KaipiaoquerenCreater;
                theValue = this.KaipiaoquerenCreater;
            }
 
 
 
 
 
 
            else if ("Creater".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 14)
            {
                this.Creater = isChange ? MyConvert.ConvertToString(value) : Creater;
                theValue = this.Creater;
            }
            else if ("CreateTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 15)
            {
                this.CreateTime = isChange ? MyConvert.ConvertToDateTime(value) : CreateTime;
                theValue = this.CreateTime;
            }
            else if ("Updater".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 16)
            {
                this.Updater = isChange ? MyConvert.ConvertToString(value) : Updater;
                theValue = this.Updater;
            }
            else if ("LastUpdateTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 17)
            {
                this.LastUpdateTime = isChange ? MyConvert.ConvertToDateTime(value) : LastUpdateTime;
                theValue = this.LastUpdateTime;
            }
 
            
            else if ("SellerOrderId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 20)
            {
                this.SellerOrderId = isChange ? MyConvert.ConvertToString(value) : SellerOrderId;
                theValue = this.SellerOrderId;
            }
            else if ("remark".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 21)
            {
                this.remark = isChange ? MyConvert.ConvertToString(value) : remark;
                theValue = this.remark;
            }
            else if ("Fapiaohaoma".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 22)
            {
                this.Fapiaohaoma = isChange ? MyConvert.ConvertToString(value) : Fapiaohaoma;
                theValue = this.Fapiaohaoma;
            }
            else if ("Jine".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 23)
            {
                this.Jine = isChange ? MyConvert.ConvertToDecimal(value) : Jine;
                theValue = this.Jine;
            }
            else if ("Nashuirenshibiehao".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 24)
            {
                this.Nashuirenshibiehao = isChange ? MyConvert.ConvertToString(value) : Nashuirenshibiehao;
                theValue = this.Nashuirenshibiehao;
            }
            else if ("dizhidianhua".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 25)
            {
                this.dizhidianhua = isChange ? MyConvert.ConvertToString(value) : dizhidianhua;
                theValue = this.dizhidianhua;
            }
            else if ("Kaihuhang".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 26)
            {
                this.Kaihuhang = isChange ? MyConvert.ConvertToString(value) : Kaihuhang;
                theValue = this.Kaihuhang;
            }
            else if ("Shoukuanjine".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 27)
            {
                this.Shoukuanjine = isChange ? MyConvert.ConvertToDecimal(value) : Shoukuanjine;
                theValue = this.Shoukuanjine;
            }
            else if ("ShoukuanTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 28)
            {
                this.ShoukuanTime = isChange ? MyConvert.ConvertToDateTime(value) : ShoukuanTime;
                theValue = this.ShoukuanTime;
            }
            else if ("ShoukuanCreater".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 29)
            {
                this.ShoukuanCreater = isChange ? MyConvert.ConvertToString(value) : ShoukuanCreater;
                theValue = this.ShoukuanCreater;
            }
            else if ("Chexiaozhuangtai".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 30)
            {
                this.Chexiaozhuangtai = isChange ? MyConvert.ConvertToInt32(value) : Chexiaozhuangtai;
                theValue = this.Chexiaozhuangtai;
            }
            else if ("ChexiaoTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 31)
            {
                this.ChexiaoTime = isChange ? MyConvert.ConvertToDateTime(value) : ChexiaoTime;
                theValue = this.ChexiaoTime;
            }
            else if ("ChexiaoCreater".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 32)
            {
                this.ChexiaoCreater = isChange ? MyConvert.ConvertToString(value) : ChexiaoCreater;
                theValue = this.ChexiaoCreater;
            }
            else if ("Qianshoutupian".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 33)
            {
                this.Qianshoutupian = isChange ? MyConvert.ConvertToString(value) : Qianshoutupian;
                theValue = this.Qianshoutupian;
            }
            else if ("Kaipiaoshuoming".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 34)
            {
                this.Kaipiaoshuoming = isChange ? MyConvert.ConvertToString(value) : Kaipiaoshuoming;
                theValue = this.Kaipiaoshuoming;
            }
            else if ("CuishouTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 35)
            {
                this.CuishouTime = isChange ? MyConvert.ConvertToDateTime(value) : CuishouTime;
                theValue = this.CuishouTime;
            }
            else if ("CuishouCreater".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 35)
            {
                this.CuishouCreater = isChange ? MyConvert.ConvertToString(value) : CuishouCreater;
                theValue = this.CuishouCreater;
            }
            
 
            return theValue;
        }
 
        #endregion
    }
}