|
|
|
@ -1029,6 +1029,18 @@ namespace Myshipping.Application
|
|
|
|
|
CreatedUserId = UserManager.UserId,
|
|
|
|
|
CreatedUserName = UserManager.Name
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -1226,10 +1238,73 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
ordOut.BookingEDIExt = ediExtEntity.Adapt<BookingEDIExtDto>();
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.MBLNO) || string.IsNullOrEmpty(entity.CUSTNO))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
#region 插入货运动态
|
|
|
|
|
//配置中所有的货物状态
|
|
|
|
|
var config = _goodsStatusConfig.AsQueryable().Where(config => config.CreatedUserId == UserManager.UserId).ToList().DistinctBy(x => x.StatusName).Select(config => new GoodsStatusQuery
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
ConfigId = config.Id,
|
|
|
|
|
SystemCode = config.SystemCode,
|
|
|
|
|
StatusName = config.StatusName,
|
|
|
|
|
FinishTime = null,
|
|
|
|
|
FinishUser = null,
|
|
|
|
|
FinishUserId = null,
|
|
|
|
|
IsPublic = false,
|
|
|
|
|
ExtData = null,
|
|
|
|
|
Remark = null,
|
|
|
|
|
Sort = config.Sort
|
|
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.MBLNO))
|
|
|
|
|
{
|
|
|
|
|
var ConfigId = config.Where(x => x.SystemCode == "YSDBC").Select(x => x.ConfigId).First();
|
|
|
|
|
var Status = _goodsStatus.FirstOrDefault(x => x.bookingId == Id && x.ConfigId == ConfigId);
|
|
|
|
|
if (Status == null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
await _goodsStatus.InsertAsync(new BookingGoodsStatus
|
|
|
|
|
{
|
|
|
|
|
bookingId = Id,
|
|
|
|
|
ConfigId = ConfigId,
|
|
|
|
|
FinishTime = DateTime.Now,
|
|
|
|
|
FinishUser = UserManager.Name,
|
|
|
|
|
FinishUserId = UserManager.UserId,
|
|
|
|
|
IsPublic = false
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CUSTNO))
|
|
|
|
|
{
|
|
|
|
|
var ConfigId = config.Where(x => x.SystemCode == "YDC").Select(x => x.ConfigId).First();
|
|
|
|
|
var Status = _goodsStatus.FirstOrDefault(x => x.bookingId == Id && x.ConfigId == ConfigId);
|
|
|
|
|
if (Status == null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
await _goodsStatus.InsertAsync(new BookingGoodsStatus
|
|
|
|
|
{
|
|
|
|
|
bookingId = Id,
|
|
|
|
|
ConfigId = ConfigId,
|
|
|
|
|
FinishTime = DateTime.Now,
|
|
|
|
|
FinishUser = UserManager.Name,
|
|
|
|
|
FinishUserId = UserManager.UserId,
|
|
|
|
|
IsPublic = false
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<long> arr = new List<long>();
|
|
|
|
|
if (main.ParentId == 0)
|
|
|
|
|
{
|
|
|
|
@ -1417,7 +1492,8 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Bah(result);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
throw Oops.Bah("接口调用异常");
|
|
|
|
|
}
|
|
|
|
|