采集项更改
This commit is contained in:
@@ -204,43 +204,41 @@ namespace JY.Inspection.Mes
|
||||
}
|
||||
}
|
||||
|
||||
//tag1 = new TagDataVOListItem() { tagCode = "WGJA001", tagValue = m.ArrivalBarCode, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "入站条码" }; tdvls.Add(tag1);
|
||||
//tag1 = new TagDataVOListItem() { tagCode = "WGJA002", tagValue = m.DepartureBarCode, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "出站条码" }; tdvls.Add(tag1);
|
||||
//tag1 = new TagDataVOListItem() { tagCode = "WGJA003", tagValue = m.WorkShift, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "班次" }; tdvls.Add(tag1);
|
||||
//tag1 = new TagDataVOListItem() { tagCode = "WGJA004", tagValue = m.OutTime, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "出站时间" }; tdvls.Add(tag1);
|
||||
#region 手动赋值
|
||||
tdvls.Add(new TagDataVOListItem()
|
||||
{
|
||||
tagCode = "VIM_OPERATION_PROCESS",
|
||||
tagValue = "外观检",
|
||||
tagTime = m.OutTime,
|
||||
tagCalculateResult = "Y",
|
||||
tagRemark = "工艺流程"
|
||||
});
|
||||
|
||||
//foreach (var item in m.PLCValDic)
|
||||
//{
|
||||
// // TODO 获取采集项配置
|
||||
// var cfgItem = Global.systemConfig.CollectItemCfgList
|
||||
// .Where(it => it.IsEnable && it.PLCRelAddress == item.Key)
|
||||
// .FirstOrDefault();
|
||||
tdvls.Add(new TagDataVOListItem() {
|
||||
tagCode = "VIM_MODEL",
|
||||
tagValue = Global.systemConfig.productType,
|
||||
tagTime = m.OutTime,
|
||||
tagCalculateResult = "Y",
|
||||
tagRemark = "型号"
|
||||
});
|
||||
|
||||
// if (cfgItem == null)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
tdvls.Add(new TagDataVOListItem() {
|
||||
tagCode = "VIM_RETEST_MARK",
|
||||
tagValue = m.IsRepeat ? "1" : "0",
|
||||
tagTime = m.OutTime,
|
||||
tagCalculateResult = "Y",
|
||||
tagRemark = "复测标记"
|
||||
});
|
||||
|
||||
// // 生成TagDataVoListItem
|
||||
// tdvls.Add(new TagDataVOListItem()
|
||||
// {
|
||||
// tagCode = cfgItem.MesItemCode,
|
||||
// tagValue = item.Value,
|
||||
// tagTime = m.OutTime,
|
||||
// tagCalculateResult = "Y",
|
||||
// tagRemark = cfgItem.MesItemName
|
||||
// });
|
||||
//}
|
||||
|
||||
//tdvls.Add(new TagDataVOListItem()
|
||||
//{
|
||||
// tagCode = "WGJA021",
|
||||
// tagValue = m.Result,
|
||||
// tagTime = m.OutTime,
|
||||
// tagCalculateResult = "Y",
|
||||
// tagRemark = "电池总结果"
|
||||
//});
|
||||
//多个
|
||||
tdvls.Add(new TagDataVOListItem()
|
||||
{
|
||||
tagCode = "VIM_RETEST_TIME",
|
||||
tagValue = m.OutTime,
|
||||
tagTime = m.OutTime,
|
||||
tagCalculateResult = "Y",
|
||||
tagRemark = "复测时间"
|
||||
});
|
||||
#endregion
|
||||
|
||||
pl.tagDataVOList = tdvls;
|
||||
prp.payload = JsonHelper.Serialize(pl);
|
||||
|
||||
Reference in New Issue
Block a user