|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|