From 0caa59dda5ede8b93c4fd47f095bbf716f57383b Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期四, 13 十一月 2025 11:03:19 +0800
Subject: [PATCH] 开发LIMS质量结果下发接口

---
 Wms/Wms/Controllers/DownApiController.cs |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/Wms/Wms/Controllers/DownApiController.cs b/Wms/Wms/Controllers/DownApiController.cs
index b11c7f2..bafc2ce 100644
--- a/Wms/Wms/Controllers/DownApiController.cs
+++ b/Wms/Wms/Controllers/DownApiController.cs
@@ -818,7 +818,7 @@
                 }
                 _rcsserver.CleanPallet(pallmsg, _config.AgvHost + _config.GenAgvSchedulingTask);
                 result.Success = 0;
-                result.Message = "鍙《鎴愬姛锛�";
+                result.Message = "鎿嶄綔鎴愬姛锛�";
                 return Ok(result);
             }
             catch (Exception e)
@@ -828,6 +828,33 @@
                 return Ok(result);
             }
         }
+        /// <summary>
+        /// LIMS璐ㄩ噺缁撴灉涓嬪彂
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult QualityResult(QualityResultVm model)
+        {
+            var logStr = $@".\log\LIMS\LIMS璐ㄩ噺缁撴灉涓嬪彂" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
+            ErpModel result = new ErpModel { Success = -1, Message = "" };
+            try
+            {
+                var jsonData = JsonConvert.SerializeObject(model);
+                LogFile.SaveLogToFile($"LIMS璐ㄩ噺缁撴灉涓嬪彂-璇锋眰鎶ユ枃锛�( {jsonData} ),", logStr);
+
+                _rcsserver.QualityResult(model);
+                result.Success = 0;
+                result.Message = "鎿嶄綔鎴愬姛锛�";
+                return Ok(result);
+            }
+            catch (Exception e)
+            {
+                LogFile.SaveLogToFile($"LIMS璐ㄩ噺缁撴灉涓嬪彂寮傚父锛�( {e.Message} ),", logStr);
+                result.Message = e.Message;
+                return Ok(result);
+            }
+        }
 
         /// <summary>
         /// 鍏ュ簱鍗曟嵁涓嬪彂

--
Gitblit v1.8.0