jt
2021-06-10 5d0d028456874576560552f5a5c4e8b801786f11
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace HH.WMS.Entitys.Tzlj
{
    /// <summary>
    /// MES 叠拖返回数据
    /// </summary>
    [Table("MesStackTray")]
    public class MesStackTrayEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Column("CN_GUID")]
        public string CN_GUID { get; set; }
 
        /// <summary>
        /// 结果 true 成功, false 失败
        /// </summary>
        [Column("RetVal")]
        public string RetVal { get; set; }
 
        /// <summary>
        /// 内部错误代码 441 数据获取失败,442 数据库查询失败,443 获取到空值
        /// </summary>
        [Column("RetVal")]
        public string ErrCode { get; set; }
 
        /// <summary>
        /// 内部错误信息
        /// </summary>
        [Column("ErrMsg")]
        public string ErrMsg { get; set; }
 
        /// <summary>
        /// 客户协议号 CN_S_ITEM_NAME itemName 
        /// </summary>
        [Column("SaleContractName")]
        public string SaleContractName { get; set; }
 
        /// <summary>
        /// 组件长度  CN_S_EXT1
        /// </summary>
        [Column("Length")]
        public string Length { get; set; }
 
        /// <summary>
        /// 组件宽度 CN_S_EXT2
        /// </summary>
        [Column("Width")]
        public string Width { get; set; }
 
        /// <summary>
        /// 组件高度 CN_S_EXT3
        /// </summary>
        [Column("Height")]
        public string Height { get; set; }
 
        /// <summary>
        /// 包内数量 CN_S_PRODUCTION_BATCH
        /// </summary>
        [Column("PackInQty")]
        public string PackInQty { get; set; }
 
        /// <summary>
        /// 组件型号 CN_S_ITEM_CODE
        /// </summary>
        [Column("ModuleType")]
        public string ModuleType { get; set; }
 
        /// <summary>
        /// 托盘档位 CN_S_UNIQUE_CODE
        /// </summary>
        [Column("Staple")]
        public string Staple { get; set; }
     
 
        /// <summary>
        /// 包装类型:正常包装、多功能包装  CN_S_LOT_NO
        /// </summary>
        [Column("PackType")]
        public string PackType { get; set; }
 
        /// <summary>
        /// 工单号 CN_S_SERIAL_NO
        /// </summary>
        [Column("MoName")]
        public string MoName { get; set; }
 
        /// <summary>
        /// 托盘号 CN_S_TRAY_CODE
        /// </summary>
        [Column("TrayCode")]
        public string TrayCode { get; set; }
 
        #region 需要对比的数据
 
        /// <summary>
        /// 客户名称 CN_S_OWNER
        /// </summary>
        [Column("CustomerName")]
        public string CustomerName { get; set; }
 
        /// <summary>
        /// 标称功率 CN_S_MODEL
        /// </summary>
        [Column("Power")]
        public string Power { get; set; }
 
        /// <summary>
        /// 电流档 CN_S_TRAY_GRID
        /// </summary>
        [Column("CurrentLevel")]
        public string CurrentLevel { get; set; }
 
        /// <summary>
        /// 组件等级  CN_S_FIGURE_NO
        /// </summary>
        [Column("Level")]
        public string Level { get; set; }
 
        /// <summary>
        /// 订单类型 分布式户用客户标准D,分布式户用隆基乐叶标准A,非分布式户用客户标准C,非分布式户用隆基乐叶标准B CN_S_ITEM_STATE
        /// </summary>
        [Column("POType")]
        public string POType { get; set; }
 
        /// <summary>
        /// 色系(分布式订单需要) CN_S_MEASURE_UNIT
        /// </summary>
        [Column("Color")]
        public string Color { get; set; }
 
        #endregion
 
        [Column("CN_T_CREATE")]
        public DateTime CN_T_CREATE { get; set; }
 
        public MesStackTrayEntity Map(MesStackTrayDto dto)
        {
            CN_GUID = Guid.NewGuid().ToString();
            RetVal = dto.RetVal;
            ErrCode = dto.ErrCode;
            ErrMsg = dto.ErrMsg;
            SaleContractName = dto.SaleContractName;
            Length = dto.Length;
            Width = dto.Width;
            Height = dto.Height;
            PackInQty = dto.PackInQty;
            ModuleType = dto.ModuleType;
            Staple = dto.Staple;
            PackType = dto.PackType;
            MoName = dto.MoName;
            TrayCode = dto.TrayCode;
            CustomerName = dto.CustomerName;
            Power = dto.Power;
            CurrentLevel = dto.CurrentLevel;
            Level = dto.Level;
            POType = dto.POType;
            Color = dto.Color;
            CN_T_CREATE = DateTime.Now;
            return this;
        }
    }
}