From 803e01128820d51a9308d72f1c8e746f7f9f322a Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期五, 10 五月 2024 14:10:34 +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