From c6342a8eb6d2c40e9a21deab63b5babb3def3025 Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期日, 13 四月 2025 17:14:50 +0800
Subject: [PATCH] 物料扩展表增加字段 上架需要按物料的默认储位进行限制,不允许上架到其他储位 没有默认储位则不限制,需要记录并调用接口反写到U9

---
 Tiger.Business.WMS/Common/WmsTask.cs |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/Tiger.Business.WMS/Common/WmsTask.cs b/Tiger.Business.WMS/Common/WmsTask.cs
index 852a03c..ea0da0c 100644
--- a/Tiger.Business.WMS/Common/WmsTask.cs
+++ b/Tiger.Business.WMS/Common/WmsTask.cs
@@ -8,6 +8,7 @@
 using Tiger.IBusiness;
 using Tiger.Model;
 using Tiger.Model.Entitys.MES.Position;
+using Tiger.Model.Entitys.MES.U9C;
 using static IronPython.Modules._ast;
 
 namespace Tiger.Business.WMS.Transaction
@@ -793,6 +794,33 @@
             action.Data.MqttMsg = msg;
             return action;
         }
+
+        /// <summary>
+        /// 璁剧疆褰撳墠鐗╂枡鐨勯粯璁ゅ偍浣�
+        /// </summary>
+        public ApiAction<ScanOutput> SetDefaultLocation(DbClient db, BAS_ITEM Item, WMS_LOCATION location)
+        {
+            var action = new ApiAction<ScanOutput>(new ScanOutput());
+
+            //璋冪敤璁剧疆榛樿鍌ㄤ綅鎺ュ彛
+            //var iInput = new CreateRcvLineLocationInput
+            //{
+
+            //};
+            //var result = await DI.Resolve<IWMS_U9C>().CreateRcvLineLocation(iInput);
+            //if (!result.IsSuccessed)
+            //{
+            //    action.IsSuccessed = false;
+            //    action.LocaleMsg = result.LocaleMsg;
+            //}
+            //else
+            {
+                Item.DEFAULT_LOCATION = location.LOCATION_CODE;
+                db.Updateable(Item, UserCode).UpdateColumns(q => new { q.DEFAULT_LOCATION, q.UPDATE_TIME, q.UPDATE_USER }).ExecuteCommand();
+            }
+
+            return action;
+        }
         #endregion Functions
 
         /// <summary>

--
Gitblit v1.9.3