|
|
|
@ -472,6 +472,7 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//货物状态
|
|
|
|
|
itgoodsStatus = _goodsStatus.AsQueryable().LeftJoin(_goodsStatusConfig.AsQueryable(),
|
|
|
|
|
(goods, config) => config.Id == goods.ConfigId && bookingidlist.Contains((long)goods.bookingId)).
|
|
|
|
|
OrderBy((goods, config) => config.Sort).
|
|
|
|
@ -513,11 +514,13 @@ namespace Myshipping.Application
|
|
|
|
|
ticks = DateTime.Now;
|
|
|
|
|
_logger.LogInformation($"PageData Stage 5 {et.TotalMilliseconds}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//货运状态列表
|
|
|
|
|
var statusloglist = _repStatuslog.AsQueryable().Filter(null, true).Where(x => bookingidlist.Contains((long)x.BookingId) && (x.Status == "提箱" || x.Status == "返场") && x.IsDeleted == false).ToList();
|
|
|
|
|
|
|
|
|
|
var statuslogId = statusloglist.Select(x => x.Id).ToList();
|
|
|
|
|
//运踪状态
|
|
|
|
|
var statuslogdetaillist = _statuslogdetail.AsQueryable().Where(x => statuslogId.Contains(x.PId)).ToList();
|
|
|
|
|
|
|
|
|
|
var BookingStatusList = _repBookingStatus.AsQueryable().Filter(null, true).Where(x => bookingidlist.Contains((long)x.BookingId)).ToList();
|
|
|
|
|
var bookingremarkList = _bookingremark.AsQueryable().Filter(null, true).Where(x => bookingidlist.Contains(x.PId)).ToList();
|
|
|
|
|
|
|
|
|
@ -791,7 +794,7 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Bah("当前PONO已存在,请勿重复录入!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//版本号
|
|
|
|
|
//版本号避免多人同时操作数据错乱
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(input.VERSION) && input.Id != 0)
|
|
|
|
|
{
|
|
|
|
|
var et = await _rep.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.VERSION == input.VERSION && x.Id == input.Id).FirstAsync();
|
|
|
|
@ -801,6 +804,7 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var entity = input.Adapt<BookingOrder>();
|
|
|
|
|
//存在船名航次引入船期数据
|
|
|
|
|
if (!string.IsNullOrEmpty(input.VESSEL) && !string.IsNullOrEmpty(input.VOYNO))
|
|
|
|
|
{
|
|
|
|
|
var vesselInfo = _vesselInfo.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.TenantId == UserManager.UserId && x.Vessel == input.VESSEL && x.Voyno == input.VESSEL && x.ATD != null).ToList().FirstOrDefault();
|
|
|
|
@ -812,6 +816,7 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//判断是否订阅运踪目的港起运港标识
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.MBLNO))
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CARRIERID) && !string.IsNullOrEmpty(entity.YARDID))
|
|
|
|
@ -898,7 +903,7 @@ namespace Myshipping.Application
|
|
|
|
|
var mlist = await _rep.AsQueryable().Filter(null, true).Where(x => x.Id == input.Id).FirstAsync();
|
|
|
|
|
var rightlist = await _right.GetDataScopeList(MenuConst.MenuBookingOrder, true);
|
|
|
|
|
_logger.LogInformation("保存权限范围:"+rightlist.ToJsonString());
|
|
|
|
|
|
|
|
|
|
//除现有配置权限外 操作和本人具有编辑权限
|
|
|
|
|
if (rightlist!=null&&!(
|
|
|
|
|
mlist.OPID == UserManager.UserId.ToString() || mlist.OP == UserManager.Name.ToString() ||
|
|
|
|
|
mlist.DOCID == UserManager.UserId.ToString() || mlist.DOC == UserManager.Name.ToString() ||
|
|
|
|
|