gaobingyue лет назад: 5
Родитель
Сommit
048deb5a19

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.DAL/T_RepositoryCategory.cs

@@ -123,8 +123,8 @@ F_visibleDeptId,F_visibleDeptName)");
123 123
             strSql.Append("F_Expand2=@F_Expand2,");
124 124
             strSql.Append("F_CreateOn=@F_CreateOn,");
125 125
             strSql.Append("F_CreateBy=@F_CreateBy,");
126
-            strSql.Append("F_DeleteFlag=@F_DeleteFlag");
127
-            strSql.Append("F_visibleDeptId=@F_visibleDeptId");
126
+            strSql.Append("F_DeleteFlag=@F_DeleteFlag,");
127
+            strSql.Append("F_visibleDeptId=@F_visibleDeptId,");
128 128
             strSql.Append("F_visibleDeptName=@F_visibleDeptName");
129 129
             strSql.Append(" where F_CategoryId=@F_CategoryId");
130 130
             SqlParameter[] parameters = {

+ 63 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs

@@ -505,6 +505,69 @@ namespace CallCenterApi.Interface.Controllers
505 505
             return NoToken("未知错误,请重新登录");
506 506
         }
507 507
 
508
+
509
+        /// <summary>
510
+        /// 获取all部门列表
511
+        /// </summary>
512
+        /// <returns></returns>
513
+        public ActionResult GetAllDeptList()
514
+        {
515
+            if (Request.IsAuthenticated)
516
+            {
517
+                //int userId = CurrentUser.UserData.F_UserId;
518
+                //Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
519
+
520
+                //if (userModel != null)
521
+                //    pId = userModel.F_DeptId;
522
+                //Model.T_Sys_RoleInfo ro = rolebll.GetModel(userModel.F_RoleId);
523
+                string where = "";
524
+                DataTable dt = new DataTable();
525
+                //if (ro != null)
526
+                //{
527
+                //    if (ro.F_RoleCode == "CLZY")
528
+                //        pId = 1;
529
+                //    else if (ro.F_RoleCode == "ZR")
530
+                //        pId = 1;
531
+                //    else if (ro.F_RoleCode == "XTGLY")
532
+                //        pId = 1;
533
+                //}
534
+                //if (pId == 2)
535
+                //{
536
+                //    where = "(isnull(F_DeptId,0)='" + pId + "'or F_Layer=1 ) and F_State=1";
537
+                //}
538
+                //else if (pId == 421)
539
+                //{
540
+                //    where = "isnull(F_DeptId,0)='" + 1 + "'and F_State=1";
541
+                //}
542
+                //else
543
+                //{
544
+                    where = "  isnull(F_DeptId,0)='1' and F_State=1  ";
545
+               // }
546
+
547
+                //if (!string.IsNullOrEmpty(userModel.groupcode))
548
+                //{
549
+                //    where += " and F_GroupCode = '" + userModel.groupcode + "'";
550
+                //}
551
+                dt = new BLL.T_Sys_Department().GetList(0, where, " F_Sort asc").Tables[0];
552
+
553
+                List<Model.TreeModel> modelList = BindTree(dt, "0");
554
+
555
+                if (modelList != null)
556
+                {
557
+                    if (modelList.Count > 0)
558
+                        return Success("加载成功", modelList);
559
+                }
560
+                return Error("加载失败");
561
+            }
562
+            return NoToken("未知错误,请重新登录");
563
+        }
564
+
565
+
566
+
567
+
568
+
569
+
570
+
508 571
         /// <summary>
509 572
         /// tree  树形部门
510 573
         /// </summary>

+ 31 - 15
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/RegRecords/RegRecordsController.cs

@@ -27,7 +27,7 @@ namespace CallCenterApi.Interface.Controllers.RegRecords
27 27
             }
28 28
             if (!string.IsNullOrWhiteSpace(key))
29 29
             {
30
-                sql += " and (F_RecCode like '%" + key.Trim() + "%' or F_Complained like '%" + key.Trim() + "%' or F_Content like '%" + key.Trim() + "%' or F_Remark like '%" + key.Trim() + "%')";
30
+                sql += " and ( F_Unit like '%" + key.Trim() + "%' or F_RecCode like '%" + key.Trim() + "%' or F_Complained like '%" + key.Trim() + "%' or F_Content like '%" + key.Trim() + "%' or F_Remark like '%" + key.Trim() + "%')";
31 31
             }
32 32
             if (!string.IsNullOrWhiteSpace(tel))
