|
|
@ -434,7 +434,7 @@ namespace Myshipping.Application
|
|
|
|
UserName = "",
|
|
|
|
UserName = "",
|
|
|
|
}).ToListAsync();
|
|
|
|
}).ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var item in list)
|
|
|
|
foreach (var item in list)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var username = userlist.Where(x => x.Id == item.SysUserId).Select(x => x.Name).FirstOrDefault();
|
|
|
|
var username = userlist.Where(x => x.Id == item.SysUserId).Select(x => x.Name).FirstOrDefault();
|
|
|
@ -464,15 +464,16 @@ namespace Myshipping.Application
|
|
|
|
[HttpPost("/BookingTemplate/AddOrUpdateExcelTemplate")]
|
|
|
|
[HttpPost("/BookingTemplate/AddOrUpdateExcelTemplate")]
|
|
|
|
public async Task AddOrUpdateExcelTemplate(BookingExcelTemplateDto dto)
|
|
|
|
public async Task AddOrUpdateExcelTemplate(BookingExcelTemplateDto dto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _excelrep.DeleteAsync(x => x.PId == dto.Pid);
|
|
|
|
await _excelrep.DeleteAsync(x => x.PId == dto.Pid);
|
|
|
|
|
|
|
|
var list = new List<BookingExcelTemplate>();
|
|
|
|
foreach (var item in dto.children)
|
|
|
|
foreach (var item in dto.children)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var entity = item.Adapt<BookingExcelTemplate>();
|
|
|
|
var entity = item.Adapt<BookingExcelTemplate>();
|
|
|
|
entity.PId = dto.Pid;
|
|
|
|
entity.PId = dto.Pid;
|
|
|
|
await _excelrep.InsertAsync(entity);
|
|
|
|
entity.Id = 0;
|
|
|
|
|
|
|
|
list.Add(entity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
await _excelrep.InsertAsync(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 获取excel模板详情
|
|
|
|
/// 获取excel模板详情
|
|
|
@ -482,7 +483,7 @@ namespace Myshipping.Application
|
|
|
|
[HttpGet("/BookingTemplate/BookingExcelTemplateList")]
|
|
|
|
[HttpGet("/BookingTemplate/BookingExcelTemplateList")]
|
|
|
|
public async Task<dynamic> BookingExcelTemplateList(long Id)
|
|
|
|
public async Task<dynamic> BookingExcelTemplateList(long Id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return await _excelrep.AsQueryable().Where(x => x.PId == Id).ToListAsync();
|
|
|
|
return await _excelrep.AsQueryable().Where(x => x.PId == Id).OrderBy(x => x.Id).ToListAsync();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|