|
|
@ -192,6 +192,25 @@ namespace Myshipping.Application
|
|
|
|
throw Oops.Bah("当前提单号已存在,请勿重复录入!");
|
|
|
|
throw Oops.Bah("当前提单号已存在,请勿重复录入!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var entity = model.Adapt<BookingOrder>();
|
|
|
|
var entity = model.Adapt<BookingOrder>();
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.ROUTE)) {
|
|
|
|
|
|
|
|
entity.ROUTEID = userlist.Result.Where(x => x.Name == entity.ROUTE).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.ROUTE).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.SALE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
entity.SALEID = userlist.Result.Where(x => x.Name == entity.SALE).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.SALE).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.OP))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
entity.OPID = userlist.Result.Where(x => x.Name == entity.OP).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.OP).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.DOC))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
entity.DOCID = userlist.Result.Where(x => x.Name == entity.DOC).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.DOC).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CUSTSERVICE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
entity.CUSTSERVICEID = userlist.Result.Where(x => x.Name == entity.CUSTSERVICE).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.CUSTSERVICE).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
entity.CreatedUserId = user.Result.Id;
|
|
|
|
entity.CreatedUserId = user.Result.Id;
|
|
|
|
entity.CreatedUserName = user.Result.Name.ToString();
|
|
|
|
entity.CreatedUserName = user.Result.Name.ToString();
|
|
|
|
entity.CreatedTime = DateTime.Now;
|
|
|
|
entity.CreatedTime = DateTime.Now;
|
|
|
@ -276,6 +295,26 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var fdentity = item.Adapt<BookingOrder>();
|
|
|
|
var fdentity = item.Adapt<BookingOrder>();
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.ROUTE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
fdentity.ROUTEID = userlist.Result.Where(x => x.Name == entity.ROUTE).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.ROUTE).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.SALE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
fdentity.SALEID = userlist.Result.Where(x => x.Name == entity.SALE).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.SALE).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.OP))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
fdentity.OPID = userlist.Result.Where(x => x.Name == entity.OP).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.OP).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.DOC))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
fdentity.DOCID = userlist.Result.Where(x => x.Name == entity.DOC).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.DOC).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.CUSTSERVICE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
fdentity.CUSTSERVICEID = userlist.Result.Where(x => x.Name == entity.CUSTSERVICE).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.CUSTSERVICE).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
fdentity.CreatedUserId = user.Result.Id;
|
|
|
|
fdentity.CreatedUserId = user.Result.Id;
|
|
|
|
fdentity.CreatedUserName = user.Result.Name;
|
|
|
|
fdentity.CreatedUserName = user.Result.Name;
|
|
|
|
fdentity.CreatedTime = DateTime.Now;
|
|
|
|
fdentity.CreatedTime = DateTime.Now;
|
|
|
@ -369,6 +408,26 @@ namespace Myshipping.Application
|
|
|
|
entity.UpdatedUserName = user.Result.Name;
|
|
|
|
entity.UpdatedUserName = user.Result.Name;
|
|
|
|
entity.UpdatedUserId = user.Result.Id;
|
|
|
|
entity.UpdatedUserId = user.Result.Id;
|
|
|
|
entity.UpdatedTime = DateTime.Now;
|
|
|
|
entity.UpdatedTime = DateTime.Now;
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.ROUTE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
entity.ROUTEID = userlist.Result.Where(x => x.Name == entity.ROUTE).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.ROUTE).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.SALE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
entity.SALEID = userlist.Result.Where(x => x.Name == entity.SALE).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.SALE).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.OP))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
entity.OPID = userlist.Result.Where(x => x.Name == entity.OP).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.OP).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.DOC))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
entity.DOCID = userlist.Result.Where(x => x.Name == entity.DOC).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.DOC).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CUSTSERVICE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
entity.CUSTSERVICEID = userlist.Result.Where(x => x.Name == entity.CUSTSERVICE).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.CUSTSERVICE).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
await _rep.AsUpdateable(entity).IgnoreColumns(it => new
|
|
|
|
await _rep.AsUpdateable(entity).IgnoreColumns(it => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
it.ParentId,
|
|
|
|
it.ParentId,
|
|
|
@ -517,6 +576,26 @@ namespace Myshipping.Application
|
|
|
|
fdentity.UpdatedUserName = user.Result.Name;
|
|
|
|
fdentity.UpdatedUserName = user.Result.Name;
|
|
|
|
fdentity.UpdatedUserId = user.Result.Id;
|
|
|
|
fdentity.UpdatedUserId = user.Result.Id;
|
|
|
|
fdentity.UpdatedTime = DateTime.Now;
|
|
|
|
fdentity.UpdatedTime = DateTime.Now;
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.ROUTE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
fdentity.ROUTEID = userlist.Result.Where(x => x.Name == entity.ROUTE).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.ROUTE).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.SALE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
fdentity.SALEID = userlist.Result.Where(x => x.Name == entity.SALE).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.SALE).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.OP))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
fdentity.OPID = userlist.Result.Where(x => x.Name == entity.OP).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.OP).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.DOC))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
fdentity.DOCID = userlist.Result.Where(x => x.Name == entity.DOC).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.DOC).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(fdentity.CUSTSERVICE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
fdentity.CUSTSERVICEID = userlist.Result.Where(x => x.Name == entity.CUSTSERVICE).Count() == 0 ? "" : userlist.Result.Where(x => x.Name == entity.CUSTSERVICE).Select(x => x.Id).FirstOrDefault().ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
await _rep.AsUpdateable(fdentity).IgnoreColumns(it => new
|
|
|
|
await _rep.AsUpdateable(fdentity).IgnoreColumns(it => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
it.ParentId,
|
|
|
|
it.ParentId,
|
|
|
|