/BookingVesselInfo/AddOrUpdate手动更新船期时,不覆盖订单船司

master
zhangxiaofeng 4 weeks ago
parent bdc44d5b9e
commit 0f2a1c16ff

@ -181,43 +181,43 @@ namespace Myshipping.Application
var oldOrder = it.Adapt<BookingOrder>(); var oldOrder = it.Adapt<BookingOrder>();
bool flag = false; bool flag = false;
if (it.StartETA != dto.ETA) if (it.StartETA != dto.ETA && dto.ETA != null)
{ {
flag = true; flag = true;
it.StartETA = dto.ETA; it.StartETA = dto.ETA;
} }
if (it.VESSEL != dto.Vessel) if (it.VESSEL != dto.Vessel && !string.IsNullOrEmpty(dto.Vessel))
{ {
flag = true; flag = true;
it.VESSEL = dto.Vessel; it.VESSEL = dto.Vessel;
} }
if (it.VOYNO != dto.Voyno) if (it.VOYNO != dto.Voyno && !string.IsNullOrEmpty(dto.Voyno))
{ {
flag = true; flag = true;
it.VOYNO = dto.Voyno; it.VOYNO = dto.Voyno;
} }
if (it.VOYNOINNER != dto.VoynoInside) if (it.VOYNOINNER != dto.VoynoInside && !string.IsNullOrEmpty(dto.VoynoInside))
{ {
flag = true; flag = true;
it.VOYNOINNER = dto.VoynoInside; it.VOYNOINNER = dto.VoynoInside;
} }
if (it.CARRIERID != dto.CARRIERID) //if (it.CARRIERID != dto.CARRIERID)
{ //{
flag = true; // flag = true;
it.CARRIERID = dto.CARRIERID; // it.CARRIERID = dto.CARRIERID;
} //}
if (it.CARRIER != dto.CARRIER) //if (it.CARRIER != dto.CARRIER)
{ //{
flag = true; // flag = true;
it.CARRIER = dto.CARRIER; // it.CARRIER = dto.CARRIER;
} //}
if (it.YgtETD != dto.YgtETD) if (it.YgtETD != dto.YgtETD && dto.YgtETD != null)
{ {
flag = true; flag = true;
it.YgtETD = dto.YgtETD; it.YgtETD = dto.YgtETD;
} }
if (it.ETD != dto.ETD) if (it.ETD != dto.ETD && dto.ETD != null)
{ {
flag = true; flag = true;
it.ETD = dto.ETD; it.ETD = dto.ETD;
@ -228,12 +228,12 @@ namespace Myshipping.Application
it.ATD = dto.ATD; it.ATD = dto.ATD;
} }
if (dto.ClosingDate != null && dto.ClosingDate != it.CLOSINGDATE) if (dto.ClosingDate != it.CLOSINGDATE && dto.ClosingDate != null)
{ {
flag = true; flag = true;
it.CLOSINGDATE = dto.ClosingDate; it.CLOSINGDATE = dto.ClosingDate;
} }
if (dto.CloseDocTime != null && dto.CloseDocTime != it.CLOSEDOCDATE) if (dto.CloseDocTime != it.CLOSEDOCDATE && dto.CloseDocTime != null)
{ {
flag = true; flag = true;
it.CLOSEDOCDATE = dto.CloseDocTime; it.CLOSEDOCDATE = dto.CloseDocTime;

Loading…
Cancel
Save