|
|
@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq;
|
|
|
|
using DS.Module.Core.Helpers;
|
|
|
|
using DS.Module.Core.Helpers;
|
|
|
|
using Org.BouncyCastle.Ocsp;
|
|
|
|
using Org.BouncyCastle.Ocsp;
|
|
|
|
using static AnyDiff.DifferenceLines;
|
|
|
|
using static AnyDiff.DifferenceLines;
|
|
|
|
|
|
|
|
using static DS.WMS.Core.Op.Method.SeaExportTestService;
|
|
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.Op.Method
|
|
|
|
namespace DS.WMS.Core.Op.Method
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -223,6 +224,16 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
if (req.CtnInfo.IsNotNull() && req.CtnInfo.Count > 0)
|
|
|
|
if (req.CtnInfo.IsNotNull() && req.CtnInfo.Count > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var ctnList = tenantDb.Queryable<SeaExportShippingBillCtn>().Where(x => x.Pid == req.Id).ToList();
|
|
|
|
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)
|
|
|
|
foreach (var item in req.CtnInfo)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (item.Id == 0)
|
|
|
|
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);
|
|
|
|
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|