Kaynağa Gözat

坐席组分页接口调整

yuqian 8 yıl önce
ebeveyn
işleme
e4aba2b9ab

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

@@ -294,6 +294,7 @@
294 294
     <Compile Include="Models\Filter\FilterPagerInfo.cs" />
295 295
     <Compile Include="Models\Filter\FilterQuestion.cs" />
296 296
     <Compile Include="Models\Filter\FilterRole.cs" />
297
+    <Compile Include="Models\Filter\FilterSeatGroup.cs" />
297 298
     <Compile Include="Models\Filter\FilterTalkRecord.cs" />
298 299
     <Compile Include="Models\Filter\FilterCategory.cs" />
299 300
     <Compile Include="Models\Filter\FilterDictionary.cs" />

+ 6 - 15
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/SeatGroupController.cs

@@ -1,6 +1,7 @@
1 1
 using CallCenter.Utility;
2 2
 using CallCenterApi.Common;
3 3
 using CallCenterApi.Interface.Controllers.Base;
4
+using CallCenterApi.Interface.Models.Filter;
4 5
 using CallCenterApi.Interface.Models.Input;
5 6
 using System;
6 7
 using System.Collections.Generic;
@@ -18,25 +19,15 @@ namespace CallCenterApi.Interface.Controllers
18 19
         /// 获取坐席组列表
19 20
         /// </summary>
20 21
         /// <returns></returns>
21
-        public ActionResult GetList()
22
+        public ActionResult GetList(FilterSeatGroup filter)
22 23
         {
23 24
             ActionResult res = NoToken("未知错误,请重新登录");
24 25
 
25 26
             DataTable dt = new DataTable();
26
-            string strpageindex = RequestString.GetQueryString("page");
27
-            int pageindex = 1;
28
-            string strpagesize = RequestString.GetQueryString("pagesize");
29
-            int pagesize = 10;
30
-
31 27
             string sql = "";
32
-            if (strpageindex.Trim() != "")
33
-            {
34
-                pageindex = Convert.ToInt32(strpageindex);
35
-            }
36
-
37
-            if (strpagesize.Trim() != "")
28
+            if (!string.IsNullOrWhiteSpace(filter.SeatName))
38 29
             {
39
-                pagesize = Convert.ToInt32(strpagesize);
30
+                sql += $" and F_ZXZName like '%{filter.SeatName}%'";
40 31
             }
41 32
             int recordCount = 0;
42 33
             dt = BLL.PagerBLL.GetListPager(
@@ -45,8 +36,8 @@ namespace CallCenterApi.Interface.Controllers
45 36
                 "*",
46 37
                 sql,
47 38
                 "ORDER BY F_ZXZID desc",
48
-                pagesize,
49
-                pageindex,
39
+                filter.PageSize,
40
+                filter.PageIndex,
50 41
                 true,
51 42
                 out recordCount);
52 43
 

+ 13 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Filter/FilterSeatGroup.cs

@@ -0,0 +1,13 @@
1
+using CallCenterApi.Interface.Models.Common;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Linq;
5
+using System.Web;
6
+
7
+namespace CallCenterApi.Interface.Models.Filter
8
+{
9
+    public class FilterSeatGroup : ListBase
10
+    {
11
+        public string SeatName { get; set; }
12
+    }
13
+}