20240718 和川接收大简云订舱同步,费用封帐时只更新部分指定字段

YingHang
ddlucky 4 months ago
parent 107c71d46d
commit 9368a43310

@ -1923,6 +1923,62 @@ SELECT @ps_BillNo as N'billno'";
var newhead = head.GetOpseae(); var newhead = head.GetOpseae();
//20230726 会计期间改为:如果有实际开船日期 ATD/预抵日期 则按实际开船日期计算,如果没有,则按当前日期计算
//如果费用封账
if (updrec. == "费用封帐")
{
//newhead.会计期间 = updrec.会计期间;
////newhead.ETD= updrec.ETD;
//newhead.预抵日期 = updrec.预抵日期;
////20230927 增加四个在费用封账状态下不更新的字段
//newhead.揽货人 = updrec.揽货人;
//newhead.委托单位 = updrec.委托单位;
//newhead.货代公司 = updrec.货代公司;//订舱代理
//newhead.船公司 = updrec.船公司;
//20240718 费用封账后
//大简云在东胜封账后 这些是可以改的收发通件重尺唛头EDI和 辅助字段 ,操作备注 单证备注 客服备注。除此之外的其他字段都不准更改东胜了
updrec. = newhead.;
updrec. = newhead.;
updrec. = newhead.;
updrec. = newhead.;
updrec. = newhead.;
updrec. = newhead.;
updrec. = newhead.;
updrec.EDI = newhead.EDI;
updrec. = newhead.;//单证备注
updrec. = newhead.;//操作备注
updrec. = newhead.;
updrec. = newhead.;
updrec. = newhead.;
updrec. = newhead.;
DS6Data.t_op_seae.AddOrUpdate(updrec);
#region AMS信息
//DS6Data = new DS6DataContext();
var amslist = DS6Data.t_op_ams.Where(x => x. == headid).ToList();
DS6Data.t_op_ams.RemoveRange(amslist);
var newamslist = head.GetAmsList(newhead);
DS6Data.t_op_ams.AddRange(newamslist);
mark = 1.12m;
DS6Data.SaveChanges();
//logger.Debug($"更新提单信息:{head.Id}");
#endregion
DS6Data.SaveChanges();
}
else {
//过滤权限 20230421 正式使用后不做人员限制 //过滤权限 20230421 正式使用后不做人员限制
//var cando = 人员是否具备权限(newhead.录入人, "776"); //var cando = 人员是否具备权限(newhead.录入人, "776");
//if (!cando) //if (!cando)
@ -1937,6 +1993,8 @@ SELECT @ps_BillNo as N'billno'";
//newhead.ETD = updrec.ETD; //newhead.ETD = updrec.ETD;
//newhead.开船日期= updrec.开船日期; //newhead.开船日期= updrec.开船日期;
//20240718 非 费用封账 采用原有逻辑
newhead. = updrec.; newhead. = updrec.;
newhead. = updrec.; newhead. = updrec.;
@ -1944,22 +2002,6 @@ SELECT @ps_BillNo as N'billno'";
//newhead.业务状态 = updrec.业务状态; //newhead.业务状态 = updrec.业务状态;
newhead. = updrec.; newhead. = updrec.;
//20230726 会计期间改为:如果有实际开船日期 ATD/预抵日期 则按实际开船日期计算,如果没有,则按当前日期计算
//如果费用封账
if (updrec. == "费用封帐") {
newhead. = updrec.;
//newhead.ETD= updrec.ETD;
newhead. = updrec.;
//20230927 增加四个在费用封账状态下不更新的字段
newhead. = updrec.;
newhead. = updrec.;
newhead. = updrec.;//订舱代理
newhead. = updrec.;
//newhead.三
}
newhead. = string.IsNullOrWhiteSpace(head.mblno) ? updrec. : head.mblno; newhead. = string.IsNullOrWhiteSpace(head.mblno) ? updrec. : head.mblno;
newhead. = updrec.; newhead. = updrec.;
newhead. = updrec.; newhead. = updrec.;
@ -1971,7 +2013,8 @@ SELECT @ps_BillNo as N'billno'";
//20230803 根据马静怡的要求 //20230803 根据马静怡的要求
//在同步时 如果目的港ETA为空 则不用空值更新东胜的ETA当前值 //在同步时 如果目的港ETA为空 则不用空值更新东胜的ETA当前值
if (newhead.ETA == null) { if (newhead.ETA == null)
{
newhead.ETA = updrec.ETA; newhead.ETA = updrec.ETA;
} }
@ -2045,7 +2088,7 @@ SELECT @ps_BillNo as N'billno'";
#endregion #endregion
#region 提单信息 #region AMS信息
DS6Data = new DS6DataContext(); DS6Data = new DS6DataContext();
var amslist = DS6Data.t_op_ams.Where(x => x. == headid).ToList(); var amslist = DS6Data.t_op_ams.Where(x => x. == headid).ToList();
DS6Data.t_op_ams.RemoveRange(amslist); DS6Data.t_op_ams.RemoveRange(amslist);
@ -2160,6 +2203,11 @@ SELECT @ps_BillNo as N'billno'";
//DS6Data.SaveChanges(); //DS6Data.SaveChanges();
logger.Debug($"完成处理(更新){newhead.主提单号};{newhead.DJYID}"); logger.Debug($"完成处理(更新){newhead.主提单号};{newhead.DJYID}");
} }
}
else else
{ {
//新增业务 //新增业务

Loading…
Cancel
Save