|
|
@ -12824,6 +12824,8 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
//oldOrderList.ForEach()
|
|
|
|
//oldOrderList.ForEach()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<string> updateColumnList = new List<string>();
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var oldOrder in oldOrderList)
|
|
|
|
foreach (var oldOrder in oldOrderList)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var newOrder = oldOrder.Adapt<BookingOrder>();
|
|
|
|
var newOrder = oldOrder.Adapt<BookingOrder>();
|
|
|
@ -12833,46 +12835,64 @@ namespace Myshipping.Application
|
|
|
|
if(!string.IsNullOrWhiteSpace(dto.VESSEL))
|
|
|
|
if(!string.IsNullOrWhiteSpace(dto.VESSEL))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.VESSEL = dto.VESSEL;
|
|
|
|
newOrder.VESSEL = dto.VESSEL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.VESSEL));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(dto.VOYNOINNER))
|
|
|
|
if (!string.IsNullOrWhiteSpace(dto.VOYNOINNER))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.VOYNOINNER = dto.VOYNOINNER;
|
|
|
|
newOrder.VOYNOINNER = dto.VOYNOINNER;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.VOYNOINNER));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dto.ETD.HasValue)
|
|
|
|
if (dto.ETD.HasValue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.ETD = dto.ETD;
|
|
|
|
newOrder.ETD = dto.ETD;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.ETD));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(dto.PORTDISCHARGEID))
|
|
|
|
if (!string.IsNullOrWhiteSpace(dto.PORTDISCHARGEID))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.PORTDISCHARGEID = dto.PORTDISCHARGEID;
|
|
|
|
newOrder.PORTDISCHARGEID = dto.PORTDISCHARGEID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.PORTDISCHARGEID));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(dto.PORTDISCHARGE))
|
|
|
|
if (!string.IsNullOrWhiteSpace(dto.PORTDISCHARGE))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.PORTDISCHARGE = dto.PORTDISCHARGE;
|
|
|
|
newOrder.PORTDISCHARGE = dto.PORTDISCHARGE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.PORTDISCHARGE));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(dto.DESTINATIONID))
|
|
|
|
if (!string.IsNullOrWhiteSpace(dto.DESTINATIONID))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.DESTINATIONID = dto.DESTINATIONID;
|
|
|
|
newOrder.DESTINATIONID = dto.DESTINATIONID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.DESTINATIONID));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(dto.DESTINATION))
|
|
|
|
if (!string.IsNullOrWhiteSpace(dto.DESTINATION))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.DESTINATION = dto.DESTINATION;
|
|
|
|
newOrder.DESTINATION = dto.DESTINATION;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.DESTINATION));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dto.CLOSINGDATE.HasValue)
|
|
|
|
if (dto.CLOSINGDATE.HasValue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.CLOSINGDATE = dto.CLOSINGDATE;
|
|
|
|
newOrder.CLOSINGDATE = dto.CLOSINGDATE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.CLOSINGDATE));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dto.CLOSEDOCDATE.HasValue)
|
|
|
|
if (dto.CLOSEDOCDATE.HasValue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.CLOSEDOCDATE = dto.CLOSEDOCDATE;
|
|
|
|
newOrder.CLOSEDOCDATE = dto.CLOSEDOCDATE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.CLOSEDOCDATE));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//这里只处理值为空,并且前端强制指定了才赋空值处理
|
|
|
|
//这里只处理值为空,并且前端强制指定了才赋空值处理
|
|
|
@ -12881,46 +12901,57 @@ namespace Myshipping.Application
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("VESSEL", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.VESSEL))
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("VESSEL", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.VESSEL))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.VESSEL = dto.VESSEL;
|
|
|
|
newOrder.VESSEL = dto.VESSEL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.VESSEL));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("VOYNOINNER", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.VOYNOINNER))
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("VOYNOINNER", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.VOYNOINNER))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.VOYNOINNER = dto.VOYNOINNER;
|
|
|
|
newOrder.VOYNOINNER = dto.VOYNOINNER;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("ETD", StringComparison.OrdinalIgnoreCase)) && !dto.ETD.HasValue)
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.VOYNOINNER));
|
|
|
|
{
|
|
|
|
|
|
|
|
newOrder.ETD = dto.ETD;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("PORTDISCHARGEID", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.PORTDISCHARGEID))
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("PORTDISCHARGEID", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.PORTDISCHARGEID))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.PORTDISCHARGEID = dto.PORTDISCHARGEID;
|
|
|
|
newOrder.PORTDISCHARGEID = dto.PORTDISCHARGEID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.PORTDISCHARGEID));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("PORTDISCHARGE", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.PORTDISCHARGE))
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("PORTDISCHARGE", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.PORTDISCHARGE))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.PORTDISCHARGE = dto.PORTDISCHARGE;
|
|
|
|
newOrder.PORTDISCHARGE = dto.PORTDISCHARGE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.PORTDISCHARGE));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("DESTINATIONID", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.DESTINATIONID))
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("DESTINATIONID", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.DESTINATIONID))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.DESTINATIONID = dto.DESTINATIONID;
|
|
|
|
newOrder.DESTINATIONID = dto.DESTINATIONID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.DESTINATIONID));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("DESTINATION", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.DESTINATION))
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("DESTINATION", StringComparison.OrdinalIgnoreCase)) && string.IsNullOrWhiteSpace(dto.DESTINATION))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.DESTINATION = dto.DESTINATION;
|
|
|
|
newOrder.DESTINATION = dto.DESTINATION;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.DESTINATION));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("CLOSINGDATE", StringComparison.OrdinalIgnoreCase)) && !dto.CLOSINGDATE.HasValue)
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("CLOSINGDATE", StringComparison.OrdinalIgnoreCase)) && !dto.CLOSINGDATE.HasValue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.CLOSINGDATE = dto.CLOSINGDATE;
|
|
|
|
newOrder.CLOSINGDATE = dto.CLOSINGDATE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.CLOSINGDATE));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("CLOSEDOCDATE", StringComparison.OrdinalIgnoreCase)) && !dto.CLOSEDOCDATE.HasValue)
|
|
|
|
if (dto.enforceUpdateField.Any(a => a.Equals("CLOSEDOCDATE", StringComparison.OrdinalIgnoreCase)) && !dto.CLOSEDOCDATE.HasValue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
newOrder.CLOSEDOCDATE = dto.CLOSEDOCDATE;
|
|
|
|
newOrder.CLOSEDOCDATE = dto.CLOSEDOCDATE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateColumnList.Add(nameof(BookingOrder.CLOSEDOCDATE));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//newOrder.VOYNOINNER = dto.VOYNOINNER;
|
|
|
|
//newOrder.VOYNOINNER = dto.VOYNOINNER;
|
|
|
@ -12936,23 +12967,29 @@ namespace Myshipping.Application
|
|
|
|
//newOrder.CLOSEDOCDATE = dto.CLOSEDOCDATE;
|
|
|
|
//newOrder.CLOSEDOCDATE = dto.CLOSEDOCDATE;
|
|
|
|
|
|
|
|
|
|
|
|
await SaveLog(newOrder, oldOrder, "批量编辑台账");
|
|
|
|
await SaveLog(newOrder, oldOrder, "批量编辑台账");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _rep.AsUpdateable(newOrder).UpdateColumns(updateColumnList.ToArray()).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//await _rep.UpdateAsync(x => dto.Id.Contains(x.Id), x => new BookingOrder
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// VERSION = version,
|
|
|
|
|
|
|
|
// VESSEL = dto.VESSEL,
|
|
|
|
|
|
|
|
// VOYNOINNER = dto.VOYNOINNER,
|
|
|
|
|
|
|
|
// ETD = dto.ETD,
|
|
|
|
|
|
|
|
// VOYNO = dto.VOYNO,
|
|
|
|
|
|
|
|
// PORTDISCHARGEID = dto.PORTDISCHARGEID,
|
|
|
|
|
|
|
|
// PORTDISCHARGE = dto.PORTDISCHARGE,
|
|
|
|
|
|
|
|
// DESTINATIONID = dto.DESTINATIONID,
|
|
|
|
|
|
|
|
// DESTINATION = dto.DESTINATION,
|
|
|
|
|
|
|
|
// CLOSINGDATE = dto.CLOSINGDATE,
|
|
|
|
|
|
|
|
// CLOSEDOCDATE = dto.CLOSEDOCDATE
|
|
|
|
|
|
|
|
//});
|
|
|
|
|
|
|
|
await SendBookingOrder(dto.Id.ToArray());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
await _rep.UpdateAsync(x => dto.Id.Contains(x.Id), x => new BookingOrder
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
VERSION = version,
|
|
|
|
|
|
|
|
VESSEL = dto.VESSEL,
|
|
|
|
|
|
|
|
VOYNOINNER = dto.VOYNOINNER,
|
|
|
|
|
|
|
|
ETD = dto.ETD,
|
|
|
|
|
|
|
|
VOYNO = dto.VOYNO,
|
|
|
|
|
|
|
|
PORTDISCHARGEID = dto.PORTDISCHARGEID,
|
|
|
|
|
|
|
|
PORTDISCHARGE = dto.PORTDISCHARGE,
|
|
|
|
|
|
|
|
DESTINATIONID = dto.DESTINATIONID,
|
|
|
|
|
|
|
|
DESTINATION = dto.DESTINATION,
|
|
|
|
|
|
|
|
CLOSINGDATE = dto.CLOSINGDATE,
|
|
|
|
|
|
|
|
CLOSEDOCDATE = dto.CLOSEDOCDATE
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await SendBookingOrder(dto.Id.ToArray());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|