From ddb5c37729faec324c20db3fa453b5abb722013e Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Thu, 29 Dec 2022 14:17:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Myshipping.Application.xml | 67 +++++++++++++++++++ .../BookingPrintTemplateService.cs | 11 ++- .../Dto/BookingPrinttemplateRightDto.cs | 16 +++++ 3 files changed, 92 insertions(+), 2 deletions(-) diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index 6fe003e1..e56efd4f 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -2355,6 +2355,51 @@ 商品名称 + + + EXCEl打印模板 + + + + + 模板名称 + + + + + 分类 + + + + + 订舱状态 + + + + + 父键 + + + + + 字段名称 + + + + + 行 + + + + + 列 + + + + + 默认内容 + + 订舱附件表 @@ -6993,6 +7038,21 @@ 人员id + + + 业务id + + + + + 模板名称 + + + + + 分类 + + EDI扩展 @@ -9336,6 +9396,13 @@ + + + 新增编辑excel模板 + + + + 订舱模板输入参数 diff --git a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs index 1208b9eb..44e7daf4 100644 --- a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs +++ b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs @@ -288,17 +288,24 @@ namespace Myshipping.Application [HttpGet("/BookingPrintTemplate/GetPrinttemplateRightList")] public async Task GetPrinttemplateRightList(long userId) { + var userlist = await _repUser.AsQueryable().Filter(null, true).ToListAsync(); var list = await _repRight.AsQueryable().InnerJoin((d, t) => d.PrintTemplateId == t.Id && t.TenantId == UserManager.TENANT_ID). WhereIF(userId != 0, d => d.SysUserId == userId). - Select((d, t) => new + Select((d, t) => new BookingPrinttemplateDto { + SysUserId=d.SysUserId, TypeCode = t.TypeCode, TypeName = t.TypeName, FilePath = t.FilePath, FileName = t.FileName, TenantName = t.TenantName, - UserName = _repUser.Where(x => x.Id == d.SysUserId).Select(x => x.Name).FirstAsync().Result + UserName ="", }).ToListAsync(); + foreach (var item in list) + { + var username= userlist.Where(x => x.Id == item.SysUserId).Select(x => x.Name).FirstOrDefault(); + item.UserName = username; + } return list; } } diff --git a/Myshipping.Application/Service/BookingPrintTemplate/Dto/BookingPrinttemplateRightDto.cs b/Myshipping.Application/Service/BookingPrintTemplate/Dto/BookingPrinttemplateRightDto.cs index ef442241..c1025e6d 100644 --- a/Myshipping.Application/Service/BookingPrintTemplate/Dto/BookingPrinttemplateRightDto.cs +++ b/Myshipping.Application/Service/BookingPrintTemplate/Dto/BookingPrinttemplateRightDto.cs @@ -16,4 +16,20 @@ namespace Myshipping.Application.Service.BookingPrintTemplate.Dto public List PrintTemplateId { get; set; } } + + + + public class BookingPrinttemplateDto + { + + + public long SysUserId { get; set; } + public string TypeCode { get; set; } + public string TypeName { get; set; } + public string FilePath { get; set; } + public string FileName { get; set; } + public string TenantName { get; set; } + public string UserName { get; set; } + } + }