|
|
@ -2306,6 +2306,10 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 通过租户参数判断这一票的租户是否启用了舱位引入功能
|
|
|
|
|
|
|
|
var isCancelAllocationSlot = tenantParamList.FirstOrDefault(x => x.TenantId == order.TenantId && x.ParaCode == TenantParamCode.ENABLE_SLOT_ABILITY)?.ItemCode;
|
|
|
|
|
|
|
|
|
|
|
|
var mblno = order.MBLNO;
|
|
|
|
var mblno = order.MBLNO;
|
|
|
|
|
|
|
|
|
|
|
|
// 将待删除的订舱单id存放到Cache中。目的:使用SendBookingOrder()推送订舱单数据前通过Cache判断是否正在走删除逻辑,来决定是否推送(如果是正在处理删除逻辑的数据,则不推送)
|
|
|
|
// 将待删除的订舱单id存放到Cache中。目的:使用SendBookingOrder()推送订舱单数据前通过Cache判断是否正在走删除逻辑,来决定是否推送(如果是正在处理删除逻辑的数据,则不推送)
|
|
|
@ -2349,6 +2353,12 @@ namespace Myshipping.Application
|
|
|
|
// 取消订阅运踪
|
|
|
|
// 取消订阅运踪
|
|
|
|
waitUnsubscribeBilltrace.Add(new BillTraceUnsubscribeList(Id.ToString(), mblno));
|
|
|
|
waitUnsubscribeBilltrace.Add(new BillTraceUnsubscribeList(Id.ToString(), mblno));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isCancelAllocationSlot == "YES")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// 取消关联舱位
|
|
|
|
|
|
|
|
await CancelAllocationSlot(Id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 记录日志
|
|
|
|
// 记录日志
|
|
|
|
var newOrder = order.Adapt<BookingOrder>();
|
|
|
|
var newOrder = order.Adapt<BookingOrder>();
|
|
|
|
newOrder.IsDeleted = true;
|
|
|
|
newOrder.IsDeleted = true;
|
|
|
@ -2379,6 +2389,12 @@ namespace Myshipping.Application
|
|
|
|
// 取消订阅运踪
|
|
|
|
// 取消订阅运踪
|
|
|
|
waitUnsubscribeBilltrace.Add(new BillTraceUnsubscribeList(Id.ToString(), mblno));
|
|
|
|
waitUnsubscribeBilltrace.Add(new BillTraceUnsubscribeList(Id.ToString(), mblno));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isCancelAllocationSlot == "YES")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// 取消关联舱位
|
|
|
|
|
|
|
|
await CancelAllocationSlot(Id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 记录日志
|
|
|
|
// 记录日志
|
|
|
|
var newOrder = order.Adapt<BookingOrder>();
|
|
|
|
var newOrder = order.Adapt<BookingOrder>();
|
|
|
|
newOrder.IsDeleted = true;
|
|
|
|
newOrder.IsDeleted = true;
|
|
|
@ -4256,25 +4272,25 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string value = null;
|
|
|
|
string value = null;
|
|
|
|
|
|
|
|
|
|
|
|
var fieldType = item.Field.Split('.')[0].ToLower();
|
|
|
|
var destName = item.Field.Split('.')[0].ToLower();
|
|
|
|
var fieldProperty = item.Field.Split('.')[1];
|
|
|
|
var fieldName = item.Field.Split('.')[1];
|
|
|
|
if (fieldType == "order")
|
|
|
|
if (destName == "order" || destName == "suborder")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (order != null)
|
|
|
|
if (order != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
value = typeof(BookingOrder).GetProperty(fieldProperty).GetValue(order)?.ToString();
|
|
|
|
value = typeof(BookingOrder).GetProperty(fieldName).GetValue(order)?.ToString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (fieldType == "edi")
|
|
|
|
else if (destName == "edi")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (edi != null)
|
|
|
|
if (edi != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
value = typeof(BookingEDIExt).GetProperty(fieldProperty).GetValue(edi)?.ToString();
|
|
|
|
value = typeof(BookingEDIExt).GetProperty(fieldName).GetValue(edi)?.ToString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (fieldType == "userinfo")
|
|
|
|
else if (destName == "userinfo")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var propertyLower = fieldProperty.ToLower();
|
|
|
|
var propertyLower = fieldName.ToLower();
|
|
|
|
switch (propertyLower)
|
|
|
|
switch (propertyLower)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case "username":
|
|
|
|
case "username":
|
|
|
@ -4291,6 +4307,18 @@ namespace Myshipping.Application
|
|
|
|
value = null; break;
|
|
|
|
value = null; break;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (destName == "other")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var propertyLower = fieldName.ToLower();
|
|
|
|
|
|
|
|
switch (propertyLower)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
case "printdate":
|
|
|
|
|
|
|
|
value = DateTime.Now.ToString("yyyy-MM-dd");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
value = null; break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if (!string.IsNullOrWhiteSpace(value))
|
|
|
|
if (!string.IsNullOrWhiteSpace(value))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach (var itemTemp in group)
|
|
|
|
foreach (var itemTemp in group)
|
|
|
@ -4320,13 +4348,15 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var name = entity.Where(x => x.Row == _row && x.Column == _cellNum).Select(x => x.Field).FirstOrDefault();
|
|
|
|
var name = entity.Where(x => x.Row == _row && x.Column == _cellNum).Select(x => x.Field).FirstOrDefault();
|
|
|
|
|
|
|
|
|
|
|
|
if (name.Split('.')[0].ToLower() == "order")
|
|
|
|
var destName = name.Split('.')[0].ToLower();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (destName == "order" || destName == "suborder")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(order))
|
|
|
|
foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(order))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var _name = descriptor.Name.ToLower();
|
|
|
|
var _name = descriptor.Name.ToLower();
|
|
|
|
if (name.Split('.')[0].ToLower() == "order" && name.Split('.')[1].ToLower() == _name)
|
|
|
|
if (name.Split('.')[1].ToLower() == _name)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var value = descriptor.GetValue(order) != null ? descriptor.GetValue(order).ToString() : "";
|
|
|
|
var value = descriptor.GetValue(order) != null ? descriptor.GetValue(order).ToString() : "";
|
|
|
|
ICell cell = row.GetCell(_cellNum - 1);
|
|
|
|
ICell cell = row.GetCell(_cellNum - 1);
|
|
|
@ -4344,7 +4374,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (name.Split('.')[0].ToLower() == "order" && name.Split('.')[1].ToLower() == "_pkgs" && _name == "pkgs")
|
|
|
|
if (name.Split('.')[1].ToLower() == "_pkgs" && _name == "pkgs")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var value = string.Empty;
|
|
|
|
var value = string.Empty;
|
|
|
|
if (order.PKGS != null)
|
|
|
|
if (order.PKGS != null)
|
|
|
@ -4371,7 +4401,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (name.Split('.')[0].ToLower() == "order" && name.Split('.')[1].ToLower() == "_kgs" && _name == "kgs")
|
|
|
|
if (name.Split('.')[1].ToLower() == "_kgs" && _name == "kgs")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var value = string.Empty;
|
|
|
|
var value = string.Empty;
|
|
|
|
if (order.KGS != null)
|
|
|
|
if (order.KGS != null)
|
|
|
@ -4399,7 +4429,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (name.Split('.')[0].ToLower() == "order" && name.Split('.')[1].ToLower() == "_cbm" && _name == "cbm")
|
|
|
|
if (name.Split('.')[1].ToLower() == "_cbm" && _name == "cbm")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var value = string.Empty;
|
|
|
|
var value = string.Empty;
|
|
|
|
if (order.CBM != null)
|
|
|
|
if (order.CBM != null)
|
|
|
@ -4430,7 +4460,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (name.Split('.')[0].ToLower() == "edi")
|
|
|
|
if (destName == "edi")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(edi))
|
|
|
|
foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(edi))
|
|
|
@ -4458,7 +4488,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (name.Split('.')[0].ToLower() == "userinfo")
|
|
|
|
if (destName == "userinfo")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ICell cell = row.GetCell(_cellNum - 1);
|
|
|
|
ICell cell = row.GetCell(_cellNum - 1);
|
|
|
|
var value = string.Empty;
|
|
|
|
var value = string.Empty;
|
|
|
@ -4491,6 +4521,26 @@ namespace Myshipping.Application
|
|
|
|
row.CreateCell(_cellNum - 1).SetCellValue(value);
|
|
|
|
row.CreateCell(_cellNum - 1).SetCellValue(value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (destName == "other")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ICell cell = row.GetCell(_cellNum - 1);
|
|
|
|
|
|
|
|
var fieldName = name.Split('.')[1].ToLower();
|
|
|
|
|
|
|
|
var value = fieldName switch
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"printdate" => DateTime.Now.ToString("yyyy-MM-dd"),
|
|
|
|
|
|
|
|
_ => "",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (cell != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.Cells[_cellNum - 1].SetCellValue(value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.CreateCell(_cellNum - 1).SetCellValue(value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -4504,13 +4554,13 @@ namespace Myshipping.Application
|
|
|
|
if (entity.Where(x => x.Row == _row && x.Column == _cellNum).Count() > 0)
|
|
|
|
if (entity.Where(x => x.Row == _row && x.Column == _cellNum).Count() > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var name = entity.Where(x => x.Row == _row && x.Column == _cellNum).Select(x => x.Field).FirstOrDefault();
|
|
|
|
var name = entity.Where(x => x.Row == _row && x.Column == _cellNum).Select(x => x.Field).FirstOrDefault();
|
|
|
|
|
|
|
|
var destName = name.Split('.')[0].ToLower();
|
|
|
|
if (name.Split('.')[0].ToLower() == "order")
|
|
|
|
if (destName == "order" || destName == "suborder")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(order))
|
|
|
|
foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(order))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var _name = descriptor.Name.ToLower();
|
|
|
|
var _name = descriptor.Name.ToLower();
|
|
|
|
if (name.Split('.')[1].ToLower() == _name && name.Split('.')[0].ToLower() == "order")
|
|
|
|
if (name.Split('.')[1].ToLower() == _name)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var value = descriptor.GetValue(order) != null ? descriptor.GetValue(order).ToString() : "";
|
|
|
|
var value = descriptor.GetValue(order) != null ? descriptor.GetValue(order).ToString() : "";
|
|
|
|
if (descriptor.PropertyType.FullName.Contains("DateTime"))
|
|
|
|
if (descriptor.PropertyType.FullName.Contains("DateTime"))
|
|
|
@ -4522,7 +4572,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (name.Split('.')[0].ToLower() == "edi")
|
|
|
|
if (destName == "edi")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(edi))
|
|
|
|
foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(edi))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -4539,7 +4589,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (name.Split('.')[0].ToLower() == "userinfo")
|
|
|
|
if (destName == "userinfo")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var value = string.Empty;
|
|
|
|
var value = string.Empty;
|
|
|
@ -4567,6 +4617,18 @@ namespace Myshipping.Application
|
|
|
|
srow.CreateCell(_cellNum - 1).SetCellValue(value);
|
|
|
|
srow.CreateCell(_cellNum - 1).SetCellValue(value);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (destName == "other")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var fieldName = name.Split('.')[1].ToLower();
|
|
|
|
|
|
|
|
var value = fieldName switch
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"printdate" => DateTime.Now.ToString("yyyy-MM-dd"),
|
|
|
|
|
|
|
|
_ => "",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
srow.CreateCell(_cellNum - 1).SetCellValue(value);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -9680,16 +9742,24 @@ namespace Myshipping.Application
|
|
|
|
BookingCtn ctn = new BookingCtn();
|
|
|
|
BookingCtn ctn = new BookingCtn();
|
|
|
|
BookingEDIExt edi = new BookingEDIExt();
|
|
|
|
BookingEDIExt edi = new BookingEDIExt();
|
|
|
|
Dictionary<string, string> dic = new Dictionary<string, string>();
|
|
|
|
Dictionary<string, string> dic = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
Dictionary<string, string> dic4 = new Dictionary<string, string>();
|
|
|
|
foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(order))
|
|
|
|
foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(order))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string name = descriptor.Name;
|
|
|
|
string name = descriptor.Name;
|
|
|
|
if (name == "TenantId" || name == "CreatedTime" || name == "UpdatedTime" || name == "CreatedUserId" || name == "CreatedUserName")
|
|
|
|
if (name == "TenantId" || name == "CreatedTime" || name == "UpdatedTime" || name == "CreatedUserId")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (name == "CreatedUserName")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
dic.Add("order.CreatedUserName", "录入人");
|
|
|
|
|
|
|
|
dic4.Add("suborder.CreatedUserName", "录入人");
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
if (!string.IsNullOrWhiteSpace(descriptor.Description))
|
|
|
|
if (!string.IsNullOrWhiteSpace(descriptor.Description))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
dic.Add("order." + descriptor.Name, descriptor.Description);
|
|
|
|
dic.Add("order." + descriptor.Name, descriptor.Description);
|
|
|
|
|
|
|
|
dic4.Add("suborder." + descriptor.Name, descriptor.Description);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -9735,12 +9805,19 @@ namespace Myshipping.Application
|
|
|
|
dic3.Add("userinfo.useremail", "当前登录人邮箱");
|
|
|
|
dic3.Add("userinfo.useremail", "当前登录人邮箱");
|
|
|
|
dic3.Add("userinfo.usertenant", "当前登录人所在公司");
|
|
|
|
dic3.Add("userinfo.usertenant", "当前登录人所在公司");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dictionary<string, string> dic5 = new Dictionary<string, string>()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
{"other.PrintDate", "打印日期" }
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var dynamic = new
|
|
|
|
var dynamic = new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
order = dic,
|
|
|
|
order = dic,
|
|
|
|
ctn = dic1,
|
|
|
|
ctn = dic1,
|
|
|
|
edi = dic2,
|
|
|
|
edi = dic2,
|
|
|
|
userinfo = dic3
|
|
|
|
userinfo = dic3,
|
|
|
|
|
|
|
|
suborder = dic4,
|
|
|
|
|
|
|
|
other = dic5
|
|
|
|
};
|
|
|
|
};
|
|
|
|
return dynamic;
|
|
|
|
return dynamic;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -11805,10 +11882,22 @@ namespace Myshipping.Application
|
|
|
|
[HttpPost("/BookingOrder/CancelAllocationSlot")]
|
|
|
|
[HttpPost("/BookingOrder/CancelAllocationSlot")]
|
|
|
|
public async Task CancelAllocationSlot(long id)
|
|
|
|
public async Task CancelAllocationSlot(long id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var slotList = await _repSlotAllocation.AsQueryable().Where(a => a.BOOKING_ID == id).ToListAsync();
|
|
|
|
var slotList = await _repSlotAllocation.AsQueryable().Where(a => a.BOOKING_ID == id).Select(x => new
|
|
|
|
var slotIdList = slotList.Select(s => s.Id);
|
|
|
|
{
|
|
|
|
|
|
|
|
x.Id,
|
|
|
|
|
|
|
|
x.BOOKING_SLOT_TYPE,
|
|
|
|
|
|
|
|
x.CARRIERID,
|
|
|
|
|
|
|
|
x.CONTRACT_NO,
|
|
|
|
|
|
|
|
x.VESSEL,
|
|
|
|
|
|
|
|
x.VOYNO,
|
|
|
|
|
|
|
|
x.PLACERECEIPT,
|
|
|
|
|
|
|
|
x.PLACEDELIVERY
|
|
|
|
|
|
|
|
}).ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
await _repSlotAllocation.Context.Updateable<BookingSlotAllocation>()
|
|
|
|
if (slotList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var slotIdList = slotList.Select(s => s.Id);
|
|
|
|
|
|
|
|
await _repSlotAllocation.Context.Updateable<BookingSlotAllocation>()
|
|
|
|
.SetColumns(a => a.IsDeleted == true)
|
|
|
|
.SetColumns(a => a.IsDeleted == true)
|
|
|
|
.SetColumns(a => a.UpdatedTime == DateTime.Now)
|
|
|
|
.SetColumns(a => a.UpdatedTime == DateTime.Now)
|
|
|
|
.SetColumns(a => a.UpdatedUserId == UserManager.UserId)
|
|
|
|
.SetColumns(a => a.UpdatedUserId == UserManager.UserId)
|
|
|
@ -11816,27 +11905,28 @@ namespace Myshipping.Application
|
|
|
|
.Where(a => slotIdList.Contains(a.Id))
|
|
|
|
.Where(a => slotIdList.Contains(a.Id))
|
|
|
|
.ExecuteCommandAsync();
|
|
|
|
.ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
await _repSlotAllocationCtn.Context.Updateable<BookingSlotAllocationCtn>()
|
|
|
|
await _repSlotAllocationCtn.Context.Updateable<BookingSlotAllocationCtn>()
|
|
|
|
.SetColumns(a => a.IsDeleted == true)
|
|
|
|
.SetColumns(a => a.IsDeleted == true)
|
|
|
|
.SetColumns(a => a.UpdatedTime == DateTime.Now)
|
|
|
|
.SetColumns(a => a.UpdatedTime == DateTime.Now)
|
|
|
|
.SetColumns(a => a.UpdatedUserId == UserManager.UserId)
|
|
|
|
.SetColumns(a => a.UpdatedUserId == UserManager.UserId)
|
|
|
|
.SetColumns(a => a.UpdatedUserName == UserManager.Name)
|
|
|
|
.SetColumns(a => a.UpdatedUserName == UserManager.Name)
|
|
|
|
.Where(a => slotIdList.Contains(a.SLOT_ALLOC_ID))
|
|
|
|
.Where(a => slotIdList.Contains(a.SLOT_ALLOC_ID))
|
|
|
|
.ExecuteCommandAsync();
|
|
|
|
.ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
// 更新库存
|
|
|
|
// 更新库存
|
|
|
|
foreach (var item in slotList)
|
|
|
|
foreach (var item in slotList)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
await _publisher.PublishAsync(new ChannelEventSource("BookingSlotStock:Update", new Event.BookingSlotStockUpdateModel
|
|
|
|
await _publisher.PublishAsync(new ChannelEventSource("BookingSlotStock:Update", new Event.BookingSlotStockUpdateModel
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BOOKING_SLOT_TYPE = item.BOOKING_SLOT_TYPE,
|
|
|
|
BOOKING_SLOT_TYPE = item.BOOKING_SLOT_TYPE,
|
|
|
|
CARRIERID = item.CARRIERID,
|
|
|
|
CARRIERID = item.CARRIERID,
|
|
|
|
CONTRACT_NO = item.CONTRACT_NO,
|
|
|
|
CONTRACT_NO = item.CONTRACT_NO,
|
|
|
|
VESSEL = item.VESSEL,
|
|
|
|
VESSEL = item.VESSEL,
|
|
|
|
VOYNO = item.VOYNO,
|
|
|
|
VOYNO = item.VOYNO,
|
|
|
|
PLACERECEIPT = item.PLACERECEIPT,
|
|
|
|
PLACERECEIPT = item.PLACERECEIPT,
|
|
|
|
PLACEDELIVERY = item.PLACEDELIVERY
|
|
|
|
PLACEDELIVERY = item.PLACEDELIVERY
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|