客户订舱

master
wanghaomei 5 months ago
parent a88143e471
commit 84e035522c

@ -2805,7 +2805,11 @@ namespace Myshipping.Application
jobjExt = JObject.Parse(custOrder.ExtendData);
}
jobjExt["shipInfo"] = JObject.Parse(input.ShipInfoJson);
if (custOrder.CARRIERID == "EMC")
{
jobjExt["shipInfo"] = JObject.Parse(input.ShipInfoJson);
}
custOrder.ExtendData = jobjExt.ToString();
//赋值根据唯一代码匹配后的代码、名称等信息

@ -176,49 +176,5 @@ namespace Myshipping.Application
}
/// <summary>
/// cma bc 对比方法
/// </summary>
/// <returns></returns>
public async Task<bool> CMABCContrast(RecursiveMethodModel model)
{
//待对比字段
//BookingAutoContrast ac = new BookingAutoContrast();
//ac.CONTRACTNO = booking.CONTRACTNO;//约号
//ac.CNTRTOTAL = booking.CNTRTOTAL; //箱型箱量
//ac.VESSEL = booking.VESSEL;//船名
//ac.VOYNO = booking.VOYNO;//航次
//ac.TEMPMIN = booking.TEMPMIN;//最低温度
//ac.TEMPMAX = booking.TEMPMAX;//最高温度
//ac.TEMPSET = booking.TEMPSET;//运输温度
//ac.HUMIDITY = booking.HUMIDITY;//湿度
//ac.REEFERF = booking.REEFERF;//通风
//ac.PORTDISCHARGECODE = booking.PORTDISCHARGECODE;//卸货港
//ac.DESTINATION = booking.DESTINATION;//目的地
//ac.CARGOID = booking.CARGOID;//货物标识
//获取当前租户配置
var scope = _services.CreateScope();
var _taskFlowTenant = scope.ServiceProvider.GetRequiredService<SqlSugarRepository<TaskFlowTenant>>();
var apiinfo = _taskFlowTenant.AsQueryable().Filter(null, true)
.LeftJoin<TaskAPIInfo>((t, api) => t.TaskApiId == api.PK_ID)
.Where((t, api) => t.FlowCode == "CMABC")
.Select((t, api) => new { api.Key, api.SecretKey, api.URL })
.First();
//请求接口获取数据
var dto = await apiinfo.URL.SetHeaders(new Dictionary<string, object> {
{ "USER_KEY", apiinfo.Key},
{ "USER_SECRET", apiinfo.SecretKey}
}).SetBody(new { Code = "参数待完善" }).PostAsync();
return true;
}
}
}

@ -46,6 +46,11 @@ namespace Myshipping.Application
/// 提单号
/// </summary>
MBLNO,
/// <summary>
/// 名称
/// </summary>
Name,
}
#endregion

@ -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,6 +372,7 @@ 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);
}

Loading…
Cancel
Save