33 33
             {
@@ -48,39 +48,55 @@ namespace CallCenterApi.Interface.Controllers.RegRecords
48 48
             {
49 49
                 sql += " and F_CreateOn < '" + Convert.ToDateTime(endtime.Trim()) + "' ";
50 50
             }
51
-            if (innerType==0) {
51
+            if (innerType == 0)
52
+            {
52 53
                 //转移
53 54
                 if (CurrentUser.UserData.F_DeptId == 1)
54 55
                 {
55 56
                     sql += " and(  F_Id in(select F_CustomerId from T_Sys_ATheChangeLog  where isnull(F_type,0)=0 ))";
56 57
                 }
57
-                else {
58
+                else
59
+                {
58 60
                     sql += " and(  F_Id in(select F_CustomerId from T_Sys_ATheChangeLog  where isnull(F_type,0)=0 and F_Bdeptid=" + CurrentUser.UserData.F_DeptId + "))";
59 61
                 }
60
-                
62
+               
61 63
 
62 64
             }
63
-            if (innerType == 1)
65
+            else if (innerType == 1)
64 66
             {
65
-                if (CurrentUser.UserData.F_DeptId == 1) {
66
-                     sql += " and(  F_Id in(select (	select F_CustomerId from T_Sys_ATheChangeLog where F_Id=F_ATheChangeLog) from T_Sys_BTheChangeLog ) )";
67
+                if (CurrentUser.UserData.F_DeptId == 1)
68
+                {
69
+                    sql += " and(  F_Id in(select (	select F_CustomerId from T_Sys_ATheChangeLog where F_Id=F_ATheChangeLog) from T_Sys_BTheChangeLog ) )";
67 70
                     //sql += " and (F_Id in(	select F_CustomerId from T_Sys_ATheChangeLog   ))";
68 71
                 }
69
-                else{
72
+                else
73
+                {
70 74
                     sql += " and(  F_Id in(select (	select F_CustomerId from T_Sys_ATheChangeLog where F_Id=F_ATheChangeLog) from T_Sys_BTheChangeLog  where F_deptid=" + CurrentUser.UserData.F_DeptId + ") )";
71 75
                 }
72 76
                 //转入
73
-               
74
-            }
75
-            if (Zsz!="") {
76
-                sql += " and (  F_ZXZType='" + CurrentUser.UserData.F_SeartGroup+"')";
77
+
78
+                //已接收非本部门的数据不可看到
79
+                sql += @" and (isnull((
80
+select F_Bdeptid from T_Sys_ATheChangeLog where F_CustomerId=T_Rec_RegRecords.F_Id and F_type=1 ),0)=0 or
81
+isnull((
82
+select F_Bdeptid from T_Sys_ATheChangeLog where F_CustomerId=T_Rec_RegRecords.F_Id and F_type=1 ),0)=
83
+" + CurrentUser.UserData.F_DeptId + ")";
84
+
85
+
77 86
             }
78
-            //已接收非本部门的数据不可看到
79
-            sql += @" and (isnull((
87
+            else {
88
+
89
+                //已接收非本部门的数据不可看到
90
+                sql += @" and (isnull((
80 91
 select F_Bdeptid from T_Sys_ATheChangeLog where F_CustomerId=T_Rec_RegRecords.F_Id and F_type=1 ),0)=0 or
81 92
 isnull((
82 93
 select F_Bdeptid from T_Sys_ATheChangeLog where F_CustomerId=T_Rec_RegRecords.F_Id and F_type=1 ),0)<>
83
-"+ CurrentUser.UserData.F_DeptId +")";
94
+" + CurrentUser.UserData.F_DeptId + ")";
95
+            }
96
+            if (Zsz!="") {
97
+                sql += " and (  F_ZXZType='" + Zsz + "')";
98
+            }
99
+          
84 100
             
85 101
             #endregion
86 102
             int recordCount = 0;

+ 4 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

@@ -70,6 +70,10 @@ namespace CallCenterApi.Interface.Controllers.tel
70 70
             {
71 71
                 sql += " and datediff(day,BeginTime,'" + endtime + "')>=0 ";
72 72
             }
73
+            if (workordercode!="") {
74
+                sql += " and (select F_RecCode from T_Rec_RegRecords where T_Rec_RegRecords.F_CallId=T_Call_CallRecords.CallId) like '"+ workordercode + "'";
75
+            }
76
+                
73 77
 
74 78
             if (strpageindex.Trim() != "")
75 79
             {