公共库

optimize
wet 2 years ago
parent 0fb62cad62
commit df5ba79d84

@ -9783,6 +9783,11 @@
分类名称
</summary>
</member>
<member name="P:Myshipping.Application.QueryBookingPrintTemplateInput.Type">
<summary>
类型FastReport、Excel模板等
</summary>
</member>
<member name="T:Myshipping.Application.BookingTemplateService">
<summary>
订舱模板服务

@ -114,10 +114,6 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
var list = await _sysCacheService.GetAllCodeCarrier();
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|| x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase));
if (queryList.Count() > 20)
{
return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList();
}
return queryList.OrderBy(x => x.Sort).ToList();
}
@ -384,12 +380,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
public async Task<dynamic> YardList([FromQuery] NameQueryDto input)
{
List<CodeYard> list = await _sysCacheService.GetAllCodeYard();
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase));
if (queryList.Count() > 20)
{
return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList();
}
return queryList.OrderBy(x => x.Sort).ToList();
}
/// <summary>
@ -722,10 +713,6 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|| x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase));
if (queryList.Count() > 20)
{
return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList();
}
return queryList.OrderBy(x=>x.Sort).ToList();
}
/// <summary>
@ -938,10 +925,6 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|| x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderByDescending(x=>x.CreateTime);
if (queryList.Count() > 20)
{
return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList();
}
return queryList.OrderBy(x => x.Sort).ToList();
}
@ -1169,10 +1152,6 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|| x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase));
if (queryList.Count() > 20)
{
return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList();
}
return queryList.OrderBy(x => x.Sort).ToList();
}

Loading…
Cancel
Save