From dabfdd9dbf0364b1134daaad86af7e13f6437295 Mon Sep 17 00:00:00 2001
From: xwt <2740516069@qq.com>
Date: 星期四, 30 十月 2025 12:40:30 +0800
Subject: [PATCH] XJ,SJ,RKJ检验项目序号,LLJ单个检验项目FTP附件信息

---
 StandardInterface/MESApplication/Controllers/QC/LljController.cs |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/StandardInterface/MESApplication/Controllers/QC/LljController.cs b/StandardInterface/MESApplication/Controllers/QC/LljController.cs
index eb626a0..6c6bea7 100644
--- a/StandardInterface/MESApplication/Controllers/QC/LljController.cs
+++ b/StandardInterface/MESApplication/Controllers/QC/LljController.cs
@@ -366,10 +366,21 @@
     public ResponseResult GetAttachments([FromBody] JObject data)
     {
         var itemNo = data["itemNo"]?.ToString();
+        var fversion = data["fversion"]?.ToString();
+        var fromPage = data["fromPage"]?.ToString();
+        
+        // 鏍规嵁鏉ユ簮椤甸潰鍐冲畾鏄惁杩囨护
+        string filterFversion = null;
+        if (fromPage == "Detail" && !string.IsNullOrEmpty(fversion))
+        {
+            filterFversion = fversion;  // Detail椤甸潰闇�瑕佽繃婊�
+        }
+        // Add椤甸潰涓嶄紶閫抐ilterFversion锛屾樉绀烘墍鏈夐檮浠�
+        
         try
         {
             dynamic resultInfos = new System.Dynamic.ExpandoObject();
-            var tbBillList = new LljService().GetAttachments(itemNo);
+            var tbBillList = new LljService().GetAttachments(itemNo, filterFversion);
             if (tbBillList == null || tbBillList.Count == 0)
             {
                 return new ResponseResult
@@ -394,7 +405,7 @@
     }
 
     [HttpGet("PreviewFtpFile")]
-    public IActionResult PreviewFtpFile([FromQuery] string itemNo, [FromQuery] string fileName, [FromQuery] string ftpServer)
+    public IActionResult PreviewFtpFile([FromQuery] string itemNo, [FromQuery] string fileName, [FromQuery] string ftpServer, [FromQuery] string fversion = null)
     {
         try
         {
@@ -405,7 +416,7 @@
             Response.Headers.Add("Access-Control-Expose-Headers", "Content-Type, Content-Length");
             
             var service = new LljService();
-            var fileBytes = service.GetFtpFile(itemNo, fileName, ftpServer);
+            var fileBytes = service.GetFtpFile(itemNo, fileName, ftpServer, fversion);
             
             if (fileBytes == null || fileBytes.Length == 0)
             {
@@ -424,7 +435,7 @@
     }
 
     [HttpGet("DownloadFtpFile")]
-    public IActionResult DownloadFtpFile([FromQuery] string itemNo, [FromQuery] string fileName, [FromQuery] string ftpServer)
+    public IActionResult DownloadFtpFile([FromQuery] string itemNo, [FromQuery] string fileName, [FromQuery] string ftpServer, [FromQuery] string fversion = null)
     {
         try
         {
@@ -435,7 +446,7 @@
             Response.Headers.Add("Access-Control-Expose-Headers", "Content-Disposition, Content-Length, Content-Type");
             
             var service = new LljService();
-            var fileBytes = service.GetFtpFile(itemNo, fileName, ftpServer);
+            var fileBytes = service.GetFtpFile(itemNo, fileName, ftpServer, fversion);
             
             if (fileBytes == null || fileBytes.Length == 0)
             {

--
Gitblit v1.9.3