From ea4002e9f17e4659cf1905250780f5e0a5b17473 Mon Sep 17 00:00:00 2001
From: hao <1836460075@qq.com>
Date: 星期四, 19 六月 2025 16:37:56 +0800
Subject: [PATCH] 1
---
StandardInterface/MESApplication/Controllers/PLM/PLMController.cs | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/StandardInterface/MESApplication/Controllers/PLM/PLMController.cs b/StandardInterface/MESApplication/Controllers/PLM/PLMController.cs
index 902e37a..ea5a72b 100644
--- a/StandardInterface/MESApplication/Controllers/PLM/PLMController.cs
+++ b/StandardInterface/MESApplication/Controllers/PLM/PLMController.cs
@@ -4,6 +4,7 @@
using Microsoft.AspNetCore.Mvc;
using System.Dynamic;
using System.IO;
+using System.Net.Http.Headers;
namespace MESApplication.Controllers.PLM;
@@ -122,4 +123,33 @@
});
}
}
+
+ //MP-O鍨嬪湀-83070100066鏍峰搧1-83070100068鏍峰搧2.pdf
+ //e18f53b6-6615-8140-11ee-423d1dd32487
+ //RetrieveDrawings 璋冨彇鍥剧焊 get鏂瑰紡
+ [HttpGet("OpenDrawingsGet")]
+ public IActionResult OpenDrawingsGet(string fileId, string fName)
+ {
+ try
+ {
+ var resultInfos = wdd.SendRequest("Download", fileId);
+
+ // 娣诲姞Content-Disposition鍝嶅簲澶�
+ var cd = new ContentDispositionHeaderValue("attachment");
+ cd.FileNameStar = fName; // 鑷姩澶勭悊缂栫爜
+ Response.Headers.Add("Content-Disposition", cd.ToString());
+
+ return File(resultInfos, "application/octet-stream", fName);
+ }
+ catch (Exception ex)
+ {
+ return StatusCode(500, new ResponseResult
+ {
+ status = 1,
+ message = ex.Message,
+ data = null
+ });
+ }
+ }
+
}
--
Gitblit v1.9.3