|
|
|
@ -138,7 +138,7 @@ namespace Myshipping.Application
|
|
|
|
|
entity.Vessel = model.Vessel.ToUpper().Trim();
|
|
|
|
|
if (!string.IsNullOrEmpty( entity.CARRIER)) {
|
|
|
|
|
|
|
|
|
|
entity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).First();
|
|
|
|
|
entity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (m == null)
|
|
|
|
|
{
|
|
|
|
@ -227,24 +227,24 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CUSTOMSER))
|
|
|
|
|
{
|
|
|
|
|
entity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).First();
|
|
|
|
|
entity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.TRUCKER))
|
|
|
|
|
{
|
|
|
|
|
entity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == entity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).First();
|
|
|
|
|
entity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == entity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CUSTOMERNAME))
|
|
|
|
|
{
|
|
|
|
|
entity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).First();
|
|
|
|
|
entity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.FORWARDER))
|
|
|
|
|
{
|
|
|
|
|
entity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == entity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).First();
|
|
|
|
|
entity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == entity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CARRIER))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
entity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).First();
|
|
|
|
|
entity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
entity.CreatedUserId = user.Result.Id;
|
|
|
|
|
entity.CreatedUserName = user.Result.Name.ToString();
|
|
|
|
@ -259,7 +259,7 @@ namespace Myshipping.Application
|
|
|
|
|
ctnentity.BILLID = entity.Id;
|
|
|
|
|
ctnentity.CreatedUserId = user.Result.Id;
|
|
|
|
|
ctnentity.CreatedUserName = user.Result.Name;
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).First();
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
await _repCtn.InsertAsync(ctnentity);
|
|
|
|
|
|
|
|
|
|
//这里保存有可能没有添加多品名,所有箱下没有货物信息
|
|
|
|
@ -357,24 +357,24 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.CUSTOMSER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).First();
|
|
|
|
|
fdentity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.TRUCKER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == fdentity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).First();
|
|
|
|
|
fdentity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == fdentity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.CUSTOMERNAME))
|
|
|
|
|
{
|
|
|
|
|
fdentity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).First();
|
|
|
|
|
fdentity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.FORWARDER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == fdentity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).First();
|
|
|
|
|
fdentity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == fdentity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CARRIER))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
fdentity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).First();
|
|
|
|
|
fdentity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
fdentity.MBLNO = entity.MBLNO;
|
|
|
|
|
fdentity.CreatedUserId = user.Result.Id;
|
|
|
|
@ -391,7 +391,7 @@ namespace Myshipping.Application
|
|
|
|
|
ctnentity.BILLID = fdentity.Id;
|
|
|
|
|
ctnentity.CreatedUserId = user.Result.Id;
|
|
|
|
|
ctnentity.CreatedUserName = user.Result.Name;
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).First();
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
await _repCtn.InsertAsync(ctnentity);
|
|
|
|
|
|
|
|
|
|
//这里保存有可能没有添加多品名,所有箱下没有货物信息
|
|
|
|
@ -500,24 +500,24 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CUSTOMSER))
|
|
|
|
|
{
|
|
|
|
|
entity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).First();
|
|
|
|
|
entity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.TRUCKER))
|
|
|
|
|
{
|
|
|
|
|
entity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == entity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).First();
|
|
|
|
|
entity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == entity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CUSTOMERNAME))
|
|
|
|
|
{
|
|
|
|
|
entity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).First();
|
|
|
|
|
entity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.FORWARDER))
|
|
|
|
|
{
|
|
|
|
|
entity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == entity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).First();
|
|
|
|
|
entity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == entity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CARRIER))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
entity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).First();
|
|
|
|
|
entity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
entity.IsDeleted = false;
|
|
|
|
|
await _rep.AsUpdateable(entity).IgnoreColumns(it => new
|
|
|
|
@ -539,7 +539,7 @@ namespace Myshipping.Application
|
|
|
|
|
ctnentity.BILLID = main.Id;
|
|
|
|
|
ctnentity.CreatedUserId = user.Result.Id;
|
|
|
|
|
ctnentity.CreatedUserName = user.Result.Name;
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).First();
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
await _repCtn.InsertAsync(ctnentity);
|
|
|
|
|
if (item.ctnDetailInputs != null)
|
|
|
|
|
{
|
|
|
|
@ -698,24 +698,24 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.CUSTOMSER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).First();
|
|
|
|
|
fdentity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.TRUCKER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == fdentity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).First();
|
|
|
|
|
fdentity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == fdentity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.CUSTOMERNAME))
|
|
|
|
|
{
|
|
|
|
|
fdentity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).First();
|
|
|
|
|
fdentity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.FORWARDER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == fdentity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).First();
|
|
|
|
|
fdentity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == fdentity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CARRIER))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
fdentity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).First();
|
|
|
|
|
fdentity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
await _rep.AsUpdateable(fdentity).IgnoreColumns(it => new
|
|
|
|
|
{
|
|
|
|
@ -736,7 +736,7 @@ namespace Myshipping.Application
|
|
|
|
|
ctnentity.BILLID = fdmain.Id;
|
|
|
|
|
ctnentity.CreatedUserId = user.Result.Id;
|
|
|
|
|
ctnentity.CreatedUserName = user.Result.Name;
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).First();
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
await _repCtn.InsertAsync(ctnentity);
|
|
|
|
|
if (it.ctnDetailInputs != null)
|
|
|
|
|
{
|
|
|
|
@ -920,7 +920,7 @@ namespace Myshipping.Application
|
|
|
|
|
var user = _repUser.AsQueryable().Filter(null, true).Where(x => x.Name == model.CreatedUserName.Trim()).FirstAsync();
|
|
|
|
|
if (user.Result == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah($"未匹配到创建人 {model.CreatedUserName.Trim()} 请联系管理员添加相关用户");
|
|
|
|
|
throw Oops.Bah($"未匹配到创建人{model.CreatedUserName.Trim()}请联系管理员添加相关用户");
|
|
|
|
|
}
|
|
|
|
|
var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.BSNO == model.BSNO).FirstAsync();
|
|
|
|
|
if (order == null)
|
|
|
|
@ -972,24 +972,24 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CUSTOMSER))
|
|
|
|
|
{
|
|
|
|
|
entity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).First();
|
|
|
|
|
entity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.TRUCKER))
|
|
|
|
|
{
|
|
|
|
|
entity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == entity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).First();
|
|
|
|
|
entity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == entity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CUSTOMERNAME))
|
|
|
|
|
{
|
|
|
|
|
entity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).First();
|
|
|
|
|
entity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.FORWARDER))
|
|
|
|
|
{
|
|
|
|
|
entity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == entity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).First();
|
|
|
|
|
entity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == entity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CARRIER))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
entity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).First();
|
|
|
|
|
entity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
entity.CreatedUserId = user.Result.Id;
|
|
|
|
|
entity.CreatedUserName = user.Result.Name.ToString();
|
|
|
|
@ -1004,7 +1004,7 @@ namespace Myshipping.Application
|
|
|
|
|
ctnentity.BILLID = entity.Id;
|
|
|
|
|
ctnentity.CreatedUserId = user.Result.Id;
|
|
|
|
|
ctnentity.CreatedUserName = user.Result.Name;
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).First();
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
await _repCtn.InsertAsync(ctnentity);
|
|
|
|
|
|
|
|
|
|
//这里保存有可能没有添加多品名,所有箱下没有货物信息
|
|
|
|
@ -1100,24 +1100,24 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.CUSTOMSER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).First();
|
|
|
|
|
fdentity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.TRUCKER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == fdentity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).First();
|
|
|
|
|
fdentity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == fdentity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.CUSTOMERNAME))
|
|
|
|
|
{
|
|
|
|
|
fdentity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).First();
|
|
|
|
|
fdentity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.FORWARDER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == fdentity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).First();
|
|
|
|
|
fdentity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == fdentity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CARRIER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.CARRIER = entity.CARRIER;
|
|
|
|
|
fdentity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).First();
|
|
|
|
|
fdentity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
fdentity.MBLNO = entity.MBLNO;
|
|
|
|
|
fdentity.CreatedUserId = user.Result.Id;
|
|
|
|
@ -1134,7 +1134,7 @@ namespace Myshipping.Application
|
|
|
|
|
ctnentity.BILLID = fdentity.Id;
|
|
|
|
|
ctnentity.CreatedUserId = user.Result.Id;
|
|
|
|
|
ctnentity.CreatedUserName = user.Result.Name;
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).First();
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
await _repCtn.InsertAsync(ctnentity);
|
|
|
|
|
|
|
|
|
|
//这里保存有可能没有添加多品名,所有箱下没有货物信息
|
|
|
|
@ -1240,24 +1240,24 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CUSTOMSER))
|
|
|
|
|
{
|
|
|
|
|
entity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).First();
|
|
|
|
|
entity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.TRUCKER))
|
|
|
|
|
{
|
|
|
|
|
entity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == entity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).First();
|
|
|
|
|
entity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == entity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CUSTOMERNAME))
|
|
|
|
|
{
|
|
|
|
|
entity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).First();
|
|
|
|
|
entity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == entity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.FORWARDER))
|
|
|
|
|
{
|
|
|
|
|
entity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == entity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).First();
|
|
|
|
|
entity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == entity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CARRIER))
|
|
|
|
|
{
|
|
|
|
|
entity.CARRIER = entity.CARRIER;
|
|
|
|
|
entity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).First();
|
|
|
|
|
entity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
await _rep.AsUpdateable(entity).IgnoreColumns(it => new
|
|
|
|
|
{
|
|
|
|
@ -1278,7 +1278,7 @@ namespace Myshipping.Application
|
|
|
|
|
ctnentity.BILLID = main.Id;
|
|
|
|
|
ctnentity.CreatedUserId = user.Result.Id;
|
|
|
|
|
ctnentity.CreatedUserName = user.Result.Name;
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).First();
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
await _repCtn.InsertAsync(ctnentity);
|
|
|
|
|
if (item.ctnDetailInputs != null)
|
|
|
|
|
{
|
|
|
|
@ -1435,24 +1435,24 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.CUSTOMSER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).First();
|
|
|
|
|
fdentity.CUSTOMSERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMSER && x.PropString == "customs_broker").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.TRUCKER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == fdentity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).First();
|
|
|
|
|
fdentity.TRUCKERID = djycustomer.Result.Where(x => x.ShortName == fdentity.TRUCKER && x.PropString == "fleet").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.CUSTOMERNAME))
|
|
|
|
|
{
|
|
|
|
|
fdentity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).First();
|
|
|
|
|
fdentity.CUSTOMERID = djycustomer.Result.Where(x => x.ShortName == fdentity.CUSTOMERNAME && x.PropString == "consignor").Select(x => x.Id).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.FORWARDER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == fdentity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).First();
|
|
|
|
|
fdentity.FORWARDERID = djycustomer.Result.Where(x => x.ShortName == fdentity.FORWARDER && x.PropString == "booking_agent").Select(x => x.CodeName).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CARRIER))
|
|
|
|
|
{
|
|
|
|
|
fdentity.CARRIER = entity.CARRIER;
|
|
|
|
|
fdentity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).First();
|
|
|
|
|
fdentity.CARRIERID = _cache.GetAllCodeCarrier().Result.Where(x => x.CnName == entity.CARRIER).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
await _rep.AsUpdateable(fdentity).IgnoreColumns(it => new
|
|
|
|
|
{
|
|
|
|
@ -1473,7 +1473,7 @@ namespace Myshipping.Application
|
|
|
|
|
ctnentity.BILLID = fdmain.Id;
|
|
|
|
|
ctnentity.CreatedUserId = user.Result.Id;
|
|
|
|
|
ctnentity.CreatedUserName = user.Result.Name;
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).First();
|
|
|
|
|
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).FirstOrDefault();
|
|
|
|
|
await _repCtn.InsertAsync(ctnentity);
|
|
|
|
|
if (it.ctnDetailInputs != null)
|
|
|
|
|
{
|
|
|
|
|