修改舱位管理

master
jianghaiqing 4 months ago
parent 98b40769d7
commit 26c9b96fa6

@ -128,7 +128,7 @@ namespace Myshipping.Application.Service.BookingOrder
userKey = App.Configuration["MSKAPIDjyUserKey"], userKey = App.Configuration["MSKAPIDjyUserKey"],
userSecret = App.Configuration["MSKAPIDjyUserSecret"], userSecret = App.Configuration["MSKAPIDjyUserSecret"],
operatingEnvironment = App.Configuration["MSKAPIOPEnvironment"], operatingEnvironment = App.Configuration["MSKAPIOPEnvironment"],
mskAppKey = webAccountConfig.Account, mskAppKey = "mVHrpEGxtXykJAo0lDm8FPGGVFUrcsrj",//webAccountConfig.Account,
cargoType = model.cargoType, cargoType = model.cargoType,
exportServiceMode = model.exportServiceMode, exportServiceMode = model.exportServiceMode,
importServiceMode = model.importServiceMode, importServiceMode = model.importServiceMode,
@ -330,8 +330,8 @@ namespace Myshipping.Application.Service.BookingOrder
MSKAPISPOTScheduleRateResultShowLegsDto leg = new MSKAPISPOTScheduleRateResultShowLegsDto MSKAPISPOTScheduleRateResultShowLegsDto leg = new MSKAPISPOTScheduleRateResultShowLegsDto
{ {
vesselName = b.transport.vessel.vesselName, vesselName = b.transport.vessel?.vesselName,
VoyageNo = b.transport.carrierDepartureVoyageNumber, VoyageNo = b.transport?.carrierDepartureVoyageNumber,
From = new MSKAPISPOTScheduleRateResultShowLegsLocationDto From = new MSKAPISPOTScheduleRateResultShowLegsLocationDto
{ {
CityName = b.facilities.startLocation.cityName, CityName = b.facilities.startLocation.cityName,

@ -1929,14 +1929,6 @@ namespace Myshipping.Application
{ {
ISugarQueryable<BookingSlotBase> select = null; ISugarQueryable<BookingSlotBase> select = null;
List<long> idList = new List<long>();
for (int i = 0; i < 4900; i++)
{
idList.Add(YitIdHelper.NextId());
}
// 箱型筛选 // 箱型筛选
string[] ctnCodeArr = null; string[] ctnCodeArr = null;
if (!string.IsNullOrEmpty(input.CTN_STAT)) if (!string.IsNullOrEmpty(input.CTN_STAT))

@ -121,5 +121,12 @@ namespace Myshipping.Application
/// <returns>返回回执</returns> /// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> GetBookingOrder(string taskPkId); Task<TaskManageOrderResultDto> GetBookingOrder(string taskPkId);
/// <summary>
/// 同步更新船期表
/// </summary>
/// <param name="taskPKId">BC任务主键</param>
/// <returns></returns>
Task<TaskManageOrderResultDto> SyncDjyVesselInfo(string taskPKId);
} }
} }

@ -3828,6 +3828,19 @@ namespace Myshipping.Application
} }
} }
#endregion #endregion
/// <summary>
/// 同步更新船期表
/// </summary>
/// <param name="taskPKId">BC任务主键</param>
/// <returns></returns>
public async Task<TaskManageOrderResultDto> SyncDjyVesselInfo(string taskPKId)
{
/*
BC
*/
return null;
}
} }
/// <summary> /// <summary>

@ -251,5 +251,44 @@ namespace Myshipping.Core.Service
return tlist.Union(temp); return tlist.Union(temp);
} }
} }
public async Task<long> SyncDjyVesselInfo(DjyVesselInfoDto dto)
{
if (dto == null)
{
throw Oops.Bah("请传入数据!");
}
if (dto.Id == 0)
{
var entity = dto.Adapt<DjyVesselInfo>();
var e = _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false
&& x.CARRIERID == entity.CARRIERID
&& x.Vessel == entity.Vessel && x.Voyno == entity.Voyno
&& x.VoynoInside == entity.VoynoInside).First();
if (e == null)
{
await _rep.InsertAsync(entity);
}
else
{
entity.Id = e.Id;
if (e.ETA != null)
{
entity.ETA = e.ETA;
}
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
}
}
else
{
var entity = dto.Adapt<DjyVesselInfo>();
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
}
return dto.Id;
}
} }
} }

Loading…
Cancel
Save