jianghaiqing 1 year ago
commit 62820a212a

@ -844,9 +844,19 @@ namespace Myshipping.Application
{ {
var vess = await _vesselInfo.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID && x.CARRIERID == entity.CARRIERID && var vess = await _vesselInfo.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID && x.CARRIERID == entity.CARRIERID &&
x.Vessel == entity.VESSEL && x.Voyno == entity.VOYNO).FirstAsync(); x.Vessel == entity.VESSEL && x.Voyno == entity.VOYNO).FirstAsync();
entity.StartETA = vess.ETA; if (vess != null)
entity.ATD = vess.ATD; {
entity.YgtETD = vess.YgtETD; entity.StartETA = vess.ETA;
entity.ATD = vess.ATD;
entity.YgtETD = vess.YgtETD;
}
else {
entity.StartETA = null;
entity.ATD = null;
entity.YgtETD = null;
}
} }
@ -7859,11 +7869,7 @@ namespace Myshipping.Application
config.RemoveAll(x => x.ConfigId == item.ConfigId); config.RemoveAll(x => x.ConfigId == item.ConfigId);
} }
allData.GoodsStatus = GoodsStatus.Union<GoodsStatusQuery>(config).OrderBy(x => x.Sort).DistinctBy(x => x.StatusName).ToList();
allData.GoodsStatus = GoodsStatus.Union<GoodsStatusQuery>(config).OrderBy(x => x.Sort).ToList();
if (traceTime) if (traceTime)
{ {
var et = DateTime.Now - ticks; var et = DateTime.Now - ticks;

@ -1655,16 +1655,17 @@ namespace Myshipping.Application
var orderlist = await _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToListAsync(); var orderlist = await _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToListAsync();
foreach (var item in dto) foreach (var item in dto)
{ {
var model = infolist.Where(x => x.Vessel == item.Vessel && x.Voyno == item.Voyno).FirstOrDefault(); //var model = infolist.Where(x => x.Vessel == item.Vessel && x.Voyno == item.Voyno).FirstOrDefault();
if (model != null) //if (model != null)
{ //{
model.ETA = item.ETA; // model.ETA = item.ETA;
model.YgtETD = item.ETD; // model.YgtETD = item.ETD;
model.ATD = item.ATD; // model.ATD = item.ATD;
model.UpdatedTime = DateTime.Now; // model.UpdatedTime = DateTime.Now;
await _vesselinfo.AsUpdateable(model).IgnoreColumns().ExecuteCommandAsync(); // 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 });
var order = orderlist.Where(x => x.VESSEL == item.Vessel && x.VOYNO == item.Voyno).ToList(); var order = orderlist.Where(x => x.VESSEL == item.Vessel && x.VOYNO == item.Voyno).ToList();
bool issend = false; bool issend = false;
if (order != null) if (order != null)

Loading…
Cancel
Save