diff --git a/WCS.BLL/HardWare/IShelfBase.cs b/WCS.BLL/HardWare/IShelfBase.cs index bd3b7e3..ec061b2 100644 --- a/WCS.BLL/HardWare/IShelfBase.cs +++ b/WCS.BLL/HardWare/IShelfBase.cs @@ -39,6 +39,7 @@ namespace WCS.BLL.HardWare public int LightId { get; set; } public List ModuleIds { get; set; } + public List Modules { get; set; } public string ClientIp { get; set; } /// /// 货架当前模式 diff --git a/WCS.BLL/HardWare/SingleLightShelf.cs b/WCS.BLL/HardWare/SingleLightShelf.cs index 5a68716..f5fc4ca 100644 --- a/WCS.BLL/HardWare/SingleLightShelf.cs +++ b/WCS.BLL/HardWare/SingleLightShelf.cs @@ -26,6 +26,7 @@ namespace WCS.BLL.HardWare public List ExceptionMessages { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } public bool IsWarning { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } public string WebSocketIpAddress { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public List Modules { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } public bool ConfirmStocktakingSingle(int BoardId, int LightNumber) { diff --git a/WCS.BLL/HardWare/SmartShelf.cs b/WCS.BLL/HardWare/SmartShelf.cs index 782a4dd..2d5a694 100644 --- a/WCS.BLL/HardWare/SmartShelf.cs +++ b/WCS.BLL/HardWare/SmartShelf.cs @@ -1370,6 +1370,7 @@ namespace WCS.BLL.HardWare MatSpec = inventoryDetail.MatSpec, MatCustomer = inventoryDetail.MatCustomer, MatSupplier = inventoryDetail.MatSupplier, + OrderNumber = orderMatDetails.OrderNumber, Direction = DirectionEnum.出库, }; diff --git a/WCS.BLL/Manager/WarningManager.cs b/WCS.BLL/Manager/WarningManager.cs index b8fafe7..5e878b2 100644 --- a/WCS.BLL/Manager/WarningManager.cs +++ b/WCS.BLL/Manager/WarningManager.cs @@ -88,7 +88,6 @@ namespace WCS.BLL.Manager //货架是否还存在报警信息 shelfIsWarning = Warnings.Where(t => t.ShelfId == warning.ShelfId) .Any(); - //对应货架如果不存在报警信息了 指示灯回到对应的状态 if (!shelfIsWarning) { diff --git a/WCS.BLL/Services/Service/StockTakingService.cs b/WCS.BLL/Services/Service/StockTakingService.cs index 4d47e00..e5195e3 100644 --- a/WCS.BLL/Services/Service/StockTakingService.cs +++ b/WCS.BLL/Services/Service/StockTakingService.cs @@ -955,6 +955,7 @@ namespace WCS.BLL.Services.Service MatSpec = inventoryDetail.MatSpec, MatCustomer = inventoryDetail.MatCustomer, MatSupplier = inventoryDetail.MatSupplier, + OrderNumber = stockTakingOrderMatDetail.StocktakingOrderNumber, Direction = DirectionEnum.盘点, OperateUser = request.UserName diff --git a/WCS.BLL/Services/Service/StoreInfoService.cs b/WCS.BLL/Services/Service/StoreInfoService.cs index a05038e..8ae2c07 100644 --- a/WCS.BLL/Services/Service/StoreInfoService.cs +++ b/WCS.BLL/Services/Service/StoreInfoService.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; using TouchSocket.Core; using WCS.BLL.Config; using WCS.BLL.DbModels; +using WCS.BLL.HardWare; using WCS.BLL.Manager; using WCS.BLL.Services.IService; using WCS.DAL; @@ -359,6 +360,27 @@ namespace WCS.BLL.Services.Service } DbHelp.db.Updateable(moduleInfo).ExecuteCommand(); DbHelp.db.CommitTran(); + + #region 更新缓存中的禁用/启动状态 + try + { + var shelf = ShelfManager.Shelves.Where(t => t.ShelfId == moduleInfo.ShelfId) + .FirstOrDefault(); + if (shelf != null) + { + + var moduleInPc = shelf.Modules.Where(t => t.ModuleId == moduleInfo.Id) + .First(); + if (moduleInPc != null) + moduleInPc.IsEnable = request.DisableOrEnable == DisableOrEnableEnum.Enable; + } + } + catch + { + + } + #endregion + return new ResponseCommon() { Code = 200, @@ -441,6 +463,14 @@ namespace WCS.BLL.Services.Service //禁用需要删除当前库存数据 if (request.DisableOrEnable == DisableOrEnableEnum.Disable) { + + //盟讯公司发送钉钉消息 + if (LocalFile.Config.IsMx) + { + var DingDing = string.Empty; + MXBackgroundThread.SendDingDingMsg($"【智能货架】库位{storeInfo.StoreCode}被屏蔽", new List { "104379", "103595" }, ref DingDing); + } + //库位 storeInfo.CurrentMatSn = "禁用"; //库存数据处理 diff --git a/货架标准上位机/ViewModels/ModuleInfoViewModel.cs b/货架标准上位机/ViewModels/ModuleInfoViewModel.cs index fa64745..b5fde19 100644 --- a/货架标准上位机/ViewModels/ModuleInfoViewModel.cs +++ b/货架标准上位机/ViewModels/ModuleInfoViewModel.cs @@ -97,9 +97,10 @@ namespace 货架标准上位机.ViewModel var dia = Dialog.Show(new TextDialog()); try { - var body = new GetShelvesRequest() + var body = new GetModulesRequest() { ShelfCode = ShelfCode, + ModuleCode = ModuleCode, UserName = LocalStatic.CurrentUser, DeviceType = LocalFile.Config.DeviceType, PageNumber = CurrentPage, diff --git a/货架标准上位机/Views/MXWindows/MXOutInventoryView.xaml b/货架标准上位机/Views/MXWindows/MXOutInventoryView.xaml index cfc1f84..0c98816 100644 --- a/货架标准上位机/Views/MXWindows/MXOutInventoryView.xaml +++ b/货架标准上位机/Views/MXWindows/MXOutInventoryView.xaml @@ -31,12 +31,12 @@ diff --git a/货架标准上位机/Views/Windows/WarningWindow.xaml.cs b/货架标准上位机/Views/Windows/WarningWindow.xaml.cs index 4b23906..ec56c34 100644 --- a/货架标准上位机/Views/Windows/WarningWindow.xaml.cs +++ b/货架标准上位机/Views/Windows/WarningWindow.xaml.cs @@ -43,16 +43,16 @@ namespace 货架标准上位机 WarningManager.RemoveWarning(warning.Guid); } - /// - /// 显示提示框 - /// - /// 内容 - /// 界面右上角是否显示关闭按钮 - /// 点击的按钮文本 - public static WarningWindow Show(string content, WebSocketMessageModel _warning, bool isVisCloseBut = true, Window owner = null) - { - return Show(content, string.Empty, _warning, isVisCloseBut); - } + ///// + ///// 显示提示框 + ///// + ///// 内容 + ///// 界面右上角是否显示关闭按钮 + ///// 点击的按钮文本 + //public static WarningWindow Show(string content, WebSocketMessageModel _warning, bool isVisCloseBut = true, Window owner = null) + //{ + // return Show(content, string.Empty, _warning, isVisCloseBut); + //} /// /// 显示提示框