zhoufan лет назад: 4
Родитель
Сommit
c12965ba4f

+ 30 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DictionaryController.cs

@@ -103,6 +103,36 @@ namespace CallCenterApi.Interface.Controllers
103 103
 
104 104
         }
105 105
 
106
+
107
+        public ActionResult GetZTreeListNew()
108
+        {
109
+            DataTable dt = new DataTable();
110
+            string pid = HttpUtility.UrlDecode(RequestString.GetQueryString("pid"));
111
+            string sql = " and F_State=0 ";
112
+            if (pid.Trim() != "")
113
+            {
114
+                sql += " and F_PrentId=" + pid.Trim();
115
+            }
116
+            else
117
+            {
118
+                pid = "0";
119
+                sql += " and F_PrentId=0   ";
120
+            }
121
+
122
+            string sqltest = "     with cte(F_ValueId ,F_Value,F_PrentId) as(select F_ValueId ,F_Value,F_PrentId from T_Sys_DictionaryValue where 1 =1  " + sql + " UNION all select t.F_ValueId, t.F_Value,t.F_PrentId from T_Sys_DictionaryValue as t inner join cte as c on  c.F_ValueId = t.F_PrentId )select F_ValueId id,F_Value text,F_PrentId pId from cte  ";
123
+
124
+
125
+            var tab2 = DbHelperSQL.Query(sqltest).Tables[0];
126
+
127
+            if (tab2.Rows.Count > 0)
128
+            {
129
+                return Success("加载成功", tab2);
130
+            }
131
+            else
132
+                return Error("加载失败");
133
+
134
+        }
135
+
106 136
         #region 字典值操作
107 137
 
108 138
         //[Authority]