|
|
|
@ -422,6 +422,7 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("BSNO未录入");
|
|
|
|
|
}
|
|
|
|
|
//根据东胜bsno获取当前数据查询不到则为新增
|
|
|
|
|
var m = mlist.Where(x => x.BSNO == item.BSNO).FirstOrDefault();
|
|
|
|
|
var entity = item.Adapt<DjyVesselInfo>();
|
|
|
|
|
entity.Vessel = item.Vessel.ToUpper().Trim();
|
|
|
|
@ -431,20 +432,16 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(entity.CARRIERID))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
entity.CARRIERID = mapcarrier.Where(x => x.MapName == item.CARRIER).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(entity.CARRIERID))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
throw Oops.Bah($"未找到{item.CARRIER}对应code,请联系管理员!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(item.CreatedUserName))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
entity.CreatedUserId = CreatedUserId;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(item.Voyno))
|
|
|
|
@ -453,31 +450,34 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
if (m == null)
|
|
|
|
|
{
|
|
|
|
|
//查询是否存在相同船名航次数据
|
|
|
|
|
var e = mlist.Where(x => x.CARRIERID == entity.CARRIERID && x.Vessel == entity.Vessel && x.Voyno == entity.Voyno && x.VoynoInside == entity.VoynoInside).FirstOrDefault();
|
|
|
|
|
//2023年7月27日,王书岚:航次为V.开头的不查询船期
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.VoynoInside) && entity.VoynoInside.StartsWith("V."))
|
|
|
|
|
{
|
|
|
|
|
entity.Sign = true;
|
|
|
|
|
}
|
|
|
|
|
if (e == null)
|
|
|
|
|
{
|
|
|
|
|
//2023年7月27日,王书岚:航次为V.开头的不查询船期
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.VoynoInside) && entity.VoynoInside.StartsWith("V."))
|
|
|
|
|
{
|
|
|
|
|
entity.Sign = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await _vesselinfo.InsertAsync(entity);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
entity.Id = e.Id;
|
|
|
|
|
if (e.ETA != null)
|
|
|
|
|
{
|
|
|
|
|
entity.ETA = e.ETA;
|
|
|
|
|
}
|
|
|
|
|
await _vesselinfo.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//2023年7月27日,王书岚:航次为V.开头的不查询船期
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.VoynoInside) && entity.VoynoInside.StartsWith("V."))
|
|
|
|
|
{
|
|
|
|
|
entity.Sign = true;
|
|
|
|
|
}
|
|
|
|
|
entity.Id = m.Id;
|
|
|
|
|
if (m.ETA != null)
|
|
|
|
|
{
|
|
|
|
@ -1664,8 +1664,8 @@ namespace Myshipping.Application
|
|
|
|
|
// model.UpdatedTime = DateTime.Now;
|
|
|
|
|
// await _vesselinfo.AsUpdateable(model).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
|
//}
|
|
|
|
|
await _vesselinfo.UpdateAsync(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false&&
|
|
|
|
|
x.Vessel == item.Vessel && x.Voyno == item.Voyno , x => new DjyVesselInfo { ETA = item.ETA, YgtETD= item.ETD , ATD = item.ATD , UpdatedTime = DateTime.Now });
|
|
|
|
|
await _vesselinfo.UpdateAsync(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false &&
|
|
|
|
|
x.Vessel == item.Vessel && x.Voyno == item.Voyno, x => new DjyVesselInfo { ETA = item.ETA, YgtETD = item.ETD, ATD = item.ATD, UpdatedTime = DateTime.Now });
|
|
|
|
|
var order = orderlist.Where(x => x.VESSEL == item.Vessel && x.VOYNO == item.Voyno).ToList();
|
|
|
|
|
bool issend = false;
|
|
|
|
|
if (order != null)
|
|
|
|
@ -2103,7 +2103,7 @@ namespace Myshipping.Application
|
|
|
|
|
bookingStatusLog.MBLNO = item.MBLNO;
|
|
|
|
|
await _repStatuslog.InsertAsync(bookingStatusLog);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (item.detail != null && item.detail.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var dt in item.detail)
|
|
|
|
@ -2115,7 +2115,7 @@ namespace Myshipping.Application
|
|
|
|
|
BookingStatusLogDetail.OPTime = dt.OPTime;
|
|
|
|
|
await _statuslogdetail.InsertAsync(BookingStatusLogDetail);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -2358,9 +2358,9 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (flag)
|
|
|
|
|
{
|
|
|
|
|