|
|
|
@ -612,6 +612,7 @@ namespace DSWeb.Service.Output.DS7
|
|
|
|
|
|
|
|
|
|
var SOURCEOP = "";
|
|
|
|
|
var 费用标准结算对象 = "";
|
|
|
|
|
var 船代 = "";
|
|
|
|
|
|
|
|
|
|
var custEdi = dS7Data.CodeCustEdi.AsNoTracking().FirstOrDefault(x => x.EDINAME == "DJY_OUTPUT" && x.EDICODE == WeiTuoFaSongFang);
|
|
|
|
|
if (custEdi != null)
|
|
|
|
@ -619,7 +620,10 @@ namespace DSWeb.Service.Output.DS7
|
|
|
|
|
费用标准结算对象 = custEdi.CUST;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var 船代Edi= dS7Data.CodeCustEdi.AsNoTracking().FirstOrDefault(x => x.EDINAME == "DJY_OUTPUT" && x.EDICODE == _edi.FORWARDER);
|
|
|
|
|
if (船代Edi != null) {
|
|
|
|
|
船代 = 船代Edi.CUST;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//如果大简云业务中的【订舱编号】空着,则用大简云舱单界面的【委托发送方】 ,寻找EDI代码设置中的EDICODE =【委托发送方】 EDINAME = 大简云的客户 填入【委托单位】字段的内容
|
|
|
|
|
|
|
|
|
@ -666,6 +670,8 @@ namespace DSWeb.Service.Output.DS7
|
|
|
|
|
SOURCEOP = orderinfo[1];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var 委托单位 = dS7Data.InfoClient.FirstOrDefault(x => x.SHORTNAME == CUSTOMERNAME);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (op_other == null || op_other.BSNO == null || op_other.BSNO == "")
|
|
|
|
|
{
|
|
|
|
@ -699,12 +705,12 @@ namespace DSWeb.Service.Output.DS7
|
|
|
|
|
FEESTATUS = false,
|
|
|
|
|
MBLNO = MBLNO,
|
|
|
|
|
HBLNO = "",
|
|
|
|
|
CUSTOMERNAME = CUSTOMERNAME,
|
|
|
|
|
CUSTOMERNAME2=WeiTuoFaSongFang,//20230313-大简云舱单界面的【委托发送方】录入东胜系统的实际客户,
|
|
|
|
|
CUSTOMERNAME = 委托单位.SHORTNAME,
|
|
|
|
|
CUSTOMERNAME2 = WeiTuoFaSongFang,//20230313-大简云舱单界面的【委托发送方】录入东胜系统的实际客户,
|
|
|
|
|
//CARRIER
|
|
|
|
|
BSDATE = DateTime.Today,
|
|
|
|
|
ACCDATE = DateTime.Now.ToString("yyyy-MM"),
|
|
|
|
|
BSSOURCE = "",
|
|
|
|
|
BSSOURCE = 委托单位.BSSOURCE,
|
|
|
|
|
OP = opUser.SHOWNAME,
|
|
|
|
|
CUSTSERVICE = opUser.SHOWNAME,
|
|
|
|
|
SALE = opUser.SHOWNAME,
|
|
|
|
@ -713,11 +719,12 @@ namespace DSWeb.Service.Output.DS7
|
|
|
|
|
//SR2023011000005
|
|
|
|
|
PORTLOAD = _edi.PORTLOAD,//装货港
|
|
|
|
|
PORTDISCHARGE = _edi.PORTDISCHARGE,//卸货港
|
|
|
|
|
PKGS= PKGS,
|
|
|
|
|
KGS= KGS,
|
|
|
|
|
NETWEIGHT=0,
|
|
|
|
|
CBM= CBM,
|
|
|
|
|
SOURCEOP= SOURCEOP
|
|
|
|
|
PKGS = PKGS,
|
|
|
|
|
KGS = KGS,
|
|
|
|
|
NETWEIGHT = 0,
|
|
|
|
|
CBM = CBM,
|
|
|
|
|
SOURCEOP = SOURCEOP,
|
|
|
|
|
SHIPAGENT = 船代
|
|
|
|
|
};
|
|
|
|
|
//,DUIYUEHAO = 对账约号
|
|
|
|
|
//20230317 对账约号存于opLogic
|
|
|
|
@ -877,6 +884,10 @@ namespace DSWeb.Service.Output.DS7
|
|
|
|
|
|
|
|
|
|
//查询配置,生成应收
|
|
|
|
|
var fee = dS7Data.CustFeeTemplateDetail.AsNoTracking().FirstOrDefault(x => x.CUSTOMERNAME == 费用标准结算对象 && x.FEENAME == FeeShouName);
|
|
|
|
|
if (fee == null) {
|
|
|
|
|
fee = dS7Data.CustFeeTemplateDetail.AsNoTracking().FirstOrDefault(x => x.CUSTOMERNAME == 委托单位.SHORTNAME && x.FEENAME == FeeShouName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (fee != null )
|
|
|
|
|
{
|
|
|
|
|
var feeShou = new ChFee();
|
|
|
|
@ -943,6 +954,17 @@ namespace DSWeb.Service.Output.DS7
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (FeePayCustomerType == "船代") {
|
|
|
|
|
//20230327 改为:
|
|
|
|
|
//如应付对象类型为船代 则结算对象改为该业务的船代公司
|
|
|
|
|
|
|
|
|
|
FeePayCustomer = 船代;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var 分单号 = HBLNO;
|
|
|
|
|
if (string.IsNullOrWhiteSpace(HBLNO)) {
|
|
|
|
|
分单号 = MBLNO;
|
|
|
|
|
}
|
|
|
|
|
//应付
|
|
|
|
|
if (string.IsNullOrEmpty(HBLNO) && FeePayPrice>0) //主单才插入船代费用
|
|
|
|
|
{
|
|
|
|
@ -994,7 +1016,7 @@ namespace DSWeb.Service.Output.DS7
|
|
|
|
|
feeFu.ISACC = false;
|
|
|
|
|
feeFu.CUSTDUI = false;
|
|
|
|
|
|
|
|
|
|
feeFu.BXGID = HBLNO;
|
|
|
|
|
feeFu.BXGID = 分单号;
|
|
|
|
|
|
|
|
|
|
dS7Data.ChFee.Add(feeFu);
|
|
|
|
|
dS7Data.SaveChanges();
|
|
|
|
@ -1050,7 +1072,7 @@ namespace DSWeb.Service.Output.DS7
|
|
|
|
|
feeFuDJY.ISACC = false;
|
|
|
|
|
feeFuDJY.CUSTDUI = false;
|
|
|
|
|
|
|
|
|
|
feeFuDJY.BXGID = HBLNO;
|
|
|
|
|
feeFuDJY.BXGID = 分单号;
|
|
|
|
|
|
|
|
|
|
dS7Data.ChFee.Add(feeFuDJY);
|
|
|
|
|
|
|
|
|
|