列表列设置定位到个人

dev
cjy 3 weeks ago
parent 1e1837b9ed
commit c3d24d3540

@ -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<CodeColumnSet>()
.Where(x => x.ColumnNo == req.ColumnNo && x.PermissionId == req.PermissionId
&& x.CreateBy == long.Parse(user.UserId) && x.Id != req.Id).Any())
{
if (tenantDb.Queryable<CodeColumnSet>()
.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<CodeColumnSet>();
data.DefaultContent = req.Content;
@ -89,7 +89,7 @@ namespace DS.WMS.Core.Code.Method
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<CodeColumnSet>()
.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<ColumnSetRes>()
.First();
return DataResult<ColumnSetRes>.Success(data, MultiLanguageConst.DataQuerySuccess);

Loading…
Cancel
Save