渲染标签时查询近效期数据添加设备id条件

This commit is contained in:
maqiao 2025-05-27 16:01:24 +08:00
parent 8a61c1017f
commit 2e13275890
1 changed files with 1 additions and 1 deletions

View File

@ -566,7 +566,7 @@ namespace DM_Weight.ViewModels
else
{
//查询绑定库位的最近效期绑定到标签
ChannelStock cs = SqlSugarHelper.Db.Queryable<ChannelStock>().Where(cs => cs.DrawerNo == item.DrawerNo && cs.ColNo == item.ColNo&&cs.Quantity>0).OrderBy(cs => cs.EffDate).First();
ChannelStock cs = SqlSugarHelper.Db.Queryable<ChannelStock>().Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1") &&cs.DrawerNo == item.DrawerNo && cs.ColNo == item.ColNo&&cs.Quantity>0).OrderBy(cs => cs.EffDate).First();
DrugInfo drugSelected = item.Drug ?? new DrugInfo();
_portUtil.WindowName = "BindingChannelDialog";
// 向显示屏写入库位信息