工单打印

This commit is contained in:
qianhao.xu
2024-12-11 17:24:15 +08:00
parent 7aaf36f1a0
commit 73b6acd375
10 changed files with 302 additions and 112 deletions

View File

@@ -18,6 +18,9 @@ using System;
using DOAN.Infrastructure;
using DOAN.Model.MES.product.Dto;
using Infrastructure.Converter;
using NPOI.HPSF;
using System.IO;
using System.Web;
//创建时间2024-07-16
namespace DOAN.Admin.WebApi.Controllers
@@ -379,5 +382,22 @@ namespace DOAN.Admin.WebApi.Controllers
return SUCCESS(response);
}
//TODO 打印机打印工单
[AllowAnonymous]
[HttpGet("print")]
public IActionResult ExportWorkorderPDF(string[] workorderArray)
{
if(workorderArray==null||workorderArray.Length<1)
{
throw new CustomException("workorderArray");
}
Task<(string, Stream)> conntext = _ProWorkorderService.ExportPDFByQuestPDFDemo(workorderArray);
return File(conntext.Result.Item2, "application/pdf", HttpUtility.UrlEncode(conntext.Result.Item1));
}
}
}