From 702ef1d0ceba5b58d387b69c2d9d0da48d131d85 Mon Sep 17 00:00:00 2001 From: maqiao <625215135@qq.com> Date: Sat, 6 Jul 2024 15:15:44 +0800 Subject: [PATCH] revert 07db386649025560a1c239a900e3dd79080e326f MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit revert 添加35药盒智能标签类型并添加相关类型写标签信息 --- 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, 14 insertions(+), 46 deletions(-) diff --git a/DM_Weight/Converter/BoardTypeConverter.cs b/DM_Weight/Converter/BoardTypeConverter.cs index 92a0c24..54e5382 100644 --- a/DM_Weight/Converter/BoardTypeConverter.cs +++ b/DM_Weight/Converter/BoardTypeConverter.cs @@ -94,19 +94,6 @@ 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 b96984f..65e6475 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.ToString().Contains("5")) + List singleChannels = record.Where(it => it.BoardType == 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 ad0cbc3..6f06729 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.ToString().Contains("5")) + if (item.BoardType == 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.ToString().Contains("5")) + if (item.BoardType == 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.ToString().Contains("5")) + if (item.BoardType == 5) { // 清除显示屏库位信息 _portUtil.ClearContent(item.DrawerNo, item.ColNo); diff --git a/DM_Weight/ViewModels/BindingChannelNewDialogViewModel.cs b/DM_Weight/ViewModels/BindingChannelNewDialogViewModel.cs index cbf36b1..98ede1d 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.ToString().Contains("5")) + if (item.BoardType == 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.ToString().Contains("5")) + if (item.BoardType == 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.ToString().Contains("5")) + if (item.BoardType == 5) { // 清除显示屏库位信息 _portUtil.ClearContent(item.DrawerNo, item.ColNo); diff --git a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs index ed4b4e1..90263bd 100644 --- a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs +++ b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs @@ -296,15 +296,6 @@ 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 4d3f779..50b9dee 100644 --- a/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs +++ b/DM_Weight/ViewModels/DrawerTakeDrugWindowViewModel.cs @@ -301,15 +301,6 @@ 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 f1f8004..37e6a99 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).ToString().Contains("5")) + if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5) { singleChannels.ForEach(it => { diff --git a/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs b/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs index ae62283..cb0a1be 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).ToString().Contains("5")) + if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5) { singleChannels.ForEach(it => { diff --git a/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs b/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs index ddee228..21e37f0 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).ToString().Contains("5")) + if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5) { singleChannels.ForEach(it => { diff --git a/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs b/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs index dbe12b0..de3da3e 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.ToString().Contains("5")) + if (ChannelStock.BoardType == 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 ce01839..f1164ae 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.ToString().Contains("5")) + if (ChannelStock.BoardType == 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 95e7c43..7a4770a 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).ToString().Contains("5")) + if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5) { singleChannels.ForEach(it => { diff --git a/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs b/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs index 59df223..dce4974 100644 --- a/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs +++ b/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs @@ -337,8 +337,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")) + if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5) { singleChannels.ForEach(it => {