optimize
wet 1 year ago
parent e825188796
commit 3919d2020f

@ -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("接口调用异常");
}

@ -405,7 +405,7 @@ namespace Myshipping.Application
Sort = config.Sort
}).ToList();
var ConfigId = config.Where(x => x.StatusName == "提交舱单").Select(x => x.ConfigId).First();
var ConfigId = config.Where(x => x.SystemCode == "YFCD").Select(x => x.ConfigId).First();
await _goodsStatus.InsertAsync(new BookingGoodsStatus
{

Loading…
Cancel
Save