|
|
|
@ -1930,52 +1930,53 @@ SELECT @ps_BillNo as N'billno'";
|
|
|
|
|
#region 箱信息
|
|
|
|
|
var Currctnlist = DS6Data.t_op_ctn.Where(x => x.编号 == headid).ToList();
|
|
|
|
|
var ctn_addlist = new List<t_op_ctn_md>();
|
|
|
|
|
var ctn_updlist = new List<t_op_ctn_md>();
|
|
|
|
|
//var ctn_updlist = new List<t_op_ctn_md>();
|
|
|
|
|
var ctn_dellist = new List<t_op_ctn_md>();
|
|
|
|
|
|
|
|
|
|
var newctnList = head.GetCtnList(newhead.编号);
|
|
|
|
|
|
|
|
|
|
foreach (var ctn in newctnList)
|
|
|
|
|
{
|
|
|
|
|
if (Currctnlist.Exists(x => x.DJYCTNID == ctn.DJYCTNID))
|
|
|
|
|
{
|
|
|
|
|
var currctn = Currctnlist.First(x => x.DJYCTNID == ctn.DJYCTNID);
|
|
|
|
|
DingCangHead.GetCtn(ref currctn, ctn);
|
|
|
|
|
|
|
|
|
|
ctn_updlist.Add(currctn);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ctn_addlist.Add(ctn);
|
|
|
|
|
}
|
|
|
|
|
//if (Currctnlist.Exists(x => x.DJYCTNID == ctn.DJYCTNID))
|
|
|
|
|
//{
|
|
|
|
|
// var currctn = Currctnlist.First(x => x.DJYCTNID == ctn.DJYCTNID);
|
|
|
|
|
// DingCangHead.GetCtn(ref currctn, ctn);
|
|
|
|
|
|
|
|
|
|
// ctn_updlist.Add(currctn);
|
|
|
|
|
//}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
ctn_addlist.Add(ctn);
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach (var oldctn in Currctnlist)
|
|
|
|
|
{
|
|
|
|
|
if (newctnList.Exists(x => x.DJYCTNID == oldctn.DJYCTNID))
|
|
|
|
|
{
|
|
|
|
|
//if (newctnList.Exists(x => x.DJYCTNID == oldctn.DJYCTNID))
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
ctn_dellist.Add(oldctn);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (ctn_addlist.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
DS6Data.t_op_ctn.AddRange(ctn_addlist);
|
|
|
|
|
}
|
|
|
|
|
if (ctn_updlist.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var updctn in ctn_updlist)
|
|
|
|
|
{
|
|
|
|
|
DS6Data.t_op_ctn.AddOrUpdate(updctn);
|
|
|
|
|
}
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
if (ctn_dellist.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
DS6Data.t_op_ctn.RemoveRange(ctn_dellist);
|
|
|
|
|
}
|
|
|
|
|
if (ctn_addlist.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
DS6Data.t_op_ctn.AddRange(ctn_addlist);
|
|
|
|
|
}
|
|
|
|
|
//if (ctn_updlist.Count > 0)
|
|
|
|
|
//{
|
|
|
|
|
// foreach (var updctn in ctn_updlist)
|
|
|
|
|
// {
|
|
|
|
|
// DS6Data.t_op_ctn.AddOrUpdate(updctn);
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 提单信息
|
|
|
|
|