|
|
@@ -430,56 +430,64 @@ namespace CallCenterApi.Interface.Controllers.tel
|
|
430
|
430
|
ActionResult res = NoToken("未知错误,请重新登录");
|
|
431
|
431
|
if (Request.IsAuthenticated)
|
|
432
|
432
|
{
|
|
433
|
|
- string sql = "";
|
|
434
|
|
- DataTable dt = new DataTable();
|
|
435
|
|
- string stime = HttpUtility.UrlDecode(RequestString.GetQueryString("stime"));
|
|
436
|
|
- string etime = HttpUtility.UrlDecode(RequestString.GetQueryString("etime"));
|
|
437
|
|
-
|
|
438
|
|
- string strpageindex = RequestString.GetQueryString("page");
|
|
439
|
|
- int pageindex = 1;
|
|
440
|
|
- string strpagesize = RequestString.GetQueryString("pagesize");
|
|
441
|
|
- int pagesize = 10;
|
|
442
|
|
-
|
|
443
|
|
- if (stime.Trim() != "" && stime != "undefined")
|
|
444
|
|
- {
|
|
445
|
|
- sql += " and F_Date > '" + Convert.ToDateTime(stime.Trim()) + "' ";
|
|
446
|
|
- }
|
|
447
|
|
- if (etime.Trim() != "" && etime != "undefined")
|
|
|
433
|
+ int userId = CurrentUser.UserData.F_UserId;
|
|
|
434
|
+ if (userId != 0)
|
|
448
|
435
|
{
|
|
449
|
|
- sql += " and F_Date < '" + Convert.ToDateTime(etime.Trim()) + "' ";
|
|
450
|
|
- }
|
|
|
436
|
+ Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
|
|
|
437
|
+ if (ua != null)
|
|
|
438
|
+ {
|
|
|
439
|
+ string usercode = ua.F_UserCode;
|
|
|
440
|
+ string sql = "";
|
|
|
441
|
+ DataTable dt = new DataTable();
|
|
|
442
|
+ string stime = HttpUtility.UrlDecode(RequestString.GetQueryString("stime"));
|
|
|
443
|
+ string etime = HttpUtility.UrlDecode(RequestString.GetQueryString("etime"));
|
|
451
|
444
|
|
|
452
|
|
- if (strpageindex.Trim() != "")
|
|
453
|
|
- {
|
|
454
|
|
- pageindex = Convert.ToInt32(strpageindex);
|
|
455
|
|
- }
|
|
|
445
|
+ string strpageindex = RequestString.GetQueryString("page");
|
|
|
446
|
+ int pageindex = 1;
|
|
|
447
|
+ string strpagesize = RequestString.GetQueryString("pagesize");
|
|
|
448
|
+ int pagesize = 10;
|
|
456
|
449
|
|
|
457
|
|
- if (strpagesize.Trim() != "")
|
|
458
|
|
- {
|
|
459
|
|
- pagesize = Convert.ToInt32(strpagesize);
|
|
460
|
|
- }
|
|
461
|
|
- int recordCount = 0;
|
|
462
|
|
- dt = BLL.PagerBLL.GetListPager(
|
|
463
|
|
- "T_Sys_ScheduleReminder",
|
|
464
|
|
- "F_ID",
|
|
465
|
|
- "*",
|
|
466
|
|
- sql,
|
|
467
|
|
- "ORDER BY F_ID desc",
|
|
468
|
|
- pagesize,
|
|
469
|
|
- pageindex,
|
|
470
|
|
- true,
|
|
471
|
|
- out recordCount);
|
|
472
|
|
-
|
|
473
|
|
- var obj = new
|
|
474
|
|
- {
|
|
475
|
|
- state = "success",
|
|
476
|
|
- message = "成功",
|
|
477
|
|
- rows = dt,
|
|
478
|
|
- total = recordCount
|
|
479
|
|
- };
|
|
|
450
|
+ if (stime.Trim() != "" && stime != "undefined")
|
|
|
451
|
+ {
|
|
|
452
|
+ sql += " and F_Date > '" + Convert.ToDateTime(stime.Trim()) + "' ";
|
|
|
453
|
+ }
|
|
|
454
|
+ if (etime.Trim() != "" && etime != "undefined")
|
|
|
455
|
+ {
|
|
|
456
|
+ sql += " and F_Date < '" + Convert.ToDateTime(etime.Trim()) + "' ";
|
|
|
457
|
+ }
|
|
|
458
|
+ sql += " and F_CreateUser='" + usercode + "' ";
|
|
|
459
|
+ if (strpageindex.Trim() != "")
|
|
|
460
|
+ {
|
|
|
461
|
+ pageindex = Convert.ToInt32(strpageindex);
|
|
|
462
|
+ }
|
|
480
|
463
|
|
|
481
|
|
- res = Content(obj.ToJson());
|
|
|
464
|
+ if (strpagesize.Trim() != "")
|
|
|
465
|
+ {
|
|
|
466
|
+ pagesize = Convert.ToInt32(strpagesize);
|
|
|
467
|
+ }
|
|
|
468
|
+ int recordCount = 0;
|
|
|
469
|
+ dt = BLL.PagerBLL.GetListPager(
|
|
|
470
|
+ "T_Sys_ScheduleReminder",
|
|
|
471
|
+ "F_ID",
|
|
|
472
|
+ "*",
|
|
|
473
|
+ sql,
|
|
|
474
|
+ "ORDER BY F_ID desc",
|
|
|
475
|
+ pagesize,
|
|
|
476
|
+ pageindex,
|
|
|
477
|
+ true,
|
|
|
478
|
+ out recordCount);
|
|
|
479
|
+
|
|
|
480
|
+ var obj = new
|
|
|
481
|
+ {
|
|
|
482
|
+ state = "success",
|
|
|
483
|
+ message = "成功",
|
|
|
484
|
+ rows = dt,
|
|
|
485
|
+ total = recordCount
|
|
|
486
|
+ };
|
|
482
|
487
|
|
|
|
488
|
+ res = Content(obj.ToJson());
|
|
|
489
|
+ }
|
|
|
490
|
+ }
|
|
483
|
491
|
}
|
|
484
|
492
|
return res;
|
|
485
|
493
|
}
|