修改易通截单

usertest
jianghaiqing 2 months ago
parent 13144a9ae6
commit 782136f26b

@ -431,6 +431,11 @@ namespace DS.WMS.Core.Op.EDI
}
}
if (!new string[] { "ORI", "TER", "EXP" }.Contains(headData.ISSUETYPE))
{
error = error + "<br />提单号:" + headData.MBLNO + "签单方式未识别";
}
if (string.IsNullOrEmpty(headData.DESCRIPTION))
{
error = error + "<br />提单号:" + headData.MBLNO + " 货物描述不能为空";
@ -831,15 +836,20 @@ namespace DS.WMS.Core.Op.EDI
}
else ISSUETYPE = "EXP";
*/
if (bill.ISSUETYPE == "ORIGINAL")
{
ISSUETYPE = "ORI";
}
else if (bill.ISSUETYPE == "TELEX")
//if (bill.ISSUETYPE == "ORIGINAL")
//{
// ISSUETYPE = "ORI";
//}
//else if (bill.ISSUETYPE == "TELEX")
//{
// ISSUETYPE = "TER";
//}
//else ISSUETYPE = "EXP";
if(new string[] { "ORI", "TER", "EXP" }.Contains(bill.ISSUETYPE))
{
ISSUETYPE = "TER";
ISSUETYPE = bill.ISSUETYPE;
}
else ISSUETYPE = "EXP";
r.WriteLine("03:" + ISSUETYPE + ":" + bill.ISSUEPLACEID.Trim() + ":" + bill.ISSUEPLACE.Trim() + ":" + GetDateStr(bill.ISSUEDATE, "yyyyMMdd") + ":" + GetBillNum2(bill.NOBILL) + ":" + bill.PREPARDAT + ":" + bill.PAYABLEAT + "'");
icount++;

@ -1383,12 +1383,19 @@ namespace DS.WMS.Core.Op.Method
#region 签单方式EDI
////签单方式EDI
if (!string.IsNullOrWhiteSpace(order.IssueType))
if (!string.IsNullOrWhiteSpace(order.IssueTypeCode))
{
long issueTypeId = long.Parse(order.IssueType);
//long issueTypeId = long.Parse(order.IssueType);
var codeIssue = tenantDb.Queryable<CodeIssueType>().First(t => t.EdiCode == order.IssueTypeCode);
if (codeIssue == null)
{
return DataResult<string>.Failed($"签单方式{order.IssueTypeCode}的基础代码未找到");
}
var mapInfo = tenantDb.Queryable<MappingIssueType>()
.First(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase) && t.CarrierId == order.CarrierId && t.Id == issueTypeId);
.First(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase) && t.CarrierId == order.CarrierId && t.LinkId == codeIssue.Id);
if (mapInfo != null)
{
@ -1397,15 +1404,13 @@ namespace DS.WMS.Core.Op.Method
else
{
//签单方式EDI
var codeService = tenantDb.Queryable<CodeIssueType>().First(x => x.Status == StatusEnum.Enable && x.Id == issueTypeId);
if (codeService != null && !string.IsNullOrWhiteSpace(codeService.EdiCode))
if (codeIssue != null && !string.IsNullOrWhiteSpace(codeIssue.EdiCode))
{
primaryModel.ISSUETYPE = codeService.EdiCode;
primaryModel.ISSUETYPE = codeIssue.EdiCode;
}
else
{
return DataResult<string>.Failed($"签单方式{order.Service}的基础代码未找到");
return DataResult<string>.Failed($"签单方式{order.Service}的基础代码 EdiCode 未配置");
}
}
}
@ -1512,7 +1517,7 @@ namespace DS.WMS.Core.Op.Method
primaryModel.EDIATTNEMAIL = ediExtModel.EDIAttnMail;
if (string.IsNullOrWhiteSpace(primaryModel.EDIATTNEMAIL))
if (string.IsNullOrWhiteSpace(primaryModel.EDIATTNEMAIL) && ediRouteEnum != EDIRouteEnum.YT)
{
primaryModel.EDIATTNEMAIL = ftpSet.SendEmail;
}

Loading…
Cancel
Save