update 树查询table 增加一个选项,可以在"只看本级"和"查看本级及以下"之间切换

新增用户时的一些格式验证
This commit is contained in:
2021-07-02 15:42:56 +08:00
parent 3725f586d2
commit 072aabdd22
6 changed files with 75 additions and 7 deletions

View File

@@ -82,7 +82,9 @@ WHERE 1=1";
if (!string.IsNullOrEmpty(input.SysEmpParam.OrgId))
{
sql += " AND (SO.Id = @OrgId OR SO.Pids Like CONCAT('%[', @OrgId, ']%'))";
var filter = " AND (SO.Id = @OrgId {0}) ";
filter = String.Format(filter, input.TreeNodeDataScope.GetValueOrDefault(1) == 2 ? " OR SO.Pids Like CONCAT('%[', @OrgId, ']%') " : "");
sql += filter;
param.Add("OrgId", input.SysEmpParam.OrgId);
}