优化当没有需要下料的吸嘴时程序报错

master
lhiven 1 year ago
parent cd070a074e
commit 5c299b8418

@ -193,7 +193,13 @@ namespace Rs.MotionPlat.Commom
{
if (nozzles != null && nozzles.Count > 0)
{
return nozzles.Where(n => n.Status == ENozzleStatus.ToUnload).OrderBy(o=>o.ToType).First();
var nozzlelist = nozzles.Where(n => n.Status == ENozzleStatus.ToUnload);
if (nozzlelist != null && nozzlelist.Count() > 0)
{
return nozzles.Where(n => n.Status == ENozzleStatus.ToUnload).OrderBy(o => o.ToType).First();
}
else
return null;
}
return null;
}

Loading…
Cancel
Save