From 77b654d928c34d32462e212a4ec212f7cc48b50f Mon Sep 17 00:00:00 2001
From: 杨张扬 <634643841@qq.com>
Date: 星期三, 16 七月 2025 17:35:49 +0800
Subject: [PATCH] 库存信息添加起点货位信息

---
 wms/SpecHelper.cs |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/wms/SpecHelper.cs b/wms/SpecHelper.cs
index afce956..6658c78 100644
--- a/wms/SpecHelper.cs
+++ b/wms/SpecHelper.cs
@@ -280,14 +280,18 @@
         }
 
         /// <summary>
-        /// 閲嶇疆缁堢偣璐т綅锛屽彧閽堝鍘荤嚎杈圭殑璐у搧
+        /// 閲嶇疆缁堢偣璐т綅锛屽彧閽堝鍘荤嚎杈圭殑璐у搧鍜屽幓鍘熸潗鏂欎骇绾跨殑绌烘墭
         /// </summary>
         /// <param name="tN_Task"></param>
         internal static void RestEndLoc(TN_Task tN_Task)
         {
             try
             {
-                if (tN_Task.S_END_AREA == Settings.Areas[2] || tN_Task.S_TYPE.Contains("婊℃墭鍑哄簱涓婄嚎"))
+                if (
+                    tN_Task.S_END_AREA == Settings.Areas[2] || tN_Task.S_TYPE.Contains("婊℃墭鍑哄簱涓婄嚎") ||
+                    Settings.ProductionLines.Select(a=>a.PointIn).ToList().Contains(tN_Task.S_END_LOC) ||
+                    tN_Task.S_TYPE.Contains("绾胯竟绌烘墭涓婄嚎")
+                    )
                 {
                     var db = new SqlHelper<object>().GetInstance();
 
@@ -405,13 +409,8 @@
 
                 if (model != null)
                 {
-                    var target = db.Queryable<TN_InventoryM>().First(o => o.RFID == model.RFID);
-                    if (target != null)
-                    {
-                        db.Deleteable<TN_InventoryM>(target).ExecuteCommand();
-                    }
                     model.EXPIRATION = System.DateTime.Now.AddHours(GetExportTime(model.SPEC));
-                    if (db.Insertable<TN_InventoryM>(model).ExecuteCommand() > 0)
+                    if (db.Storageable<TN_InventoryM>(model).ExecuteCommand() > 0)
                     {
                         LogHelper.Info($"鎻掑叆WMS搴撳瓨鏄庣粏鎴愬姛锛寋log}");
                     }

--
Gitblit v1.9.1