修改包装映射编辑

usertest
jianghaiqing 3 months ago
parent 26e8871281
commit 2810ba2763

@ -75,7 +75,8 @@ namespace DS.WMS.Core.Map.Method
if (req.Id == 0)
{
if (tenantDb.Queryable<MappingPackage>().Where(x => x.LinkId == req.LinkId && x.Module == req.Module).Any())
if (tenantDb.Queryable<MappingPackage>().Where(x => x.LinkId == req.LinkId && x.Module == req.Module)
.WhereIF(req.CarrierId > 0, x => x.CarrierId != null && x.CarrierId.Value == req.CarrierId).Any())
{
return DataResult.Failed("包装映射信息已存在!", MultiLanguageConst.MappingPackageExist);
}

@ -2630,8 +2630,7 @@ namespace DS.WMS.Core.Op.Method
return DataResult<string>.FailedData(edi);
}
//优先判断跟船公司设置包装映射,如果没有取默认映射
var mapPackageInfo = tenantDb.Queryable<MappingPackage>()
.First(a => a.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase) && a.CarrierId == carrierId && a.LinkId == packageCodeId);

Loading…
Cancel
Save