From fee025c0d4fb4fd41d9dbf81b6435fd8e6229d5c Mon Sep 17 00:00:00 2001
From: cjs <2216046164@qq.com>
Date: 星期一, 16 六月 2025 17:33:05 +0800
Subject: [PATCH] 11111

---
 ams/Hanhe.iWCS.JingmenGEMTwoProtocol/ApiHelper.cs |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/ams/Hanhe.iWCS.JingmenGEMTwoProtocol/ApiHelper.cs b/ams/Hanhe.iWCS.JingmenGEMTwoProtocol/ApiHelper.cs
index 9080940..86dda83 100644
--- a/ams/Hanhe.iWCS.JingmenGEMTwoProtocol/ApiHelper.cs
+++ b/ams/Hanhe.iWCS.JingmenGEMTwoProtocol/ApiHelper.cs
@@ -588,6 +588,37 @@
             return result;
         }
 
+        /// <summary>
+        /// 鐢甸挻杞﹂棿鍖呰涓嬬嚎鑾峰彇wms浼犲叆鐨勬墭鐩�+        /// </summary>
+        /// <param name="trayCode"></param>
+        /// <returns></returns>
+        /// <exception cref="NotImplementedException"></exception>
+        internal static SimpleResult DGPackingLineFull(string trayCode)
+        {
+            SimpleResult result = new SimpleResult() { success = false,errCode = -1 };
+
+            if (!string.IsNullOrEmpty(trayCode)){
+                var DGInfo = MongoDBSingleton.Instance.FindOne<DGPackingLineFullModel>(Query.EQ("trayCode", trayCode), "DGPackingLineFullModel");
+                if (DGInfo == null)
+                {
+                    MongoDBSingleton.Instance.Insert<DGPackingLineFullModel>(new DGPackingLineFullModel() { trayCode = trayCode, createTime = DateTime.Now }, "DGPackingLineFullModel");
+                    result.success = true;
+                    result.errCode = 0;
+                }
+                else
+                {
+                    result.errMsg = $"褰撳墠鎵樼洏鍙凤紝宸插瓨鍦ㄤ簬ams涓棿琛ㄤ腑锛屾墭鐩樺彿锛歿trayCode}";
+                }
+            }
+            else
+            {
+                result.errMsg = $"褰撳墠鎵樼洏鍙蜂负绌�;
+            }
+            
+            return result;
+        }
+
         public class mesInfo
         {
             public int code { get; set; }
@@ -728,6 +759,13 @@
             public int haveItem { get; set; }
         }
 
+        public class DGPackingLineFullModel
+        {
+            public ObjectId _id { get; set; }
+            public string trayCode { get; set; }
+            public DateTime createTime { get; set; }
+        }
+
         public class secondResultCache
         {
             /// <summary>

--
Gitblit v1.9.1