|
|
@@ -352,7 +352,7 @@ namespace CallCenterApi.Interface.Controllers
|
|
352
|
352
|
}
|
|
353
|
353
|
//[Authority]
|
|
354
|
354
|
//用户列表
|
|
355
|
|
- public ActionResult GetList(FilterUserAccount filter)
|
|
|
355
|
+ public ActionResult GetList(FilterUserAccount filter,int isdc=0)
|
|
356
|
356
|
{
|
|
357
|
357
|
if (Request.IsAuthenticated)
|
|
358
|
358
|
{
|
|
|
@@ -410,64 +410,85 @@ namespace CallCenterApi.Interface.Controllers
|
|
410
|
410
|
sth = "F_RoleId asc";
|
|
411
|
411
|
}
|
|
412
|
412
|
sql += "and (F_See!='5' or F_See is null)";
|
|
413
|
|
-
|
|
414
|
|
- int recordCount = 0;
|
|
415
|
|
- dt = BLL.PagerBLL.GetListPager(
|
|
416
|
|
- "T_Sys_UserAccount",
|
|
417
|
|
- "F_UserId",
|
|
418
|
|
- "*",
|
|
419
|
|
- sql,
|
|
420
|
|
- "ORDER BY "+ sth + " ",
|
|
421
|
|
- filter.PageSize,
|
|
422
|
|
- filter.PageIndex,
|
|
423
|
|
- true,
|
|
424
|
|
- out recordCount);
|
|
425
|
|
-
|
|
426
|
|
- List<Model.UserAccount> modelList = new BLL.UserAccount().DataTableToList(dt);
|
|
427
|
|
- var obj = new
|
|
|
413
|
+ if (isdc>0)
|
|
428
|
414
|
{
|
|
429
|
|
- rows = modelList.Select(x => new
|
|
|
415
|
+ var dtdc = DbHelperSQL.Query(" select F_UserId 用户编号, F_UserCode 坐席工号,F_UserName 用户名称," +
|
|
|
416
|
+ "F_SexFlag 性别,F_Mobile 手机号,F_CreateOn 添加时间,F_LastActiveTime 最后登录时间, " +
|
|
|
417
|
+ " (select F_RoleName from T_Sys_RoleInfo where F_RoleId =a.F_RoleId ) 用户角色," +
|
|
|
418
|
+ " (select F_DeptName from T_Sys_Department where F_DeptId =a.F_DeptId ) 部门," +
|
|
|
419
|
+ " F_WorkNumber 工号" +
|
|
|
420
|
+ "from T_Sys_UserAccount a WITH(NOLOCK) where 1=1 " + sql + "ORDER BY"+ sth).Tables[0];
|
|
|
421
|
+ var msg = new NPOIHelper().ExportToExcel("工单列表", dtdc);
|
|
|
422
|
+ if (msg == "")
|
|
430
|
423
|
{
|
|
431
|
|
- F_UserId = x.F_UserId,
|
|
432
|
|
- F_UserCode = x.F_UserCode,
|
|
433
|
|
- F_ExtensionNumber = x.F_ExtensionNumber,
|
|
434
|
|
- F_UserName = x.F_UserName,
|
|
435
|
|
- F_GroupName = x.F_GroupName,
|
|
436
|
|
- F_DeptId = x.F_DeptId,
|
|
437
|
|
- F_RoleId = x.F_RoleId,
|
|
438
|
|
- F_GroupId = x.F_GroupId,
|
|
439
|
|
- F_SeatFlag = x.F_SeatFlag,
|
|
440
|
|
- F_SeatRight = x.F_SeatRight,
|
|
441
|
|
- F_SeatLevel = x.F_SeatLevel,
|
|
442
|
|
- F_SexFlag = x.F_SexFlag,
|
|
443
|
|
- F_RemindFlag = x.F_RemindFlag,
|
|
444
|
|
- F_Remark = x.F_Remark,
|
|
445
|
|
- F_Telephone = x.F_Telephone,
|
|
446
|
|
- F_Mobile = x.F_Mobile,
|
|
447
|
|
- F_HomePhone = x.F_HomePhone,
|
|
448
|
|
- F_Birthday = x.F_Birthday,
|
|
449
|
|
- F_CreateOn = x.F_CreateOn,
|
|
450
|
|
- F_CancelOn = x.F_CancelOn,
|
|
451
|
|
- F_DeleteFlag = x.F_DeleteFlag,
|
|
452
|
|
- F_APPOnFlag = x.F_APPOnFlag,
|
|
453
|
|
- F_LastActiveTime = x.F_LastActiveTime,
|
|
454
|
|
- F_See = x.F_See,
|
|
455
|
|
- F_HJType = x.F_HJType,
|
|
456
|
|
- F_PId = x.F_PId,
|
|
457
|
|
- F_TmId = x.F_TmId,
|
|
458
|
|
- F_RoleName = x.F_RoleName,
|
|
459
|
|
- F_DeptName = x.F_DeptName,
|
|
460
|
|
- F_WorkNumber = x.F_WorkNumber,
|
|
461
|
|
- F_Post = x.F_Post,
|
|
462
|
|
- //F_WXNo=x.F_WXNo,
|
|
463
|
|
- F_SeatGroup = x.F_SeartGroup
|
|
464
|
|
- }),
|
|
465
|
|
- total = recordCount
|
|
466
|
|
- };
|
|
|
424
|
+ return Success("导出成功");
|
|
|
425
|
+ }
|
|
|
426
|
+ else
|
|
|
427
|
+ {
|
|
|
428
|
+ return Error("导出失败");
|
|
|
429
|
+ }
|
|
|
430
|
+ }
|
|
|
431
|
+ else
|
|
|
432
|
+ {
|
|
|
433
|
+ int recordCount = 0;
|
|
|
434
|
+ dt = BLL.PagerBLL.GetListPager(
|
|
|
435
|
+ "T_Sys_UserAccount",
|
|
|
436
|
+ "F_UserId",
|
|
|
437
|
+ "*",
|
|
|
438
|
+ sql,
|
|
|
439
|
+ "ORDER BY " + sth + " ",
|
|
|
440
|
+ filter.PageSize,
|
|
|
441
|
+ filter.PageIndex,
|
|
|
442
|
+ true,
|
|
|
443
|
+ out recordCount);
|
|
467
|
444
|
|
|
468
|
|
- dt.Clear();
|
|
469
|
|
- dt.Dispose();
|
|
470
|
|
- return Content(obj.ToJson());
|
|
|
445
|
+ List<Model.UserAccount> modelList = new BLL.UserAccount().DataTableToList(dt);
|
|
|
446
|
+ var obj = new
|
|
|
447
|
+ {
|
|
|
448
|
+ rows = modelList.Select(x => new
|
|
|
449
|
+ {
|
|
|
450
|
+ F_UserId = x.F_UserId,
|
|
|
451
|
+ F_UserCode = x.F_UserCode,
|
|
|
452
|
+ F_ExtensionNumber = x.F_ExtensionNumber,
|
|
|
453
|
+ F_UserName = x.F_UserName,
|
|
|
454
|
+ F_GroupName = x.F_GroupName,
|
|
|
455
|
+ F_DeptId = x.F_DeptId,
|
|
|
456
|
+ F_RoleId = x.F_RoleId,
|
|
|
457
|
+ F_GroupId = x.F_GroupId,
|
|
|
458
|
+ F_SeatFlag = x.F_SeatFlag,
|
|
|
459
|
+ F_SeatRight = x.F_SeatRight,
|
|
|
460
|
+ F_SeatLevel = x.F_SeatLevel,
|
|
|
461
|
+ F_SexFlag = x.F_SexFlag,
|
|
|
462
|
+ F_RemindFlag = x.F_RemindFlag,
|
|
|
463
|
+ F_Remark = x.F_Remark,
|
|
|
464
|
+ F_Telephone = x.F_Telephone,
|
|
|
465
|
+ F_Mobile = x.F_Mobile,
|
|
|
466
|
+ F_HomePhone = x.F_HomePhone,
|
|
|
467
|
+ F_Birthday = x.F_Birthday,
|
|
|
468
|
+ F_CreateOn = x.F_CreateOn,
|
|
|
469
|
+ F_CancelOn = x.F_CancelOn,
|
|
|
470
|
+ F_DeleteFlag = x.F_DeleteFlag,
|
|
|
471
|
+ F_APPOnFlag = x.F_APPOnFlag,
|
|
|
472
|
+ F_LastActiveTime = x.F_LastActiveTime,
|
|
|
473
|
+ F_See = x.F_See,
|
|
|
474
|
+ F_HJType = x.F_HJType,
|
|
|
475
|
+ F_PId = x.F_PId,
|
|
|
476
|
+ F_TmId = x.F_TmId,
|
|
|
477
|
+ F_RoleName = x.F_RoleName,
|
|
|
478
|
+ F_DeptName = x.F_DeptName,
|
|
|
479
|
+ F_WorkNumber = x.F_WorkNumber,
|
|
|
480
|
+ F_Post = x.F_Post,
|
|
|
481
|
+ //F_WXNo=x.F_WXNo,
|
|
|
482
|
+ F_SeatGroup = x.F_SeartGroup
|
|
|
483
|
+ }),
|
|
|
484
|
+ total = recordCount
|
|
|
485
|
+ };
|
|
|
486
|
+
|
|
|
487
|
+ dt.Clear();
|
|
|
488
|
+ dt.Dispose();
|
|
|
489
|
+ return Content(obj.ToJson());
|
|
|
490
|
+ }
|
|
|
491
|
+
|
|
471
|
492
|
// return ;
|
|
472
|
493
|
}
|
|
473
|
494
|
return NoToken("未知错误,请重新登录");
|
|
|
@@ -592,7 +613,10 @@ namespace CallCenterApi.Interface.Controllers
|
|
592
|
613
|
{
|
|
593
|
614
|
return Error("手机号不能为空");
|
|
594
|
615
|
}
|
|
595
|
|
-
|
|
|
616
|
+ if (string.IsNullOrEmpty(input.Username))
|
|
|
617
|
+ {
|
|
|
618
|
+ return Error("用户名不能为空");
|
|
|
619
|
+ }
|
|
596
|
620
|
Model.T_Sys_UserAccount userAccountModel = new Model.T_Sys_UserAccount();
|
|
597
|
621
|
//员工工号不能重复
|
|
598
|
622
|
var user = new BLL.T_Sys_UserAccount().GetModelList("F_UserName='" + input.Username + "' and F_Mobile='" + input.Mobile + "'");
|