|
|
|
@ -1605,23 +1605,34 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
return DataResult<string>.Failed($"箱型{conta.CtnAll}的映射数据代码未找到");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(conta.KindPkgs))
|
|
|
|
|
//截单时箱的包装必填
|
|
|
|
|
if (string.IsNullOrWhiteSpace(conta.KindPkgs) && req.SendType.Equals("E",StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
return DataResult<string>.Failed($"集装箱包装不能为空!");
|
|
|
|
|
|
|
|
|
|
long packageId = long.Parse(conta.KindPkgs);
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(conta.KindPkgs))
|
|
|
|
|
{
|
|
|
|
|
long packageId = long.Parse(conta.KindPkgs);
|
|
|
|
|
|
|
|
|
|
var mapRlt = GetPackageEDICode(packageId, codePackageList, mapPackageList, order.CarrierId, CONST_MAPPING_MODULE);
|
|
|
|
|
var mapRlt = GetPackageEDICode(packageId, codePackageList, mapPackageList, order.CarrierId, CONST_MAPPING_MODULE);
|
|
|
|
|
|
|
|
|
|
if (codePackageList.Any(b => b.Id == packageId))
|
|
|
|
|
contaModel.KINDPKGS = codePackageList.FirstOrDefault(b => b.Id == packageId).PackageName;
|
|
|
|
|
if (codePackageList.Any(b => b.Id == packageId))
|
|
|
|
|
contaModel.KINDPKGS = codePackageList.FirstOrDefault(b => b.Id == packageId).PackageName;
|
|
|
|
|
|
|
|
|
|
if (mapRlt.Succeeded)
|
|
|
|
|
{
|
|
|
|
|
contaModel.KINDPKGS_EDI_CODE = mapRlt.Data;
|
|
|
|
|
if (mapRlt.Succeeded)
|
|
|
|
|
{
|
|
|
|
|
contaModel.KINDPKGS_EDI_CODE = mapRlt.Data;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return DataResult<string>.Failed($"集装箱【{conta.CntrNo}】包装{conta.KindPkgs}的映射数据代码未找到");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return DataResult<string>.Failed($"包装{order.KindPkgs}的映射数据代码未找到");
|
|
|
|
|
if(req.SendType.Equals("E", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
return DataResult<string>.Failed($"集装箱【{conta.CntrNo}】包装{conta.KindPkgs} 不能为空");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
primaryModel.CTNLIST.Add(contaModel);
|
|
|
|
@ -2606,11 +2617,16 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(mapCtnInfo.MapCode))
|
|
|
|
|
return DataResult<string>.Success(mapCtnInfo.MapCode);
|
|
|
|
|
|
|
|
|
|
return DataResult<string>.FailedData(mapCtnInfo.MapCode);
|
|
|
|
|
throw new Exception($"集装箱型 {ctnName}的映射代码未找到");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
throw new Exception($"集装箱型 {ctnName}的映射代码未找到");
|
|
|
|
|
if (codeCtnInfo != null && !string.IsNullOrWhiteSpace(codeCtnInfo.EdiCode))
|
|
|
|
|
{
|
|
|
|
|
return DataResult<string>.Success(codeCtnInfo.EdiCode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
throw new Exception($"集装箱型 {ctnName}基础代码EDI 错误");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|