From cfea43fe783cdb99faa14f59845e41cfcda7d974 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 16 五月 2024 17:22:48 +0800
Subject: [PATCH] AGV任务删除功能,取空托任务逻辑优化,检测上料任务下发逻辑优化(AGV备料两个)

---
 代码管理/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/GetStation/EmptyPalletStation.cs |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/GetStation/EmptyPalletStation.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/GetStation/EmptyPalletStation.cs"
index 1af8221..e1bb7ba 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/GetStation/EmptyPalletStation.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/GetStation/EmptyPalletStation.cs"
@@ -19,7 +19,52 @@
     public class GetStation
     {
         /// <summary>
+        /// 褰撳墠搴撲綅鍚屼竴琛屾槸鍚﹀瓨鍦ㄥ叆搴撳崰鐢�
+        /// true锛氭槸 false锛氬惁
+        /// </summary>
+        /// <param name="StationCode"></param>
+        /// <returns></returns>
+        public static bool InBusyStation(string StationCode)
+        {
+            bool OK = false;
+            try
+            {
+                VOLContext Context = new VOLContext();
+                Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(Context);
+                var station = stationinfoRepository.Find(x => x.stationCode == StationCode).FirstOrDefault();
+                OK = stationinfoRepository.Find(x => x.area == station.area && x.line == station.line && x.location_state == LocationStateEnum.InBusy.ToString()).Any();
+            }
+            catch (Exception ex)
+            {
+
+            }
+            return OK;
+        }
+        /// <summary>
+        /// 褰撳墠搴撲綅鍚屼竴琛屾槸鍚﹀瓨鍦ㄥ嚭搴撳崰鐢�
+        /// true锛氭槸 false锛氬惁
+        /// </summary>
+        /// <param name="StationCode"></param>
+        /// <returns></returns>
+        public static bool OutBusyStation(string StationCode)
+        {
+            bool OK = false;
+            try
+            {
+                VOLContext Context = new VOLContext();
+                Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(Context);
+                var station = stationinfoRepository.Find(x => x.stationCode == StationCode).FirstOrDefault();
+                OK = stationinfoRepository.Find(x => x.area == station.area && x.line == station.line && x.location_state == LocationStateEnum.OutBusy.ToString()).Any();
+            }
+            catch (Exception ex)
+            {
+
+            }
+            return OK;
+        }
+        /// <summary>
         /// 褰撳墠搴撲綅澶栬竟鐨勮揣浣嶆槸鍚﹂兘涓虹┖
+        /// true锛氬惁 false锛氭槸
         /// </summary>
         /// <param name="StationCode"></param>
         /// <returns></returns>

--
Gitblit v1.9.3