舱单集装箱保存修改

dev
cjy 2 weeks ago
parent 41c7ada82e
commit ccb267e853

@ -177,7 +177,7 @@ public partial class SeaExportService : ISeaExportService
};
var statusLog = await tenantDb.Queryable<BookingStatusLog>().ToListAsync();
var statusLog = await tenantDb.Queryable<BookingStatusLog>().Where( x=> x.Status == "提箱" || x.Status == "返场").ToListAsync();
var statusLogDetails = await tenantDb.Queryable<BookingStatusLogDetail>().ToListAsync();
foreach (var item in data.Data)
{
@ -501,6 +501,14 @@ public partial class SeaExportService : ISeaExportService
}
}
else //删除
{
var ctnGoods = await tenantDb.Queryable<OpCtnGoods>().Where(x => x.BusinessId == req.Id).ToListAsync();
if (ctnGoods.IsNotNull() && ctnGoods.Count > 0)
{
tenantDb.Deleteable(ctnGoods).ExecuteCommand();
}
}
_logger.Info("执行完订单多品名信息");
#region 241010更新分单 单分单时,后续主单件重尺更新时,分单自动更新,多票分单时不更新;

@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq;
using DS.Module.Core.Helpers;
using Org.BouncyCastle.Ocsp;
using static AnyDiff.DifferenceLines;
using static DS.WMS.Core.Op.Method.SeaExportTestService;
namespace DS.WMS.Core.Op.Method
{
@ -223,6 +224,16 @@ namespace DS.WMS.Core.Op.Method
if (req.CtnInfo.IsNotNull() && req.CtnInfo.Count > 0)
{
var ctnList = tenantDb.Queryable<SeaExportShippingBillCtn>().Where(x => x.Pid == req.Id).ToList();
var existCtns = ctnList.Select(x => x.Id);
var reqCtns = req.CtnInfo.Where(x => x.Id != 0).Select(x => x.Id);
//删除
IEnumerable<long> delCtns = existCtns.AsQueryable().Except(reqCtns);
if (delCtns.Count() > 0)
{
tenantDb.Deleteable<SeaExportShippingBillCtn>()
.Where(it => it.Pid == info.Id && delCtns.Contains(it.Id))
.ExecuteCommand();
}
foreach (var item in req.CtnInfo)
{
if (item.Id == 0)
@ -240,6 +251,14 @@ namespace DS.WMS.Core.Op.Method
}
}
else //删除
{
var ctnList = tenantDb.Queryable<SeaExportShippingBillCtn>().Where(x => x.Pid == req.Id).ToList();
if (ctnList.IsNotNull() && ctnList.Count > 0)
{
tenantDb.Deleteable(ctnList).ExecuteCommand();
}
}
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);
}
}

Loading…
Cancel
Save