From 286db121ac6b7e56b1b579ebcdd191526890f4af Mon Sep 17 00:00:00 2001
From: IPC-610 <IPC-610@DESKTOP-6LEOOS3>
Date: 星期四, 02 一月 2025 13:22:07 +0800
Subject: [PATCH] 修改问题

---
 Wms/Wms/Controllers/DownApiController.cs |   77 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 75 insertions(+), 2 deletions(-)

diff --git a/Wms/Wms/Controllers/DownApiController.cs b/Wms/Wms/Controllers/DownApiController.cs
index 8729e68..09af858 100644
--- a/Wms/Wms/Controllers/DownApiController.cs
+++ b/Wms/Wms/Controllers/DownApiController.cs
@@ -429,7 +429,7 @@
                 var bl = _exNoticeSvc.EmptyException(model);
 
                 LogFile.SaveLogToFile($"绌哄彇寮傚父锛�(鎵ц缁撴灉鎴愬姛),", logStr);
-                return Ok(new { Success = 0, Message = "" });
+                return Ok(new { Success = 0,StatusCode = 0, Message = "" });
             }
             catch (Exception e)
             {
@@ -454,7 +454,7 @@
                 var list = _asnPalletBindSvc.FullException(model);
 
                 LogFile.SaveLogToFile($"婊″叆寮傚父锛�( {JsonConvert.SerializeObject(list)} ),", logStr);
-                return Ok(new { Success = 0, Message = "", TaskList = list });
+                return Ok(new { Success = 0, StatusCode = 0, Message = "", TaskList = list });
             }
             catch (Exception e)
             {
@@ -588,6 +588,78 @@
             }
         }
 
+        /// <summary>
+        /// WCS鐢宠鏄惁缂犺啘
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [AllowAnonymous]
+        [HttpPost]
+        public IActionResult RequestPackWcs(RequesIsBale model)
+        {
+            var logStr = $@".\log\WCS\WCS鐢宠缂犺啘鎷嗚啘" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
+            try
+            {
+               int t = _asnPalletBindSvc.RequestPackWcs(model.PalletNo);
+                LogFile.SaveLogToFile($"WCS鐢宠缂犺啘鍏ュ簱璇锋眰锛岃姹傛墭鐩樺憟锛�( {model.PalletNo} ),", logStr);
+
+                return Ok(new { Success = t, Message = "缂犺啘鎸囦护鍙戦�佹垚鍔�" });
+            }
+            catch (Exception e)
+            {
+                LogFile.SaveLogToFile($"WCS鐢宠缂犺啘鍏ュ簱寮傚父杩斿洖锛�( {e.Message} ),", logStr);
+
+                return Ok(new ErpModel { Success = -1, Message = e.Message });
+            }
+        }
+
+        /// <summary>
+        /// WCS鐢宠鏄惁鎷嗚啘
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [AllowAnonymous]
+        [HttpPost]
+        public IActionResult RequestUnPackWcs(RequesIsBale model)
+        {
+            var logStr = $@".\log\WCS\WCS鐢宠缂犺啘鎷嗚啘" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
+            try
+            {
+                int t = _asnPalletBindSvc.RequestUnPackWcs(model.PalletNo);
+
+                return Ok(new { Success = t, Message = "鎷嗚啘鎸囦护鍙戦�佹垚鍔�" });
+            }
+            catch (Exception e)
+            {
+                LogFile.SaveLogToFile($"WCS鐢宠鎷嗚啘鍑哄簱寮傚父杩斿洖锛�( {e.Message} ),", logStr);
+
+                return Ok(new ErpModel { Success = -1, Message = e.Message });
+            }
+        }
+
+        /// <summary>
+        /// WCS鍙嶉缂犺啘瀹屾垚
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [AllowAnonymous]
+        [HttpPost]
+        public IActionResult RequestPackedWcs(RequesIsBale model)
+        {
+            var logStr = $@".\log\WCS\WCS鐢宠缂犺啘鎷嗚啘" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
+            try
+            {
+                int t = _asnPalletBindSvc.RequestPackedWcs(model.PalletNo);
+
+                return Ok(new { Success = t, Message = "缂犺啘瀹屾垚鎸囦护鍙戦�佹垚鍔�" });
+            }
+            catch (Exception e)
+            {
+                LogFile.SaveLogToFile($"WCS鐢宠缂犺啘瀹屾垚寮傚父杩斿洖锛�( {e.Message} ),", logStr);
+
+                return Ok(new ErpModel { Success = -1, Message = e.Message });
+            }
+        }
 
         ///// <summary>
         ///// 鎴愬搧绠辩爜鎷嗗灈鎷h揣
@@ -652,6 +724,7 @@
                 switch (orderType)
                 {
                     case "0"://鍏ュ簱浠诲姟鎵ц
+
                     case "1"://鍑哄簱浠诲姟鎵ц
                     case "2"://鐩樺簱浠诲姟鎵ц
                     case "3"://绉诲簱浠诲姟鎵ц

--
Gitblit v1.8.0