结果接口: 通过属性名与mes编码对应,不使用PLC相对地址
This commit is contained in:
@@ -17,6 +17,7 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
@@ -499,10 +500,26 @@ namespace JY.Inspection.Frm
|
||||
data.CCD14 = row.Cells["中ME4"].Value?.ToString();
|
||||
data.CCD15 = row.Cells["极柱(POS/NEG)"].Value?.ToString();
|
||||
data.CCD16 = row.Cells["防爆阀(PRO)"].Value?.ToString();
|
||||
data.Result = row.Cells["综合结果"].Value?.ToString();
|
||||
data.Result = row.Cells["综合结果"].Value?.ToString()?.Trim();
|
||||
data.Remark = row.Cells["备注"].Value?.ToString();
|
||||
data.Flag = Convert.ToInt32(row.Cells["状态"].Value);
|
||||
|
||||
//var cfgList = Global.systemConfig.CollectItemCfgList.Where(it => it.IsEnable && it.PLCRelAddress != null)
|
||||
// .OrderBy(it => it.PLCRelAddress).ToList();
|
||||
|
||||
//for (int k = 0; k < cfgList.Count; k++)
|
||||
//{
|
||||
// var item = cfgList[k];
|
||||
|
||||
// var prop = data.GetType().GetProperty(item.HCPropName);
|
||||
|
||||
// if (prop != null)
|
||||
// {
|
||||
// var code = prop.GetValue(data)?.ToString();
|
||||
// data.PLCValDic.Add((int)item.PLCRelAddress, code);
|
||||
// }
|
||||
//}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user