|
|
|
@ -1120,6 +1120,12 @@ namespace Myshipping.Application
|
|
|
|
|
foreach (var ar in arr)
|
|
|
|
|
{
|
|
|
|
|
long Id = Convert.ToInt64(ar);
|
|
|
|
|
var order = _rep.AsQueryable().Filter(null, true).Where(x => x.Id = Id).First();
|
|
|
|
|
var et = await _rep.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.MBLNO == order.MBLNO && x.TenantId == UserManager.TENANT_ID && x.ParentId == 0 && x.Id != Id).FirstAsync();
|
|
|
|
|
if (et != null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("当前主提单号已存在,无法恢复!");
|
|
|
|
|
}
|
|
|
|
|
var ctnlist = await _repCtn.AsQueryable().Where(x => x.BILLID == Id).Select(x => x.Id).ToListAsync();
|
|
|
|
|
await _repCtn.UpdateAsync(x => x.BILLID == Id, x => new BookingCtn { IsDeleted = false });
|
|
|
|
|
await _ctndetailrep.UpdateAsync(x => ctnlist.Contains((long)x.CTNID), x => new BookingCtnDetail { IsDeleted = false });
|
|
|
|
@ -1128,17 +1134,11 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
await SendBookingOrder(new long[] { Id });
|
|
|
|
|
_logger.LogInformation(Id + "恢复删除成功!");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//try
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// SendBookingOrder(Id);
|
|
|
|
|
// const string MqActionExchangeName = "djy.output.dingcang.ds6";
|
|
|
|
|
// const string MqActionQueueName = "djy.output.dingcang.ds6_recoverdelete";
|
|
|
|
|