浏览代码

增加筛选使用

zhengbingbing 6 年之前
父节点
当前提交
33eafbf458

+ 5 - 1
CallCenterApi.Interface/CallCenterApi.Interface.csproj

@@ -102,11 +102,13 @@
102 102
     <Compile Include="App_Start\ErrorAttribute.cs" />
103 103
     <Compile Include="App_Start\OutActionFilter.cs" />
104 104
     <Compile Include="App_Start\RouteConfig.cs" />
105
+    <Compile Include="Controllers\AreaController.cs" />
105 106
     <Compile Include="Controllers\Base\BaseController.cs" />
106 107
     <Compile Include="Controllers\County\CountyBranchController.cs" />
107 108
     <Compile Include="Controllers\County\CountyBusinessController.cs" />
108 109
     <Compile Include="Controllers\County\CountyTelController.cs" />
109 110
     <Compile Include="Controllers\DepartmentController.cs" />
111
+    <Compile Include="Controllers\DictionaryController.cs" />
110 112
     <Compile Include="Controllers\HomeController.cs" />
111 113
     <Compile Include="Controllers\InfoController.cs" />
112 114
     <Compile Include="Controllers\Login\LoginController.cs" />
@@ -139,6 +141,8 @@
139 141
     </None>
140 142
   </ItemGroup>
141 143
   <ItemGroup>
144
+    <Folder Include="Views\Area\" />
145
+    <Folder Include="Views\Dictionary\" />
142 146
     <Folder Include="Views\Info\" />
143 147
   </ItemGroup>
144 148
   <ItemGroup>
@@ -173,7 +177,7 @@
173 177
     <VisualStudio>
174 178
       <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
175 179
         <WebProjectProperties>
176
-          <UseIIS>True</UseIIS>
180
+          <UseIIS>False</UseIIS>
177 181
           <AutoAssignPort>True</AutoAssignPort>
178 182
           <DevelopmentServerPort>63662</DevelopmentServerPort>
179 183
           <DevelopmentServerVPath>/</DevelopmentServerVPath>

+ 53 - 0
CallCenterApi.Interface/Controllers/AreaController.cs

@@ -0,0 +1,53 @@
1
+using CallCenterApi.Common;
2
+using CallCenterApi.Interface.Controllers.Base;
3
+using System;
4
+using System.Collections.Generic;
5
+using System.Linq;
6
+using System.Web;
7
+using System.Web.Mvc;
8
+
9
+namespace CallCenterApi.Interface.Controllers
10
+{
11
+    public class AreaController : BaseController
12
+    {
13
+        /// <summary>
14
+        /// 获取区域列表
15
+        /// </summary>
16
+        /// <returns></returns>
17
+        public ActionResult GetAreaListById(string branchcode, int id = 0)
18
+        {
19
+            string sqlwhere = " F_IsDelete=0 ";
20
+            if (!string.IsNullOrEmpty(branchcode))
21
+            {
22
+                sqlwhere += " and F_Code='" + branchcode + "'";
23
+            }
24
+            else
25
+            {
26
+                return Error("请选择区县");
27
+            }
28
+            var list = new BLL.T_Branch_List().GetModelList(sqlwhere);
29
+            if (list.Count == 0)
30
+            {
31
+                return Error("查询失败");
32
+            }
33
+            if (id <= 0)
34
+            {
35
+                return Error("查询失败");
36
+            }
37
+
38
+            string controllername = RouteData.Values["controller"].ToString();
39
+            string actionname = RouteData.Values["action"].ToString();
40
+            if (!string.IsNullOrEmpty(list[0].F_Url))
41
+            {
42
+                string signcode = CommonHelper.getsigncode(controllername, actionname, list[0].F_Sign);
43
+                string strparams = "?id=" + id + "&signcode=" + signcode;
44
+                string result = HttpMethods.HttpGet(list[0].F_Url + "/" + controllername + "/" + actionname + strparams);
45
+                return Content(result);
46
+            }
47
+            else
48
+            {
49
+                return Error("查询失败");
50
+            }
51
+        }
52
+    }
53
+}

+ 32 - 0
CallCenterApi.Interface/Controllers/DepartmentController.cs

@@ -188,5 +188,37 @@ namespace CallCenterApi.Interface.Controllers
188 188
 
189 189
         #endregion
190 190
 
191
+        public ActionResult GetDeptList1(string branchcode)
192
+        {
193
+            string sqlwhere = " F_IsDelete=0 ";
194
+            if (!string.IsNullOrEmpty(branchcode))
195
+            {
196
+                sqlwhere += " and F_Code='" + branchcode + "'";
197
+            }
198
+            else
199
+            {
200
+                return Error("请选择区县");
201
+            }
202
+            var list = new BLL.T_Branch_List().GetModelList(sqlwhere);
203
+            if (list.Count == 0)
204
+            {
205
+                return Error("查询失败");
206
+            }
207
+
208
+            string controllername = RouteData.Values["controller"].ToString();
209
+            string actionname = RouteData.Values["action"].ToString();
210
+            if (!string.IsNullOrEmpty(list[0].F_Url))
211
+            {
212
+                string signcode = CommonHelper.getsigncode(controllername, actionname, list[0].F_Sign);
213
+                string strparams = "?signcode=" + signcode;
214
+                string result = HttpMethods.HttpGet(list[0].F_Url + "/" + controllername + "/" + actionname + strparams);
215
+                return Content(result);
216
+            }
217
+            else
218
+            {
219
+                return Error("查询失败");
220
+            }
221
+        }
222
+
191 223
     }
