|
|
@ -1671,11 +1671,12 @@ namespace Myshipping.Application
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="bookingId">订舱Id</param>
|
|
|
|
/// <param name="bookingId">订舱Id</param>
|
|
|
|
/// <param name="templateId">打印模板ID</param>
|
|
|
|
/// <param name="templateId">打印模板ID</param>
|
|
|
|
|
|
|
|
/// <param name="cateCode">分类代码(使用字典【booking_template_category】中的代码)</param>
|
|
|
|
/// <param name="type">类型,1:pdf、2:xlsx、3:docx</param>
|
|
|
|
/// <param name="type">类型,1:pdf、2:xlsx、3:docx</param>
|
|
|
|
/// <param name="printType">打印类型,10:FastReport、20:Excel模板</param>
|
|
|
|
/// <param name="printType">打印类型,10:FastReport、20:Excel模板</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet("/BookingOrder/PrintOrder")]
|
|
|
|
[HttpGet("/BookingOrder/PrintOrder")]
|
|
|
|
public async Task<string> PrintOrder(long bookingId, long templateId, int type = 1, BookingPrintTemplateType printType = BookingPrintTemplateType.FastReport)
|
|
|
|
public async Task<string> PrintOrder(long bookingId, long templateId, string cateCode, int type = 1, BookingPrintTemplateType printType = BookingPrintTemplateType.FastReport)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var printTemplate = await _repPrintTemplate.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == templateId);
|
|
|
|
var printTemplate = await _repPrintTemplate.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == templateId);
|
|
|
|
if (printTemplate == null)
|
|
|
|
if (printTemplate == null)
|
|
|
@ -1777,7 +1778,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//记录打印次数和时间,用于前端动态展示常用的打印类型
|
|
|
|
//记录打印次数和时间,用于前端动态展示常用的打印类型
|
|
|
|
var printRecentListKey = $"{PrintRecentListTypeKey}_{printTemplate.CateCode}_{printType}";
|
|
|
|
var printRecentListKey = $"{PrintRecentListTypeKey}_{cateCode}_{printType}";
|
|
|
|
var usrCfg = _repUserConfig.AsQueryable().First(x => x.CreatedUserId == UserManager.UserId && x.Type == printRecentListKey);
|
|
|
|
var usrCfg = _repUserConfig.AsQueryable().First(x => x.CreatedUserId == UserManager.UserId && x.Type == printRecentListKey);
|
|
|
|
if (usrCfg == null)
|
|
|
|
if (usrCfg == null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|