|
|
|
@ -1923,6 +1923,62 @@ SELECT @ps_BillNo as N'billno'";
|
|
|
|
|
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 正式使用后不做人员限制
|
|
|
|
|
//var cando = 人员是否具备权限(newhead.录入人, "776");
|
|
|
|
|
//if (!cando)
|
|
|
|
@ -1937,6 +1993,8 @@ SELECT @ps_BillNo as N'billno'";
|
|
|
|
|
//newhead.ETD = updrec.ETD;
|
|
|
|
|
//newhead.开船日期= updrec.开船日期;
|
|
|
|
|
|
|
|
|
|
//20240718 非 费用封账 采用原有逻辑
|
|
|
|
|
|
|
|
|
|
newhead.编号 = updrec.编号;
|
|
|
|
|
newhead.主编号 = updrec.主编号;
|
|
|
|
|
|
|
|
|
@ -1944,22 +2002,6 @@ SELECT @ps_BillNo as N'billno'";
|
|
|
|
|
//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.报关标准 = updrec.报关标准;
|
|
|
|
|
newhead.报检标准 = updrec.报检标准;
|
|
|
|
@ -1971,7 +2013,8 @@ SELECT @ps_BillNo as N'billno'";
|
|
|
|
|
|
|
|
|
|
//20230803 根据马静怡的要求
|
|
|
|
|
//在同步时 如果目的港ETA为空 则不用空值更新东胜的ETA当前值
|
|
|
|
|
if (newhead.ETA == null) {
|
|
|
|
|
if (newhead.ETA == null)
|
|
|
|
|
{
|
|
|
|
|
newhead.ETA = updrec.ETA;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2045,7 +2088,7 @@ SELECT @ps_BillNo as N'billno'";
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 提单信息
|
|
|
|
|
#region AMS信息
|
|
|
|
|
DS6Data = new DS6DataContext();
|
|
|
|
|
var amslist = DS6Data.t_op_ams.Where(x => x.编号 == headid).ToList();
|
|
|
|
|
DS6Data.t_op_ams.RemoveRange(amslist);
|
|
|
|
@ -2160,6 +2203,11 @@ SELECT @ps_BillNo as N'billno'";
|
|
|
|
|
//DS6Data.SaveChanges();
|
|
|
|
|
logger.Debug($"完成处理(更新):{newhead.主提单号};{newhead.DJYID}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//新增业务
|
|
|
|
|