192 224
 }

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

@@ -0,0 +1,53 @@
1
+using CallCenterApi.Common;
2
+using CallCenterApi.Interface.Controllers.Base;
3
+using System;
4
+using System.Collections.Generic;
5
+using System.Linq;
6
+using System.Web;
7
+using System.Web.Mvc;
8
+
9
+namespace CallCenterApi.Interface.Controllers
10
+{
11
+    public class DictionaryController : BaseController
12
+    {
13
+        /// <summary>
14
+        /// 获取字典值列表
15
+        /// </summary>
16
+        /// <returns></returns>
17
+        public ActionResult GetDicValueListById(string branchcode,int id=0)
18
+        {
19
+            string sqlwhere = " F_IsDelete=0 ";
20
+            if (!string.IsNullOrEmpty(branchcode))
21
+            {
22
+                sqlwhere += " and F_Code='" + branchcode + "'";
23
+            }
24
+            else
25
+            {
26
+                return Error("请选择区县");
27
+            }
28
+            var list = new BLL.T_Branch_List().GetModelList(sqlwhere);
29
+            if (list.Count == 0)
30
+            {
31
+                return Error("查询失败");
32
+            }
33
+            if (id<=0)
34
+            {
35
+                return Error("查询失败");
36
+            }
37
+
38
+            string controllername = RouteData.Values["controller"].ToString();
39
+            string actionname = RouteData.Values["action"].ToString();
40
+            if (!string.IsNullOrEmpty(list[0].F_Url))
41
+            {
42
+                string signcode = CommonHelper.getsigncode(controllername, actionname, list[0].F_Sign);
43
+                string strparams = "?id=" + id + "&signcode=" + signcode;
44
+                string result = HttpMethods.HttpGet(list[0].F_Url + "/" + controllername + "/" + actionname + strparams);
45
+                return Content(result);
46
+            }
47
+            else
48
+            {
49
+                return Error("查询失败");
50
+            }
51
+        }
52
+    }
53
+}

+ 70 - 0
CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -247,5 +247,75 @@ namespace CallCenterApi.Interface.Controllers
247 247
                 return Error("重置密码失败");
248 248
 
249 249
         }
250
+
251
+
252
+        //获取坐席列表
253
+        public ActionResult GetSeatList(string branchcode)
254
+        {
255
+            string sqlwhere = " F_IsDelete=0 ";
256
+            if (!string.IsNullOrEmpty(branchcode))
257
+            {
258
+                sqlwhere += " and F_Code='" + branchcode + "'";
259
+            }
260
+            else
261
+            {
262
+                return Error("请选择区县");
263
+            }
264
+            var list = new BLL.T_Branch_List().GetModelList(sqlwhere);
265
+            if (list.Count == 0)
266
+            {
267
+                return Error("查询失败");
268
+            }
269
+            
270
+            string controllername = RouteData.Values["controller"].ToString();
271
+            string actionname = RouteData.Values["action"].ToString();
272
+            if (!string.IsNullOrEmpty(list[0].F_Url))
273
+            {
274
+                string signcode = CommonHelper.getsigncode(controllername, actionname, list[0].F_Sign);
275
+                string strparams = "?signcode=" + signcode;
276
+                string result = HttpMethods.HttpGet(list[0].F_Url + "/" + controllername + "/" + actionname + strparams);
277
+                return Content(result);
278
+            }
279
+            else
280
+            {
281
+                return Error("查询失败");
282
+            }
283
+        }
284
+        //根据角色获取用户
285
+        public ActionResult GetUsersList(string branchcode, string rolecode)
286
+        {
287
+            string sqlwhere = " F_IsDelete=0 ";
288
+            if (!string.IsNullOrEmpty(branchcode))
289
+            {
290
+                sqlwhere += " and F_Code='" + branchcode + "'";
291
+            }
292
+            else
293
+            {
294
+                return Error("请选择区县");
295
+            }
296
+            var list = new BLL.T_Branch_List().GetModelList(sqlwhere);
297
+            if (list.Count == 0)
298
+            {
299
+                return Error("查询失败");
300
+            }
301
+            if (string.IsNullOrEmpty(rolecode))
302
+            {
303
+                return Error("查询失败");
304
+            }
305
+
306
+            string controllername = RouteData.Values["controller"].ToString();
307
+            string actionname = RouteData.Values["action"].ToString();
308
+            if (!string.IsNullOrEmpty(list[0].F_Url))
309
+            {
310
+                string signcode = CommonHelper.getsigncode(controllername, actionname, list[0].F_Sign);
311
+                string strparams = "?rolecode=" + rolecode + "&signcode=" + signcode;
312
+                string result = HttpMethods.HttpGet(list[0].F_Url + "/" + controllername + "/" + actionname + strparams);
313
+                return Content(result);
314
+            }
315
+            else
316
+            {
317
+                return Error("查询失败");
318
+            }
319
+        }
250 320
     }
251 321
 }