optimize
wet 2 years ago
parent d2a55b255e
commit 46662f8468

@ -146,7 +146,7 @@ namespace Myshipping.Application
throw Oops.Bah("简称未录入"); throw Oops.Bah("简称未录入");
} }
var m = await _djycustomer.AsQueryable().Filter(null, true).Where(x => x.ShortName == item.ShortName && x.IsDeleted == false).FirstAsync(); var m = await _djycustomer.AsQueryable().Filter(null, true).Where(x => x.ShortName == item.ShortName && x.IsDeleted == false).FirstAsync();
var entity = model.Adapt<DjyCustomer>(); var entity = item.Adapt<DjyCustomer>();
if (m == null) if (m == null)
{ {
await _djycustomer.InsertAsync(entity); await _djycustomer.InsertAsync(entity);
@ -304,7 +304,7 @@ namespace Myshipping.Application
} }
var userlist = _repUser.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false).ToListAsync(); var userlist = _repUser.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false).ToListAsync();
var m = await _vesselinfo.AsQueryable().Filter(null, true).Where(x => x.BSNO == item.BSNO).FirstAsync(); var m = await _vesselinfo.AsQueryable().Filter(null, true).Where(x => x.BSNO == item.BSNO).FirstAsync();
var entity = model.Adapt<DjyVesselInfo>(); var entity = item.Adapt<DjyVesselInfo>();
entity.Vessel = item.Vessel.ToUpper().Trim(); entity.Vessel = item.Vessel.ToUpper().Trim();
if (!string.IsNullOrEmpty(item.CARRIERID)) if (!string.IsNullOrEmpty(item.CARRIERID))
{ {

Loading…
Cancel
Save