machenyang лет назад: 8
Родитель
Сommit
092c791af3

+ 54 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/MobiledataController.cs

@@ -224,5 +224,59 @@ namespace CallCenterApi.Interface.Controllers.tel
224 224
             }
225 225
             return res;
226 226
         }
227
+
228
+        //IVR获取号码归属地
229
+        public ActionResult IVRGetList(string strtelnum)
230
+        {
231
+            ActionResult res = NoToken("未知错误,请重新登录");
232
+            if (Request.IsAuthenticated)
233
+            {
234
+                string sql = " and isDelete=0";
235
+                DataTable dt = new DataTable();
236
+
237
+                string strpageindex = RequestString.GetQueryString("page");
238
+                int pageindex = 1;
239
+                string strpagesize = RequestString.GetQueryString("pagesize");
240
+                int pagesize = 10;
241
+
242
+                if (strtelnum != null && strtelnum.Trim() != "")
243
+                {
244
+                    sql += " and tel like '%" + strtelnum.Trim() + "%'";
245
+                }
246
+
247
+                if (strpageindex.Trim() != "")
248
+                {
249
+                    pageindex = Convert.ToInt32(strpageindex);
250
+                }
251
+
252
+                if (strpagesize.Trim() != "")
253
+                {
254
+                    pagesize = Convert.ToInt32(strpagesize);
255
+                }
256
+                int recordCount = 0;
257
+                dt = BLL.PagerBLL.GetListPager(
258
+                    "tel_location",
259
+                    "tel_location.id",
260
+                    "*",
261
+                    sql,
262
+                    "ORDER BY tel_location.id asc",
263
+                    pagesize,
264
+                    pageindex,
265
+                    true,
266
+                    out recordCount);
267
+
268
+                var obj = new
269
+                {
270
+                    state = "success",
271
+                    message = "成功",
272
+                    rows = dt,
273
+                    total = recordCount
274
+                };
275
+
276
+                res = Content(obj.ToJson());
277
+
278
+            }
279
+            return res;
280
+        }
227 281
     }
228 282
 }