1550076451 2 years ago
parent
commit
984f4a3ac1

+ 3 - 2
codegit/CallCenterApi/CallCenterApi.BLL/T_Sys_MobileData.cs

@@ -79,9 +79,10 @@ namespace CallCenterApi.BLL
79 79
         /// <summary>
80 80
         /// 获得前几行数据
81 81
         /// </summary>
82
-        public DataSet GetList(int Top, string strWhere, string filedOrder)
82
+        public List<CallCenterApi.Model.T_Sys_MobileData> GetList(int Top, string strWhere, string filedOrder)
83 83
         {
84
-            return dal.GetList(Top, strWhere, filedOrder);
84
+            DataSet ds =dal.GetList(Top, strWhere, filedOrder);
85
+            return DataTableToList(ds.Tables[0]);
85 86
         }
86 87
         /// <summary>
87 88
         /// 获得数据列表

+ 5 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Configs/system.config

@@ -48,4 +48,9 @@
48 48
   <add key="APPKEY" value="yihHAcpaiP9eUNkHjO2nu" />
49 49
   <!-- 设置个推MASTERSECRET -->
50 50
   <add key="MASTERSECRET" value="HOpwGC8dOoAvSmurJYF5N9" />
51
+
52
+  <!-- 设置归属地查询AccessKeyID -->
53
+  <add key="AccessKeyID" value="LTAI5t74YpfDp5ULqyR78bPy" />
54
+  <!-- 设置归属地查询AccessKeySecret -->
55
+  <add key="AccessKeySecret" value="elRaejiGbEEp3SMy9uNNR2QkLd9ZjF" />
51 56
 </appSettings>

+ 81 - 57
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -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 + "'");

+ 20 - 11
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs

@@ -396,7 +396,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
396 396
         /// </summary>
397 397
         /// <returns></returns>
398 398
         /// F_Duplicate  1咨询2投诉6抽检
399
-        public ActionResult GetList(string starttime, string endtime, string keywords, string area, string offce, string dealTimely,int CJ=0, int see=0, int state = -1, int pageindex = 1, int pagesize = 10,int Processing=0,int isdc=0)
399
+        public ActionResult GetList(string starttime, string endtime, string keywords, string area, string offce, string dealTimely,int CJ=0, int see=0, int state = -1, int pageindex = 1, int pagesize = 10,int Processing=0,int isdc=0, int comprehensive = -1)
400 400
         {
401 401
             int userId = CurrentUser.UserData.F_UserId;
402 402
             if (userId != 0)
@@ -425,8 +425,14 @@ namespace CallCenterApi.Interface.Controllers.workorder
425 425
                 }
426 426
                 else
427 427
                 {
428
-                    if (state != 11)
429
-                        sql += $" and (F_Type=" + 2 + "or (F_Duplicate in(2,0)and F_Type=3))";
428
+                    if (comprehensive < 0)
429
+                    {
430
+                        if (state != 11)
431
+                        {
432
+                            sql += $" and (F_Type=" + 2 + "or (F_Duplicate in(2,0)and F_Type=3))";
433
+                        }
434
+                    }
435
+                      
430 436
                 }
431 437
                 if (!string.IsNullOrEmpty(dealTimely))//重要级别
432 438
                 {
@@ -651,15 +657,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
651 657
                 }
652 658
                 else
653 659
                 {
654
-                    sql += RetuSql(ro, see, ua);
655
-
656
-                    if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
657
-                    {
658
-                        sql += "AND F_Notifications ='" + ua.F_UserCode + "'";
659
-                    }
660
-                    if (ro.F_RoleCode == "QTJS")
660
+                    if (comprehensive < 0)
661 661
                     {
662
-                        sql += "AND F_CreateUser='"+ua .F_UserCode +"'";
662
+                        sql += RetuSql(ro, see, ua);
663
+
664
+                        if (ro.F_RoleCode == "YWY" || ro.F_RoleCode == "ZG")
665
+                        {
666
+                            sql += "AND F_Notifications ='" + ua.F_UserCode + "'";
667
+                        }
668
+                        if (ro.F_RoleCode == "QTJS")
669
+                        {
670
+                            sql += "AND F_CreateUser='" + ua.F_UserCode + "'";
671
+                        }
663 672
                     }
664 673
                 }
665 674
                 if (ro.F_RoleCode == "DS")//电商角色