修改映射编辑

usertest
jianghaiqing 3 months ago
parent 74871292d2
commit 297d131ad1

@ -71,7 +71,9 @@ namespace DS.WMS.Core.Map.Method
if (req.Id == 0)
{
if (tenantDb.Queryable<MappingFrt>().Where(x => x.LinkId == req.LinkId && x.Module == req.Module).Any())
if (tenantDb.Queryable<MappingFrt>().Where(x => x.LinkId == req.LinkId && x.Module == req.Module)
.WhereIF(req.CarrierId > 0, x => x.CarrierId != null && x.CarrierId.Value == req.CarrierId)
.WhereIF(req.CarrierId == 0, x => x.CarrierId == null || x.CarrierId.Value == 0).Any())
{
return DataResult.Failed("付款方式映射信息已存在!", MultiLanguageConst.MappingFrtExist);
}

@ -77,7 +77,10 @@ namespace DS.WMS.Core.Map.Method
if (req.Id == 0)
{
if (tenantDb.Queryable<MappingPort>().Where(x => x.LinkId == req.LinkId && x.Module == req.Module).Any())
if (tenantDb.Queryable<MappingPort>().Where(x => x.LinkId == req.LinkId && x.Module == req.Module)
.WhereIF(req.CarrierId > 0, x => x.CarrierId != null && x.CarrierId.Value == req.CarrierId)
.WhereIF(req.CarrierId == 0, x => x.CarrierId == null || x.CarrierId.Value == 0)
.Any())
{
return DataResult.Failed("港口映射信息已存在!", MultiLanguageConst.MappingPortExist);
}

@ -71,7 +71,9 @@ namespace DS.WMS.Core.Map.Method
if (req.Id == 0)
{
if (tenantDb.Queryable<MappingService>().Where(x => x.LinkId == req.LinkId && x.Module == req.Module).Any())
if (tenantDb.Queryable<MappingService>().Where(x => x.LinkId == req.LinkId && x.Module == req.Module)
.WhereIF(req.CarrierId > 0, x => x.CarrierId != null && x.CarrierId.Value == req.CarrierId)
.WhereIF(req.CarrierId == 0, x => x.CarrierId == null || x.CarrierId.Value == 0).Any())
{
return DataResult.Failed("运输条款映射信息已存在!", MultiLanguageConst.MappingServiceExist);
}

Loading…
Cancel
Save