From c3d24d35402101e4d2faa3fbef87a2ba7f7ee584 Mon Sep 17 00:00:00 2001 From: cjy Date: Fri, 1 Nov 2024 17:41:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=88=97=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E5=88=B0=E4=B8=AA=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.Core/Code/Method/ColumnSetService.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/ColumnSetService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/ColumnSetService.cs index ea35af31..cf621eb4 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/ColumnSetService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/ColumnSetService.cs @@ -40,14 +40,14 @@ namespace DS.WMS.Core.Code.Method { var tenantDb = saasService.GetBizDbScopeById(user.TenantId); //var orgId = user.GetOrgId(); - if (req.Id == 0) + if (tenantDb.Queryable() + .Where(x => x.ColumnNo == req.ColumnNo && x.PermissionId == req.PermissionId + && x.CreateBy == long.Parse(user.UserId) && x.Id != req.Id).Any()) { - if (tenantDb.Queryable() - .Where(x => x.ColumnNo == req.ColumnNo && x.PermissionId == req.PermissionId).Any()) - { - return DataResult.Failed("列表字段设置已存在!", MultiLanguageConst.ColumnSetExist); - } - + return DataResult.Failed("列表字段设置已存在!", MultiLanguageConst.ColumnSetExist); + } + if (req.Id == 0) + { var data = req.Adapt(); data.DefaultContent = req.Content; @@ -89,7 +89,7 @@ namespace DS.WMS.Core.Code.Method { var tenantDb = saasService.GetBizDbScopeById(user.TenantId); var data = tenantDb.Queryable() - .Where(x => x.PermissionId == long.Parse(permissionId) && x.ColumnNo == columnNo && x.Status == StatusEnum.Enable) + .Where(x => x.PermissionId == long.Parse(permissionId) && x.ColumnNo == columnNo && x.CreateBy == long.Parse(user.UserId) && x.Status == StatusEnum.Enable) .Select() .First(); return DataResult.Success(data, MultiLanguageConst.DataQuerySuccess);