jianghaiqing 2 years ago
commit 7d6d04ad59

@ -2208,11 +2208,11 @@ namespace Myshipping.Application
foreach (var item in dto)
{
var model = _vesselinfo.Where(x => x.Vessel == item.Vessel && x.Voyno == item.Voyno && x.CARRIERID == item.CARRIERID && x.TenantId == UserManager.TENANT_ID).First();
var model = _vesselinfo.AsQueryable().Filter(null, true).Where(x => x.Vessel == item.Vessel && x.Voyno == item.Voyno && x.CARRIERID == item.CARRIERID && x.TenantId == UserManager.TENANT_ID).First();
model.ETA = item.ETA;
model.ETD = item.ETD;
await _vesselinfo.AsUpdateable(model).IgnoreColumns().ExecuteCommandAsync();
var order = await _rep.AsQueryable().Where(x => x.VESSEL == item.Vessel && x.VOYNO == item.Voyno && x.CARRIERID == item.CARRIERID && x.TenantId == UserManager.TENANT_ID).ToListAsync();
var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.VESSEL == item.Vessel && x.VOYNO == item.Voyno && x.CARRIERID == item.CARRIERID && x.TenantId == UserManager.TENANT_ID).ToListAsync();
if (order != null)
{
foreach (var it in order)
@ -2288,13 +2288,14 @@ namespace Myshipping.Application
public async Task<dynamic> GetSyncVesselDate()
{
var list = await _vesselinfo.AsQueryable().Where(x => x.ETD != null && x.ATD != null && x.TenantId == UserManager.TENANT_ID&&(x.Voyno!=null&&x.Voyno!="")).Select(x => new
var list = await _vesselinfo.AsQueryable().Filter(null, true).Where(x =>( x.ETD == null || x.ATD == null )&& x.TenantId == UserManager.TENANT_ID&&(x.Voyno!=null&&x.Voyno!="")).Select(x => new
{
Vessel = x.Vessel,
Voyno = x.Voyno,
CARRIER = x.CARRIER,
CARRIERID = x.CARRIERID
}).Distinct().ToListAsync();
return list;
}

Loading…
Cancel
Save