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