Procházet zdrojové kódy

通话记录查询中部门添加全部选项

mengjie %!s(int64=8) %!d(string=před) roky
rodič
revize
f1ccdbc52e

+ 7 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs

@@ -165,7 +165,14 @@ namespace CallCenterApi.Interface.Controllers
165 165
 
166 166
                 if (modelList != null) {
167 167
                     if (modelList.Count > 0)
168
+                    {
169
+                        modelList.Insert(0, new Model.TreeModel
170
+                        {
171
+                            id = "-1",
172
+                            text = "全部"
173
+                        });
168 174
                         return Success("加载成功", modelList);
175
+                    }
169 176
                 }
170 177
                 return Error("加载失败");
171 178
             }

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

@@ -75,7 +75,7 @@ namespace CallCenterApi.Interface.Controllers.tel
75 75
                 {
76 76
                     sql += " and UserCode='" + usercode + "'";
77 77
                 }
78
-                if (dept != null && dept.Trim() != "")
78
+                if (dept != null && dept.Trim() != "" && Convert.ToInt32(dept) >= 0)
79 79
                 {
80 80
                     sql += " and UserCode in (select F_UserCode from T_Sys_UserAccount where F_DeptId=" + dept.Trim() + ")";
81 81
                 }