From 5b909ae151855d0fc04cd1215a48ba1c9251dc11 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 14 五月 2024 08:16:17 +0800
Subject: [PATCH] 优化入库逻辑
---
代码管理/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