bookingno

optimize
wet 2 years ago
parent cf068f8da5
commit 42a697a037

@ -396,7 +396,9 @@ namespace Myshipping.Application
}
}
var entity = input.Adapt<BookingOrder>();
entity.BOOKINGNO = ushort.Parse(App.GetOptions<SnowIdOptions>().WorkerId).ToString();
//entity.TOTALNO = NumberToUpper.ToUpper(entity.PKGS == null ? 0 : entity.PKGS);
await _rep.InsertAsync(entity);
if (input.ctnInputs != null)
@ -526,6 +528,7 @@ namespace Myshipping.Application
it.CreatedUserName,
it.TenantName,
it.IsDeleted,
it.BOOKINGNO
}).ExecuteCommandAsync();
var ctnlist = await _repCtn.AsQueryable().Where(x => x.BILLID == input.Id).Select(x => x.Id).ToListAsync();
await _repCtn.DeleteAsync(x => x.BILLID == input.Id);

@ -413,9 +413,38 @@ public class CommonDBPageService : IDynamicApiController, ITransient
return await _commonModuleRep.AsQueryable().Select(x => new { x.Code, x.Name, x.Sort }).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
}
#endregion
#region 航线信息
[HttpGet("/commondbpage/CodeLaneList")]
public async Task<dynamic> CodeLaneList([FromQuery] NameQueryDto input)
{
return await _codeLaneRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord),
x => (!string.IsNullOrWhiteSpace(x.Code) && x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|| (!string.IsNullOrWhiteSpace(x.EnName) && x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|| (!string.IsNullOrWhiteSpace(x.CnName) && x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|| (!string.IsNullOrWhiteSpace(x.LaneType) && x.LaneType.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
}
#endregion
#region 查询国家
[HttpGet("/commondbpage/CodeCountryList")]
public async Task<dynamic> CodeCountryList([FromQuery] NameQueryDto input)
{
return await _codeCountryRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord),
x => (!string.IsNullOrWhiteSpace(x.Code) && x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|| (!string.IsNullOrWhiteSpace(x.EnName) && x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|| (!string.IsNullOrWhiteSpace(x.CnName) && x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|| (!string.IsNullOrWhiteSpace(x.Capital) && x.Capital.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|| (!string.IsNullOrWhiteSpace(x.Continent) && x.Continent.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
}
#endregion
}

Loading…
Cancel
Save