From c97f5e8db6360135d481e933fdac5d3682057adc Mon Sep 17 00:00:00 2001
From: czw <selecti@yeah.net>
Date: 星期二, 22 七月 2025 18:00:05 +0800
Subject: [PATCH] 1

---
 HH.WCS.QingXiNongfu/wms/TaskHelper.cs |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/HH.WCS.QingXiNongfu/wms/TaskHelper.cs b/HH.WCS.QingXiNongfu/wms/TaskHelper.cs
index cae6c27..c9acc35 100644
--- a/HH.WCS.QingXiNongfu/wms/TaskHelper.cs
+++ b/HH.WCS.QingXiNongfu/wms/TaskHelper.cs
@@ -18,13 +18,24 @@
             var date = DateTime.Now.ToString("yyMMdd");
             return $"TN{date}{id.ToString().PadLeft(4, '0')}";
         }
-        internal static bool UpdateStatus(WMSTask task, string status)
+        internal static bool UpdateStatus(WMSTask task, string status, CntrItemRel CntItem = null)
         {
             var res = false;
             var db = new SqlHelper<WMSTask>().GetInstance();
-            task.S_B_STATE = status;
-            db.Updateable(task).UpdateColumns(it => new { it.S_B_STATE }).ExecuteCommand();
-            return res;
+            if (CntItem != null)
+            {
+                task.S_ITEM_NAME = CntItem?.S_ITEM_NAME;
+                task.S_ITEM_CODE = CntItem?.S_ITEM_CODE;
+                task.S_B_STATE = status;
+                db.Updateable(task).UpdateColumns(it => new { it.S_B_STATE, it.S_ITEM_NAME, it.S_ITEM_CODE }).ExecuteCommand();
+                return res;
+            }
+            else
+            {
+                task.S_B_STATE = status;
+                db.Updateable(task).UpdateColumns(it => new { it.S_B_STATE }).ExecuteCommand();
+                return res;
+            }
         }
         internal static bool UpdateInfo(WMSTask task, string sourceNo, string endBit, string status)
         {
@@ -106,7 +117,7 @@
             else if (endLoc.S_AREA_CODE == "YWLWJJB")
             {
                 //鏌ヨ浠诲姟琛� 瑕佹眰鏄彧鑳界敓鎴愪袱涓换鍔�璧风偣搴撳尯涓篩WLWJJB  hh_plg  2025骞�鏈�鏃�
-                List<string> TaskState = new List<string>() { "瀹屾垚", "鍙栨秷" };
+                List<string> TaskState = new List<string>() { "瀹屾垚", "鍙栨秷", "鎺ㄩ�寮傚父" };
                 var TaskListNum = LocationHelper.GetList<WMSTask>(x => x.S_END_LAREA == "YWLWJJB" && !TaskState.Contains(x.S_B_STATE));
                 if (TaskListNum.Count() >= 2)
                 {

--
Gitblit v1.9.1