optimize
wanghaomei 2 years ago
parent 6a322f1ab1
commit b915567238

@ -108,7 +108,7 @@ namespace Myshipping.Application
ILogger<BookingOrderService> logger, ISysCacheService cache, IDjyWebsiteAccountConfigService webAccountConfig, ISysDataUserMenu right, ILogger<BookingOrderService> logger, ISysCacheService cache, IDjyWebsiteAccountConfigService webAccountConfig, ISysDataUserMenu right,
SqlSugarRepository<BookingPrintTemplate> repPrintTemplate, SqlSugarRepository<BookingLetteryard> repLetterYard, SqlSugarRepository<SysUser> repUser, SqlSugarRepository<BookingPrintTemplate> repPrintTemplate, SqlSugarRepository<BookingLetteryard> repLetterYard, SqlSugarRepository<SysUser> repUser,
SqlSugarRepository<BookingOrderUrl> repOrderUrl, SqlSugarRepository<BookingOrderContact> repOrderContact, SqlSugarRepository<BookingSampleBill> repSampleBill, SqlSugarRepository<BookingOrderUrl> repOrderUrl, SqlSugarRepository<BookingOrderContact> repOrderContact, SqlSugarRepository<BookingSampleBill> repSampleBill,
SqlSugarRepository<BookingExcelTemplate> excelrep, SqlSugarRepository<DjyUserMailAccount> repUserMail, SqlSugarRepository<BookingExcelTemplate> excelrep, SqlSugarRepository<DjyUserMailAccount> repUserMail,
SqlSugarRepository<SysTenant> repTenant, SqlSugarRepository<BookingStatus> repBookingStatus, SqlSugarRepository<BookingEDIExt> bookingEDIExt, SqlSugarRepository<SysTenant> repTenant, SqlSugarRepository<BookingStatus> repBookingStatus, SqlSugarRepository<BookingEDIExt> bookingEDIExt,
IHttpContextAccessor httpContextAccessor) IHttpContextAccessor httpContextAccessor)
{ {
@ -1683,6 +1683,8 @@ namespace Myshipping.Application
} }
var fileName = string.Empty; var fileName = string.Empty;
#region FastReport打印
if (printType == BookingPrintTemplateType.FastReport) if (printType == BookingPrintTemplateType.FastReport)
{ {
var bs = await GenPrintFile(bookingId, printTemplate, type); var bs = await GenPrintFile(bookingId, printTemplate, type);
@ -1715,6 +1717,9 @@ namespace Myshipping.Application
var fullPath = Path.Combine(serverpath, fileName); var fullPath = Path.Combine(serverpath, fileName);
await File.WriteAllBytesAsync(fullPath, bs); await File.WriteAllBytesAsync(fullPath, bs);
} }
#endregion
#region Excel模板打印
else if (printType == BookingPrintTemplateType.ExcelTemplate) else if (printType == BookingPrintTemplateType.ExcelTemplate)
{ {
var opt = App.GetOptions<PrintTemplateOptions>(); var opt = App.GetOptions<PrintTemplateOptions>();
@ -1767,6 +1772,8 @@ namespace Myshipping.Application
var filestream = new FileStream(Path.Combine(fileFullPath, fileName), FileMode.OpenOrCreate, FileAccess.ReadWrite); var filestream = new FileStream(Path.Combine(fileFullPath, fileName), FileMode.OpenOrCreate, FileAccess.ReadWrite);
excelwork.Write(filestream); excelwork.Write(filestream);
} }
#endregion
//记录打印次数和时间,用于前端动态展示常用的打印类型 //记录打印次数和时间,用于前端动态展示常用的打印类型
var printRecentListKey = $"{PrintRecentListTypeKey}_{printTemplate.CateCode}_{printType}"; var printRecentListKey = $"{PrintRecentListTypeKey}_{printTemplate.CateCode}_{printType}";

Loading…
Cancel
Save