|
|
|
@ -2,9 +2,6 @@ |
|
|
|
|
using DinkToPdf.Contracts; |
|
|
|
|
using Microsoft.AspNetCore.Hosting; |
|
|
|
|
using Microsoft.Extensions.Hosting; |
|
|
|
|
using MySqlX.XDevAPI.Common; |
|
|
|
|
using Org.BouncyCastle.Utilities; |
|
|
|
|
using SharpCompress.Common; |
|
|
|
|
using System.IO.Compression; |
|
|
|
|
using static Tiobon.Core.Model.Consts; |
|
|
|
|
|
|
|
|
@ -2385,9 +2382,8 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1"; |
|
|
|
|
string frontUrl = AppSettings.app(["Startup", "FrontUrl"]); |
|
|
|
|
string path = string.Empty; |
|
|
|
|
frontUrl += "/Advanced"; |
|
|
|
|
if (Env.IsDevelopment()) |
|
|
|
|
frontUrl = "http://localhost:9292"; |
|
|
|
|
//} |
|
|
|
|
//if (Env.IsDevelopment()) |
|
|
|
|
// frontUrl = "http://localhost:9292"; |
|
|
|
|
|
|
|
|
|
if (ids.Count == 1) |
|
|
|
|
{ |
|
|
|
@ -2398,7 +2394,7 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1"; |
|
|
|
|
ColorMode = ColorMode.Color, |
|
|
|
|
Orientation = Orientation.Portrait, |
|
|
|
|
PaperSize = PaperKind.A4, |
|
|
|
|
DocumentTitle = "PDF Report", |
|
|
|
|
DocumentTitle = entity.StaffName, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var objectSettings = new ObjectSettings |
|
|
|
@ -2440,13 +2436,13 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1"; |
|
|
|
|
for (int i = 0; i < ids.Count; i++) |
|
|
|
|
{ |
|
|
|
|
var entity = await base.QueryById(ids[i]); |
|
|
|
|
var returnData = await HttpHelper.GetAsync(frontUrl + "/api/Ghrh_ResumeTemplatePreview/" + ids[0]); |
|
|
|
|
var returnData = await HttpHelper.GetAsync(frontUrl + "/api/Ghrh_ResumeTemplatePreview/" + ids[i]); |
|
|
|
|
var globalSettings = new GlobalSettings |
|
|
|
|
{ |
|
|
|
|
ColorMode = ColorMode.Color, |
|
|
|
|
Orientation = Orientation.Portrait, |
|
|
|
|
PaperSize = PaperKind.A4, |
|
|
|
|
DocumentTitle = "PDF Report", |
|
|
|
|
DocumentTitle = entity.StaffName, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var objectSettings = new ObjectSettings |
|
|
|
@ -2463,7 +2459,7 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1"; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var fileBytes = _converter.Convert(pdf); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fileName = pathHeader + entity.StaffName + "_" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".pdf"; |
|
|
|
|
files.Add(_hostingEnvironment.WebRootPath + fileName); |
|
|
|
|
var ms = new MemoryStream(fileBytes); |
|
|
|
|