还空瓶页面加载数据添加设备id条件
This commit is contained in:
parent
aed46d6c7e
commit
446364f451
|
@ -11,6 +11,7 @@ using System.Threading.Tasks;
|
||||||
using DM_Weight.Models;
|
using DM_Weight.Models;
|
||||||
using DM_Weight.util;
|
using DM_Weight.util;
|
||||||
using DM_Weight.Common;
|
using DM_Weight.Common;
|
||||||
|
using System.Configuration;
|
||||||
|
|
||||||
namespace DM_Weight.ViewModels
|
namespace DM_Weight.ViewModels
|
||||||
{
|
{
|
||||||
|
@ -100,7 +101,7 @@ namespace DM_Weight.ViewModels
|
||||||
|
|
||||||
Channels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
Channels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||||
.LeftJoin<DrugInfo>((cs,di) => cs.DrugId == di.DrugId.ToString())
|
.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{
|
.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)) ,
|
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
|
DrugInfo = new DrugInfo
|
||||||
|
|
Loading…
Reference in New Issue