|
|
|
@ -211,8 +211,12 @@ public class CommonDBPageService : IDynamicApiController, ITransient
|
|
|
|
|
[HttpGet("/commondbpage/portloadlist")]
|
|
|
|
|
public async Task<dynamic> PortloadList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codePortLoadrRep.AsQueryable().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) || x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
return await _codePortLoadrRep.AsQueryable()
|
|
|
|
|
.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)
|
|
|
|
|
|| x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
.OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -225,7 +229,10 @@ public class CommonDBPageService : IDynamicApiController, ITransient
|
|
|
|
|
{
|
|
|
|
|
return await _mappingPortLoadRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.CarrierCode), x => x.CarrierCode == input.CarrierCode)
|
|
|
|
|
.OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -240,7 +247,10 @@ public class CommonDBPageService : IDynamicApiController, ITransient
|
|
|
|
|
public async Task<dynamic> PortList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codePortRep.AsQueryable().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) || x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|| x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
.OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -255,7 +265,10 @@ public class CommonDBPageService : IDynamicApiController, ITransient
|
|
|
|
|
|
|
|
|
|
return await _mappingPortRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.CarrierCode), x => x.CarrierCode == input.CarrierCode)
|
|
|
|
|
.OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -301,8 +314,10 @@ public class CommonDBPageService : IDynamicApiController, ITransient
|
|
|
|
|
[HttpGet("/commondbpage/service")]
|
|
|
|
|
public async Task<dynamic> ServiceList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codeServiceRep.AsQueryable().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)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
return await _codeServiceRep.AsQueryable().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))
|
|
|
|
|
.OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -316,7 +331,10 @@ public class CommonDBPageService : IDynamicApiController, ITransient
|
|
|
|
|
{
|
|
|
|
|
return await _mappingServiceRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.CarrierCode), x => x.CarrierCode == input.CarrierCode)
|
|
|
|
|
.OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -354,7 +372,8 @@ public class CommonDBPageService : IDynamicApiController, ITransient
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.Remark.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.CarrierCode), x => x.CarrierCode == input.CarrierCode)
|
|
|
|
|
|
|
|
|
|
.OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -386,7 +405,10 @@ public class CommonDBPageService : IDynamicApiController, ITransient
|
|
|
|
|
{
|
|
|
|
|
return await _mappingFrtRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.CarrierCode), x => x.CarrierCode == input.CarrierCode)
|
|
|
|
|
.OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -410,8 +432,11 @@ public class CommonDBPageService : IDynamicApiController, ITransient
|
|
|
|
|
[HttpGet("/commondbpage/mappingissuetypelist")]
|
|
|
|
|
public async Task<dynamic> MappingIssueTypeList([FromQuery] MappingQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _mappingIssueTypeRep.AsQueryable().Where(x => x.Module == input.Module).WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
return await _mappingIssueTypeRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.CarrierCode), x => x.CarrierCode == input.CarrierCode)
|
|
|
|
|
.OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.DescSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|