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 &&
x.Vessel == entity.VESSEL && x.Voyno == entity.VOYNO).FirstAsync();
entity.StartETA = vess.ETA;
entity.ATD = vess.ATD;
entity.YgtETD = vess.YgtETD;
if (vess != null)
{
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);
}
allData.GoodsStatus = GoodsStatus.Union<GoodsStatusQuery>(config).OrderBy(x => x.Sort).ToList();
allData.GoodsStatus = GoodsStatus.Union<GoodsStatusQuery>(config).OrderBy(x => x.Sort).DistinctBy(x => x.StatusName).ToList();
if (traceTime)
{
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();
foreach (var item in dto)
{
var model = infolist.Where(x => x.Vessel == item.Vessel && x.Voyno == item.Voyno).FirstOrDefault();
if (model != null)
{
model.ETA = item.ETA;
model.YgtETD = item.ETD;
model.ATD = item.ATD;
model.UpdatedTime = DateTime.Now;
await _vesselinfo.AsUpdateable(model).IgnoreColumns().ExecuteCommandAsync();
}
//var model = infolist.Where(x => x.Vessel == item.Vessel && x.Voyno == item.Voyno).FirstOrDefault();
//if (model != null)
//{
// model.ETA = item.ETA;
// model.YgtETD = item.ETD;
// model.ATD = item.ATD;
// 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 });
var order = orderlist.Where(x => x.VESSEL == item.Vessel && x.VOYNO == item.Voyno).ToList();
bool issend = false;
if (order != null)

Loading…
Cancel
Save