还空瓶页面加载数据添加设备id条件

This commit is contained in:
maqiao 2024-08-20 17:24:08 +08:00
parent aed46d6c7e
commit 446364f451
1 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@ using System.Threading.Tasks;
using DM_Weight.Models;
using DM_Weight.util;
using DM_Weight.Common;
using System.Configuration;
namespace DM_Weight.ViewModels
{
@ -100,7 +101,7 @@ namespace DM_Weight.ViewModels
Channels = SqlSugarHelper.Db.Queryable<ChannelStock>()
.LeftJoin<DrugInfo>((cs,di) => cs.DrugId == di.DrugId.ToString())
.Where((cs) => cs.DrawerType != (Int32)DrawerTypeEnum.drawerTypeOne)
.Where((cs) => cs.DrawerType != (Int32)DrawerTypeEnum.drawerTypeOne && cs.MachineId == (ConfigurationManager.AppSettings["machineId"] ?? "DM1"))
.Select((cs, di) => new ChannelStock{
CanReturnQuantity = SqlFunc.Subqueryable<MachineRecord>().Where(mr => mr.DrugId == cs.DrugId).Where(mr => mr.Type == 2).Where(mr => mr.Status != 2).Select(mr => SqlFunc.IsNull(SqlFunc.AggregateSumNoNull(mr.Quantity - mr.ReturnQuantity1 - mr.ReturnQuantity2), 0)) ,
DrugInfo = new DrugInfo