diff --git a/Tiobon.Core.Common/Helper/HttpHelper.cs b/Tiobon.Core.Common/Helper/HttpHelper.cs index 53fc867b..5806a1ef 100644 --- a/Tiobon.Core.Common/Helper/HttpHelper.cs +++ b/Tiobon.Core.Common/Helper/HttpHelper.cs @@ -15,7 +15,7 @@ public class HttpHelper { string result = string.Empty; Uri getUrl = new Uri(serviceAddress); - Httpclient.Timeout = new TimeSpan(0, 0, 60); + //Httpclient.Timeout = new TimeSpan(0, 0, 60); result = await Httpclient.GetAsync(serviceAddress).Result.Content.ReadAsStringAsync(); return result; } diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index 00efb6bb..d1152727 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -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);