From 46f7bf1ee45c97b688a370bbe45d149efb403cc1 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期二, 07 五月 2024 17:26:18 +0800 Subject: [PATCH] 检测上料逻辑修改,无有料货位时写入不允许桁架进入信号 --- 代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" index 6cbb4af..4da1a3d 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" @@ -146,10 +146,10 @@ #region 鐢宠涓婃枡 - if (!Gantry_client.ReadByOrder<bool>("W_RequestUnload", number)) + var Station = stationinfoRepository.Find(x => x.area == area_code(number) && x.enable && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0).OrderBy(x => x.lastUpdateTime).FirstOrDefault(); + if (Station != null) { - var Station = stationinfoRepository.Find(x => x.area == area_code(number) && x.enable && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0).OrderBy(x => x.lastUpdateTime).FirstOrDefault(); - if (Station != null) + if (!Gantry_client.ReadByOrder<bool>("W_RequestUnload", number)) { var SNS = Station.bindSN.Split(","); List<string> list = new List<string>(); @@ -211,6 +211,10 @@ #endregion } } + else + { + Gantry_client.WriteByOrder("W_RequestUnload", false, number); + } #endregion -- Gitblit v1.9.3