交换柜补药写标签指令添加await

This commit is contained in:
maqiao 2025-04-25 15:37:28 +08:00
parent c971e9d1bc
commit 5a27970ffc
2 changed files with 4 additions and 3 deletions

View File

@ -632,9 +632,9 @@ namespace DM_Weight.ViewModels
List<ChannelStock> singleChannelsBoxSmart = record.FindAll(it => it.BoardType == 35);
if ((singleChannelsBoxSmart.Count > 0 ? singleChannelsBoxSmart[0].BoardType : 1) == 35)
{
singleChannelsBoxSmart.ForEach(it =>
singleChannelsBoxSmart.ForEach(async it =>
{
_portUtil.WriteQuantityMethod((it.Quantity - it.TakeQuantity), it.DrawerNo, it.ColNo);
await _portUtil.WriteQuantityMethod((it.Quantity - it.TakeQuantity), it.DrawerNo, it.ColNo);
Thread.Sleep(200);
});
}

View File

@ -166,7 +166,8 @@ namespace DM_Weight.ViewModels
}
else
{
_ChannelLists.Clear();
_ChannelLists?.Clear();
_ChannelLists = new List<ChannelList>();
}
}