|
|
|
@ -1845,14 +1845,22 @@ namespace Myshipping.Application
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//变更船期
|
|
|
|
|
await _vesselinfo.UpdateAsync(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false && x.Vessel == item.Vessel && x.Voyno == item.Voyno && x.PortLoadingId == item.PortLoadId,
|
|
|
|
|
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.PortLoadingId == item.PortLoadId,
|
|
|
|
|
// x => new DjyVesselInfo
|
|
|
|
|
// {
|
|
|
|
|
// ETA = item.ETA,
|
|
|
|
|
// YgtETD = item.ETD,
|
|
|
|
|
// ATD = item.ATD,
|
|
|
|
|
// UpdatedTime = DateTime.Now
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
await _vesselinfo.AsUpdateable()
|
|
|
|
|
.SetColumnsIF(item.ETA != null, x => x.ETA == item.ETA)
|
|
|
|
|
.SetColumnsIF(item.ETD != null, x => x.YgtETD == item.ETD)
|
|
|
|
|
.SetColumnsIF(item.ATD != null, x => x.ATD == item.ATD)
|
|
|
|
|
.SetColumns(x => x.UpdatedTime == DateTime.Now)
|
|
|
|
|
.Where(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false && x.Vessel == item.Vessel && x.Voyno == item.Voyno && x.PortLoadingId == item.PortLoadId)
|
|
|
|
|
.ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
//没有港口的按青岛港处理
|
|
|
|
|
if (string.IsNullOrEmpty(item.PortLoadId))
|
|
|
|
@ -1906,25 +1914,25 @@ namespace Myshipping.Application
|
|
|
|
|
Lazy<IUpdateable<BookingOrder>> update = new(() => _rep.Context.Updateable<BookingOrder>());
|
|
|
|
|
Lazy<BookingOrder> newOrder = new(() => order.Adapt<BookingOrder>());
|
|
|
|
|
|
|
|
|
|
if (order.StartETA != item.ETA)
|
|
|
|
|
if (order.StartETA != item.ETA && item.ETA != null)
|
|
|
|
|
{
|
|
|
|
|
isupdate = true;
|
|
|
|
|
newOrder.Value.StartETA = item.ETA;
|
|
|
|
|
update.Value.SetColumns(b => b.StartETA == item.ETA);
|
|
|
|
|
}
|
|
|
|
|
if (order.YgtETD != item.ETD)
|
|
|
|
|
if (order.YgtETD != item.ETD && item.ETD != null)
|
|
|
|
|
{
|
|
|
|
|
isupdate = true;
|
|
|
|
|
newOrder.Value.YgtETD = item.ETD;
|
|
|
|
|
update.Value.SetColumns(b => b.YgtETD == item.ETD);
|
|
|
|
|
}
|
|
|
|
|
if (order.ATD != item.ATD && order.ATD == null)
|
|
|
|
|
if (order.ATD != item.ATD && item.ATD != null)
|
|
|
|
|
{
|
|
|
|
|
isupdate = true;
|
|
|
|
|
newOrder.Value.ATD = item.ATD;
|
|
|
|
|
update.Value.SetColumns(b => b.ATD == item.ATD);
|
|
|
|
|
}
|
|
|
|
|
if (order.StartATA != item.ATA)
|
|
|
|
|
if (order.StartATA != item.ATA && item.ATA != null)
|
|
|
|
|
{
|
|
|
|
|
isupdate = true;
|
|
|
|
|
newOrder.Value.StartATA = item.ATA;
|
|
|
|
|