From 07db386649025560a1c239a900e3dd79080e326f Mon Sep 17 00:00:00 2001 From: maqiao <625215135@qq.com> Date: Sat, 6 Jul 2024 13:21:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A035=E8=8D=AF=E7=9B=92=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E6=A0=87=E7=AD=BE=E7=B1=BB=E5=9E=8B=E5=B9=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=9B=B8=E5=85=B3=E7=B1=BB=E5=9E=8B=E5=86=99=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DM_Weight/Converter/BoardTypeConverter.cs | 13 +++++++++++++ DM_Weight/ViewModels/ApplyInStockWindowViewModel.cs | 2 +- .../ViewModels/BindingChannelDialogViewModel.cs | 6 +++--- .../ViewModels/BindingChannelNewDialogViewModel.cs | 6 +++--- .../ViewModels/DrawerAddDrugWindowViewModel.cs | 9 +++++++++ .../ViewModels/DrawerTakeDrugWindowViewModel.cs | 9 +++++++++ DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs | 2 +- DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs | 2 +- DM_Weight/ViewModels/OrderReturnDialogViewModel.cs | 2 +- DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs | 2 +- DM_Weight/ViewModels/ReturnEmptyDialogViewModel.cs | 2 +- DM_Weight/ViewModels/SelfAddDialogViewModel.cs | 2 +- DM_Weight/ViewModels/SelfTakeDialogViewModel.cs | 3 ++- 13 files changed, 46 insertions(+), 14 deletions(-) diff --git a/DM_Weight/Converter/BoardTypeConverter.cs b/DM_Weight/Converter/BoardTypeConverter.cs index 54e5382..92a0c24 100644 --- a/DM_Weight/Converter/BoardTypeConverter.cs +++ b/DM_Weight/Converter/BoardTypeConverter.cs @@ -94,6 +94,19 @@ namespace DM_Weight.Converter { return "计数回收(外置)"; } + case 35: + if (DrawerType == 1) + { + return "药盒智能显示"; + } + else if (DrawerType == 2) + { + return "药盒智能显示回收(内置)"; + } + else + { + return "药盒智能显示回收(外置)"; + } } return ""; } diff --git a/DM_Weight/ViewModels/ApplyInStockWindowViewModel.cs b/DM_Weight/ViewModels/ApplyInStockWindowViewModel.cs index 65e6475..b96984f 100644 --- a/DM_Weight/ViewModels/ApplyInStockWindowViewModel.cs +++ b/DM_Weight/ViewModels/ApplyInStockWindowViewModel.cs @@ -736,7 +736,7 @@ namespace DM_Weight.ViewModels { // 更新屏显库存 //List singleChannels = record.FindAll(it => it.BoardType != 1); - List singleChannels = record.Where(it => it.BoardType == 5) + List singleChannels = record.Where(it => it.BoardType.ToString().Contains("5")) .GroupBy(it => new { it.DrawerNo, it.ColNo }) .Select(it => { diff --git a/DM_Weight/ViewModels/BindingChannelDialogViewModel.cs b/DM_Weight/ViewModels/BindingChannelDialogViewModel.cs index 6f06729..ad0cbc3 100644 --- a/DM_Weight/ViewModels/BindingChannelDialogViewModel.cs +++ b/DM_Weight/ViewModels/BindingChannelDialogViewModel.cs @@ -228,7 +228,7 @@ namespace DM_Weight.ViewModels SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.PosNo }).ExecuteCommand(); GetChannelsByDrawerNo(); - if (item.BoardType == 5) + if (item.BoardType.ToString().Contains("5")) { _portUtil.WindowName = "BindingChannelDialog"; // 向显示屏写入库位信息 @@ -283,7 +283,7 @@ namespace DM_Weight.ViewModels item.EffDate = String.Format("{0:yyyy-MM-dd}", DrugManuNo.EffDate); SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand(); - if (item.BoardType == 5) + if (item.BoardType.ToString().Contains("5")) { _portUtil.WindowName = "BindingChannelDialog"; // 向显示屏写入库位信息 @@ -333,7 +333,7 @@ namespace DM_Weight.ViewModels item.EffDate = null; item.DrugInfo = null; SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.ManuNo, it.EffDate }).ExecuteCommand(); - if (item.BoardType == 5) + if (item.BoardType.ToString().Contains("5")) { // 清除显示屏库位信息 _portUtil.ClearContent(item.DrawerNo, item.ColNo); diff --git a/DM_Weight/ViewModels/BindingChannelNewDialogViewModel.cs b/DM_Weight/ViewModels/BindingChannelNewDialogViewModel.cs index 98ede1d..cbf36b1 100644 --- a/DM_Weight/ViewModels/BindingChannelNewDialogViewModel.cs +++ b/DM_Weight/ViewModels/BindingChannelNewDialogViewModel.cs @@ -274,7 +274,7 @@ namespace DM_Weight.ViewModels SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.PosNo,it.DrugSpec }).ExecuteCommand(); GetChannelsByDrawerNo(); - if (item.BoardType == 5) + if (item.BoardType.ToString().Contains("5")) { _portUtil.WindowName = "BindingChannelDialog"; // 向显示屏写入库位信息 @@ -344,7 +344,7 @@ namespace DM_Weight.ViewModels //item.EffDate = String.Format("{0:yyyy-MM-dd}", DrugManuNo.EffDate); SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.PosNo,it.DrugSpec }).ExecuteCommand(); - if (item.BoardType == 5) + if (item.BoardType.ToString().Contains("5")) { _portUtil.WindowName = "BindingChannelDialog"; // 向显示屏写入库位信息 @@ -411,7 +411,7 @@ namespace DM_Weight.ViewModels item.Drug = null; item.DrugSpec = null; SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId,it.DrugSpec }).ExecuteCommand(); - if (item.BoardType == 5) + if (item.BoardType.ToString().Contains("5")) { // 清除显示屏库位信息 _portUtil.ClearContent(item.DrawerNo, item.ColNo); diff --git a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs index 90263bd..ed4b4e1 100644 --- a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs +++ b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs @@ -296,6 +296,15 @@ namespace DM_Weight.ViewModels }); if (f.Data) { + // 更新屏显库存 + List singleChannels = record.FindAll(it => it.BoardType != 1); + if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5")) + { + singleChannels.ForEach(it => + { + _portUtil.WriteQuantity(it.DrawerNo, it.ColNo, it.Quantity - it.TakeQuantity); + }); + } RequestData(); AlertMsg alertMsg = new AlertMsg { diff --git a/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs b/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs index 50b9dee..4d3f779 100644 --- a/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs +++ b/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs @@ -301,6 +301,15 @@ namespace DM_Weight.ViewModels }); if (f.Data) { + // 更新屏显库存 + List singleChannels = record.FindAll(it => it.BoardType != 1); + if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5")) + { + singleChannels.ForEach(it => + { + _portUtil.WriteQuantity(it.DrawerNo, it.ColNo, it.Quantity - it.TakeQuantity); + }); + } RequestData(); AlertMsg alertMsg = new AlertMsg { diff --git a/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs b/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs index 37e6a99..f1f8004 100644 --- a/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs +++ b/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs @@ -371,7 +371,7 @@ namespace DM_Weight.ViewModels { // 更新屏显库存 List singleChannels = record.FindAll(it => it.BoardType != 1); - if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5) + if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5")) { singleChannels.ForEach(it => { diff --git a/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs b/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs index cb0a1be..ae62283 100644 --- a/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs +++ b/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs @@ -435,7 +435,7 @@ namespace DM_Weight.ViewModels { // 更新屏显库存 List singleChannels = record.FindAll(it => it.BoardType != 1); - if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5) + if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5")) { singleChannels.ForEach(it => { diff --git a/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs b/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs index 21e37f0..ddee228 100644 --- a/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs +++ b/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs @@ -429,7 +429,7 @@ namespace DM_Weight.ViewModels { // 更新屏显库存 List singleChannels = record.FindAll(it => it.BoardType != 1); - if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5) + if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5")) { singleChannels.ForEach(it => { diff --git a/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs b/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs index de3da3e..dbe12b0 100644 --- a/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs +++ b/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs @@ -360,7 +360,7 @@ namespace DM_Weight.ViewModels if (f.Data) { // 更新屏显库存 - if (ChannelStock.BoardType == 5) + if (ChannelStock.BoardType.ToString().Contains("5")) { _portUtil.WriteQuantity(ChannelStock.DrawerNo, ChannelStock.ColNo, ChannelStock.Quantity + ReturnQuantity); } diff --git a/DM_Weight/ViewModels/ReturnEmptyDialogViewModel.cs b/DM_Weight/ViewModels/ReturnEmptyDialogViewModel.cs index f1164ae..ce01839 100644 --- a/DM_Weight/ViewModels/ReturnEmptyDialogViewModel.cs +++ b/DM_Weight/ViewModels/ReturnEmptyDialogViewModel.cs @@ -311,7 +311,7 @@ namespace DM_Weight.ViewModels if (f.Data) { // 更新屏显库存 - if (ChannelStock.BoardType == 5) + if (ChannelStock.BoardType.ToString().Contains("5")) { _portUtil.WriteQuantity(ChannelStock.DrawerNo, ChannelStock.ColNo, ChannelStock.Quantity + ReturnQuantity); } diff --git a/DM_Weight/ViewModels/SelfAddDialogViewModel.cs b/DM_Weight/ViewModels/SelfAddDialogViewModel.cs index 7a4770a..95e7c43 100644 --- a/DM_Weight/ViewModels/SelfAddDialogViewModel.cs +++ b/DM_Weight/ViewModels/SelfAddDialogViewModel.cs @@ -363,7 +363,7 @@ namespace DM_Weight.ViewModels { // 更新屏显库存 List singleChannels = record.FindAll(it => it.BoardType != 1); - if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5) + if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5")) { singleChannels.ForEach(it => { diff --git a/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs b/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs index dce4974..59df223 100644 --- a/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs +++ b/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs @@ -337,7 +337,8 @@ namespace DM_Weight.ViewModels { // 更新屏显库存 List singleChannels = record.FindAll(it => it.BoardType != 1); - if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5) + //if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5) + if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5")) { singleChannels.ForEach(it => {