diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 61f81bf0..e6a5a565 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -396,7 +396,9 @@ namespace Myshipping.Application } } + var entity = input.Adapt(); + entity.BOOKINGNO = ushort.Parse(App.GetOptions().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); diff --git a/Myshipping.Core/Service/CommomDBPage/CommonDBPageService.cs b/Myshipping.Core/Service/CommomDBPage/CommonDBPageService.cs index b525aef0..2cf6b7b0 100644 --- a/Myshipping.Core/Service/CommomDBPage/CommonDBPageService.cs +++ b/Myshipping.Core/Service/CommomDBPage/CommonDBPageService.cs @@ -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 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 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 }