diff --git a/WCS.BLL/HardWare/SmartShelf.cs b/WCS.BLL/HardWare/SmartShelf.cs index a8d6cca..b2cb037 100644 --- a/WCS.BLL/HardWare/SmartShelf.cs +++ b/WCS.BLL/HardWare/SmartShelf.cs @@ -337,7 +337,7 @@ namespace WCS.BLL.HardWare if (module.CurrentOutSns == null || module.CurrentOutSns.Count == 0) { Logs.Write($"GoInOutstoreByModule货架【{ShelfCode}】,模组【{module.ModuleCode}】,不存在需要继续出的物料,给其复位。", LogsType.Outstore); - + //不需要这个模组继续亮灯了 module.GoOutOutStoreMode(TcpCleint); Thread.Sleep(400); @@ -1698,10 +1698,51 @@ namespace WCS.BLL.HardWare //当前库位未记录MatSn if (string.IsNullOrEmpty(storeInfo.CurrentMatSn)) { - //该库位是需要出库的库位,物料被多次取出or给了多个正常出库信号 - Logs.Write($"该库位是需要出库的库位,物料被反复取出or给了多个正常出库信号,库位{storeInfo.StoreCode}", LogsType.Outstore); - //暂不进行处理 - return; + if (data[TcpCleint.PreFixLength + 6] == 0x0D && + data[TcpCleint.PreFixLength + 7] == 0x0D && + data[TcpCleint.PreFixLength + 8] == 0x0D && + data[TcpCleint.PreFixLength + 9] == 0x0D) + { + Task.Run(() => + { + var historyVoltage = new StoreInfoHistoryVoltage() + { + StoreId = storeInfo.Id, + StoreCode = storeInfo.StoreCode, + ShelfTypeId = storeInfo.ShelfTypeId, + ModuleId = storeInfo.ModuleId, + ModuleCode = storeInfo.ModuleCode, + ShelfId = storeInfo.ShelfId, + ShelfCode = storeInfo.ShelfCode, + BoardId = storeInfo.BoardId, + LightNumber = storeInfo.LightNumber, + Priority = storeInfo.Priority, + CurrentMatSn = storeInfo.CurrentMatSn, + CurrentVoltage = storeInfo.CurrentVoltage, + StandardVoltage = storeInfo.StandardVoltage, + OffsetVoltage = storeInfo.OffsetVoltage, + BigShelfCode = storeInfo.BigShelfCode, + R = storeInfo.R, + C = storeInfo.C, + Wei = storeInfo.Wei, + GroupName = "出库自动标定记录历史电压", + CreateTime = DateTime.Now, + }; + //自动保存最新的电压值 + storeInfo.CurrentVoltage = (data[TcpCleint.PreFixLength + 4] << 8) + data[TcpCleint.PreFixLength + 5]; + DbHelp.db.Insertable(historyVoltage).ExecuteCommand(); + DbHelp.db.Updateable(storeInfo).ExecuteCommand(); + }); + Thread.Sleep(10); + return; + } + else + { + //该库位是需要出库的库位,物料被多次取出or给了多个正常出库信号 + Logs.Write($"该库位是需要出库的库位,物料被反复取出or给了多个正常出库信号,库位{storeInfo.StoreCode}", LogsType.Outstore); + //暂不进行处理 + return; + } } //不是本次出库需要出的物料 diff --git a/版本履历表.xlsx b/版本履历表.xlsx index ade6752..1335ca9 100644 Binary files a/版本履历表.xlsx and b/版本履历表.xlsx differ diff --git a/货架标准上位机/货架标准上位机.csproj b/货架标准上位机/货架标准上位机.csproj index 78d36b8..066ff3c 100644 --- a/货架标准上位机/货架标准上位机.csproj +++ b/货架标准上位机/货架标准上位机.csproj @@ -8,8 +8,8 @@ latest 重庆盟讯电子科技有限公司 Copyright © 2024 - 1.0.2 - 1.0.2 + 1.0.3 + 1.0.3 Resources\Logo.ico 重庆盟讯电子科技有限公司 智能仓储WCS管理系统