From 013e2821891cde3e1cc14d5316c94da4d57d8949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=B7=A7?= <625215135@qq.com> Date: Thu, 21 Aug 2025 14:58:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=90=8E=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E6=89=B9=E6=AC=A1=E5=BA=93=E5=AD=98=E6=95=B0=EF=BC=88?= =?UTF-8?q?=E5=AE=9E=E7=89=A9=EF=BC=89=E4=B8=8E=E4=B8=8A=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E5=90=8E=E7=9A=84=E6=89=B9=E6=AC=A1=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=95=B0=E5=B7=AE=E5=88=AB=E5=A4=A7=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=8F=AF=E8=83=BD=E5=AD=98=E5=9C=A8=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs b/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs index c8c8ed7..f0c88d0 100644 --- a/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs +++ b/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs @@ -259,12 +259,11 @@ namespace DM_Weight.ViewModels }).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand(); // 获取更新完库存后的药品库存 List nowChannels = SqlSugarHelper.Db.Queryable() - .Where(cs => cs.MachineId.Equals(it.MachineId)||cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"])) + .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"]) ||cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"])) .Where(cs => cs.DrugId.Equals(it.DrugId)) .Where(cs=>cs.ManuNo.Equals(it.ManuNo)) .Where(cs => cs.DrawerType == 1) .ToList(); - // 保存数据 出/入库记录 SqlSugarHelper.Db.Insertable(new MachineRecord() { @@ -280,7 +279,8 @@ namespace DM_Weight.ViewModels Quantity = it.AddQuantity, Type = 1, InvoiceId = InvoiceId - //,StockQuantity = nowChannels.Sum(it => it.Quantity) + , + ReturnQuantity1 = nowChannels.Sum(it => it.Quantity) }).ExecuteCommand(); //查询上一条账册中的空瓶数