|
|
|
@ -22,6 +22,7 @@ using System.Collections.Generic;
|
|
|
|
|
using Myshipping.Application.Service.BookingPrintTemplate.Dto;
|
|
|
|
|
using Myshipping.Core.Entity;
|
|
|
|
|
using Myshipping.Application.Service.BookingTemplate.Dto;
|
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
|
|
|
|
|
namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
@ -75,9 +76,9 @@ namespace Myshipping.Application
|
|
|
|
|
[HttpGet("/BookingPrintTemplate/GetPrintTemplateList")]
|
|
|
|
|
public async Task<dynamic> GetPrintTemplateList(string KeyWord)
|
|
|
|
|
{
|
|
|
|
|
return await _rep.AsQueryable().Where(x => x.TenantId == UserManager.TENANT_ID).WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.FileName.StartsWith(KeyWord))
|
|
|
|
|
.ToListAsync();
|
|
|
|
|
|
|
|
|
|
return await _rep.AsQueryable().Where(x => x.TenantId == UserManager.TENANT_ID).WhereIF(!string.IsNullOrWhiteSpace(KeyWord), x => x.FileName.StartsWith(KeyWord))
|
|
|
|
|
.ToListAsync();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -328,7 +329,7 @@ namespace Myshipping.Application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/BookingPrintTemplate/download")]
|
|
|
|
|
[HttpGet("/BookingPrintTemplate/download"), AllowAnonymous]
|
|
|
|
|
public async Task<IActionResult> Download(long id)
|
|
|
|
|
{
|
|
|
|
|
var printFile = await _rep.FirstOrDefaultAsync(u => u.Id == id);
|
|
|
|
@ -388,7 +389,7 @@ namespace Myshipping.Application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/BookingPrintTemplate/GetPrinttemplateRightList")]
|
|
|
|
|
public async Task<dynamic> GetPrinttemplateRightList(long userId,string cateCode,string type)
|
|
|
|
|
public async Task<dynamic> GetPrinttemplateRightList(long userId, string cateCode, string type)
|
|
|
|
|
{
|
|
|
|
|
var userlist = await _repUser.AsQueryable().Filter(null, true).ToListAsync();
|
|
|
|
|
var list = await _repRight.AsQueryable().InnerJoin<BookingPrintTemplate>((d, t) => d.PrintTemplateId == t.Id && t.TenantId == UserManager.TENANT_ID).
|
|
|
|
|