| | |
| | | using MES.Service.service.PLM; |
| | | using ConsoleApp1; |
| | | using MES.Service.service.PLM; |
| | | using MES.Service.util; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System.Dynamic; |
| | | using System.IO; |
| | | |
| | | namespace MESApplication.Controllers.PLM; |
| | | |
| | |
| | | public class PLMController : ControllerBase |
| | | { |
| | | private readonly PLMManager m = new(); |
| | | private readonly WarehouseDownloadDoc wdd = new(); |
| | | |
| | | //RetrieveDrawings 调取图纸 |
| | | [HttpPost("RetrieveDrawings")] |
| | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | //RetrieveDrawings 调取图纸 |
| | | [HttpPost("OpenDrawings")] |
| | | public IActionResult OpenDrawings(string fileId,string fName) |
| | | { |
| | | try |
| | | { |
| | | var resultInfos = wdd.SendRequest("Download", fileId); |
| | | |
| | | return File(resultInfos, "application/octet-stream", fName); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return StatusCode(500, new ResponseResult |
| | | { |
| | | status = 1, |
| | | message = ex.Message, |
| | | data = null |
| | | }); |
| | | } |
| | | } |
| | | } |