duhongyu 3 anni fa
parent
commit
50a20731e7

+ 7 - 5
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DepartmentController.cs

@@ -11,7 +11,7 @@ using System.Web.Mvc;
11 11
 
12 12
 namespace CallCenterApi.Interface.Controllers
13 13
 {
14
-    [Authority]
14
+   [Authority]
15 15
     public class DepartmentController : BaseController
16 16
     {
17 17
         private BLL.T_Sys_Department departmentBLL = new BLL.T_Sys_Department();
@@ -69,10 +69,10 @@ namespace CallCenterApi.Interface.Controllers
69 69
         }
70 70
         public ActionResult GetZTreeNew()
71 71
         {
72
-          
72
+
73 73
             DataTable dt = new DataTable();
74
-            dt = new BLL.T_Sys_Department ().GetList(" 1=1 and   F_IsDept = 1 and F_State = 0 and F_layer = 1").Tables[0];
75
-            string sqltest = "      with cte(F_DeptId  ,F_DeptName ,F_PartentId ,F_Layer,F_State,F_IsDept) as (select F_DeptId, F_DeptName, F_PartentId, F_Layer, F_State, F_IsDept from T_Sys_Department where F_IsDept = 1 and F_State = 0 and F_layer = 1 UNION all select t.F_DeptId, t.F_DeptName,t.F_PartentId,t.F_Layer,t.F_State,t.F_IsDept   from T_Sys_Department as t inner join cte as c on c.F_DeptId = t.F_PartentId )select * from cte  ";
74
+            dt = new BLL.T_Sys_Department ().GetList(" 1=1 and F_IsDept =1   and F_State = 0 ").Tables[0];
75
+            string sqltest = "      with cte(F_DeptId  ,F_DeptName ,F_PartentId ,F_Layer,F_State,F_IsDept) as (select F_DeptId, F_DeptName, F_PartentId, F_Layer, F_State, F_IsDept from T_Sys_Department where F_IsDept =1 and F_State = 0  UNION all select t.F_DeptId, t.F_DeptName,t.F_PartentId,t.F_Layer,t.F_State,t.F_IsDept   from T_Sys_Department as t inner join cte as c on c.F_DeptId = t.F_PartentId )select * from cte  ";
76 76
             var tab2 = DbHelperSQL.Query(sqltest).Tables[0];
77 77
             List<TreeModelNew> modelList = BindTreeNew(dt, "0", tab2);
78 78
           
@@ -85,6 +85,8 @@ namespace CallCenterApi.Interface.Controllers
85 85
           
86 86
 
87 87
         }
88
+
89
+
88 90
         public class TreeModelNew
89 91
         {
90 92
             private string _id;
@@ -237,7 +239,7 @@ namespace CallCenterApi.Interface.Controllers
237 239
 
238 240
             if (tab != null && tab.Rows.Count > 0)
239 241
             {
240
-                List<Model.T_Sys_Department > categorylist = new BLL.T_Sys_Department().DataTableToList(tab);
242
+                List<Model.T_Sys_Department > categorylist = DataTableToList1(tab);
241 243
                 List<TreeModelNew> modelList = new List<TreeModelNew>(categorylist.Count);
242 244
                 for (int i = 0; i < categorylist.Count; i++)
243 245
                 {

+ 11 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/AddressBookController.cs

@@ -143,9 +143,14 @@ namespace CallCenterApi.Interface.Controllers.customer
143 143
             {
144 144
                 return Error("手机号不能为空");
145 145
             }
146
+            if (User.F_RoleCode != "GLY")
147
+            {
148
+                return Error("权限不足");
149
+            }
146 150
             if (id == 0)
147 151
             {
148
-                model.F_Name = F_Name;
152
+               
153
+              model.F_Name = F_Name;
149 154
                 model.F_Sex = F_Sex;
150 155
                 //model.F_Birthday = Convert.ToDateTime(F_Birthday);
151 156
                 //model.F_IDCard = F_IDCard;
@@ -171,6 +176,7 @@ namespace CallCenterApi.Interface.Controllers.customer
171 176
             }
172 177
             else
173 178
             {
179
+             
174 180
                 model = bll.GetModel(id);
175 181
                 if (model != null)
176 182
                 {
@@ -209,6 +215,10 @@ namespace CallCenterApi.Interface.Controllers.customer
209 215
         /// <returns></returns>
210 216
         public ActionResult DelAddressBook(string[] ids)
211 217
         {
218
+            if (User.F_RoleCode != "GLY")
219
+            {
220
+                return Error("权限不足");
221
+            }
212 222
             if (ids != null && ids.Length > 0)
213 223
             {
214 224
                 string idd = " ";

+ 5 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

@@ -62,6 +62,11 @@ namespace CallCenterApi.Interface.Controllers.tel
62 62
             {
63 63
                 sql += " and F_CallInType = '" + type + "' ";
64 64
             }
65
+            if (User .F_RoleCode == "ZXHWY")
66
+            {
67
+                sql += " and UserCode in(" + User .F_UserCode  + ")";
68
+            }
69
+           
65 70
             if (usercode != null && usercode.Trim() != "")
66 71
             {
67 72
                 sql += " and UserCode in(" + usercode + ")";

+ 16 - 12
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -494,7 +494,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
494 494
                 }
495 495
                 //20190715调整导出字段 zhengbingbing
496 496
                 //日期,工单号,诉求标题,诉求内容,承办单位,办理结果,是否满意,备注
497
-                var dtdc = DbHelperSQL.Query(" select  F_CreateTime 日期, F_CusName 姓名, dbo.GetUserName(F_CreateUser ) 受话员姓名,F_CusPhone 手机号,F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 诉求内容,dbo.GetKeyName(F_Key,0) 反映类别一, dbo.GetKeyName(F_Key,1) 反映类别二,dbo.GetKeyName(F_Key,2) 反映类别三,dbo.GetKeyName(F_Key,3) 反映类别四,"
497
+                var dtdc = DbHelperSQL.Query(" select  F_CreateTime 日期, F_CusName 姓名, dbo.GetUserName(F_CreateUser ) 受话员姓名,F_CusPhone 手机号,F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetKeyName(F_Key,0) 反映类别一, dbo.GetKeyName(F_Key,1) 反映类别二,dbo.GetKeyName(F_Key,2) 反映类别三,dbo.GetKeyName(F_Key,3) 反映类别四,"
498 498
                     + "  dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
499 499
                     + " F_Result 办理结果, "
500 500
                     + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_WorkOrderId = a.F_WorkOrderId order by F_Id desc) 是否满意 "
@@ -872,7 +872,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
872 872
                 }
873 873
                 //20190715调整导出字段 zhengbingbing
874 874
                 //日期,工单号,诉求标题,诉求内容,承办单位,办理结果,是否满意,备注
875
-                var dtdc = DbHelperSQL.Query(" select  ROW_NUMBER() OVER(ORDER BY F_CreateTime desc)  序号,F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 诉求内容,dbo.GetDictionaryName(F_Key) 反映类别, "
875
+                var dtdc = DbHelperSQL.Query(" select  ROW_NUMBER() OVER(ORDER BY F_CreateTime desc)  序号,F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetDictionaryName(F_Key) 反映类别, "
876 876
                     + "  dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
877 877
                     + " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId =a.F_WorkOrderId order by F_Id desc) 办理结果, "
878 878
                     + " F_CusName 来电人姓名 ,F_CusPhone  来电人手机号 "
@@ -1395,7 +1395,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1395 1395
                 }
1396 1396
                 //20190715调整导出字段 zhengbingbing
1397 1397
                 //日期,工单号,诉求标题,诉求内容,承办单位,办理结果,是否满意,备注
1398
-                var dtdc = DbHelperSQL.Query(" select  ROW_NUMBER() OVER(ORDER BY F_CreateTime desc)  序号,F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 诉求内容,dbo.GetDictionaryName(F_Key) 反映类别, "
1398
+                var dtdc = DbHelperSQL.Query(" select  ROW_NUMBER() OVER(ORDER BY F_CreateTime desc)  序号,F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetDictionaryName(F_Key) 反映类别, "
1399 1399
                     + "  dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
1400 1400
                     + " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId =a.F_WorkOrderId order by F_Id desc) 办理结果, "
1401 1401
                     + " F_CusName 来电人姓名 ,F_CusPhone  来电人手机号 "
@@ -1803,7 +1803,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1803 1803
                 }
1804 1804
                 //20190715调整导出字段 zhengbingbing
1805 1805
                 //日期,工单号,诉求标题,诉求内容,承办单位,办理结果,是否满意,备注
1806
-                var dtdc = DbHelperSQL.Query(" select  F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 诉求内容,dbo.GetDictionaryName(F_Key) 主题词, "
1806
+                var dtdc = DbHelperSQL.Query(" select  F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetDictionaryName(F_Key) 主题词, "
1807 1807
                       + "  dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
1808 1808
 
1809 1809
                     + " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId =wo.F_WorkOrderId order by F_Id desc) 办理结果, "
@@ -2001,7 +2001,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2001 2001
                         btns.Remove(butt); 
2002 2002
                     if (Int32.Parse(strtab) == 0 && state == 7)
2003 2003
                     {
2004
-                        if (User.F_RoleCode.ToUpper() != "ZXHWY")
2004
+                       // if (User.F_RoleCode.ToUpper() != "ZXHWY")
2005 2005
                         btns.Add(ButtonGroup.turnsee());
2006 2006
                     }
2007 2007
                     if (Int32.Parse(strtab) == 0 && state == 3)
@@ -2624,7 +2624,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2624 2624
                 }
2625 2625
                 //20190715调整导出字段 zhengbingbing
2626 2626
                 //日期,工单号,诉求标题,诉求内容,承办单位,办理结果,是否满意,备注
2627
-                var dtdc = DbHelperSQL.Query(" select " + top + " F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 诉求内容,dbo.GetDictionaryName(F_Key) 主题词, "
2627
+                var dtdc = DbHelperSQL.Query(" select " + top + " F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetDictionaryName(F_Key) 主题词, "
2628 2628
                      + "  dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
2629 2629
                     + " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId =wo.F_WorkOrderId order by F_Id desc) 办理结果, "
2630 2630
                     + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_WorkOrderId = wo.F_WorkOrderId order by F_Id desc) 是否满意 "
@@ -3410,7 +3410,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
3410 3410
                 }
3411 3411
                 //20190715调整导出字段 zhengbingbing
3412 3412
                 //日期,工单号,诉求标题,诉求内容,承办单位,办理结果,是否满意,备注
3413
-                var dtdc = DbHelperSQL.Query(" select  F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 诉求内容,dbo.GetDictionaryName(F_Key) 主题词, "
3413
+                var dtdc = DbHelperSQL.Query(" select  F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetDictionaryName(F_Key) 主题词, "
3414 3414
                     + "  dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
3415 3415
 
3416 3416
                     + " F_Result 办理结果 "
@@ -4804,7 +4804,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4804 4804
             //(select TOP 1 F_LimitTime from T_Bus_AssignedInfo_Next WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and F_WorkOrderId=a.F_WorkOrderId) as
4805 4805
             if (isdc > 0)
4806 4806
             {
4807
-                var dtdc = DbHelperSQL.Query(" select  F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 诉求内容,dbo.GetDictionaryName(F_Key) 主题词, "
4807
+                var dtdc = DbHelperSQL.Query(" select  F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetDictionaryName(F_Key) 主题词, "
4808 4808
                     + "  dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
4809 4809
                     + " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId =a.F_WorkOrderId order by F_Id desc) 办理结果, "
4810 4810
                     + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_WorkOrderId = a.F_WorkOrderId order by F_Id desc) 是否满意 ,"
@@ -5573,7 +5573,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
5573 5573
                 }
5574 5574
                 //20190715调整导出字段 zhengbingbing
5575 5575
                 //日期,工单号,诉求标题,诉求内容,承办单位,办理结果,是否满意,备注
5576
-                var dtdc = DbHelperSQL.Query(" select " + top + " F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 诉求内容,dbo.GetDictionaryName(F_Key) 主题词, "
5576
+                var dtdc = DbHelperSQL.Query(" select " + top + " F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetDictionaryName(F_Key) 主题词, "
5577 5577
                  + "  dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
5578 5578
 
5579 5579
                     + " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId =wo.F_WorkOrderId order by F_Id desc) 办理结果, "
@@ -6003,7 +6003,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
6003 6003
                 {
6004 6004
                     top = " top 1000 "; orderby += " desc ";
6005 6005
                 }
6006
-                var dtdc = DbHelperSQL.Query(" select  F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 诉求内容,dbo.GetDictionaryName(F_Key) 主题词, "
6006
+                var dtdc = DbHelperSQL.Query(" select  F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetDictionaryName(F_Key) 主题词, "
6007 6007
    + "  dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
6008 6008
                    + " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId =wo.F_WorkOrderId order by F_Id desc) 办理结果, "
6009 6009
                    + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_WorkOrderId = wo.F_WorkOrderId order by F_Id desc) 是否满意 "
@@ -7489,7 +7489,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
7489 7489
                 {
7490 7490
                     top = " top 1000 "; orderby += " desc ";
7491 7491
                 }
7492
-                var dtdc = DbHelperSQL.Query(" select " + top + " F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 诉求内容,dbo.GetDictionaryName(F_Key) 主题词, "
7492
+                var dtdc = DbHelperSQL.Query(" select " + top + " F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetDictionaryName(F_Key) 主题词, "
7493 7493
                    + "  dbo.GetDeptNames((select top 1 F_MainDeptId from T_Bus_AssignedInfo where F_WorkOrderId=wo.F_WorkOrderId order by F_Id desc  )) 主办单位, "
7494 7494
 
7495 7495
                    + " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId =wo.F_WorkOrderId order by F_Id desc) 办理结果, "
@@ -9042,7 +9042,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
9042 9042
                             oper.F_WorkOrderId = workorderid;
9043 9043
                             oper.F_AssignedId = 0;
9044 9044
                             oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
9045
-                            oper.F_Message = userinfo + " 修改了来电内容,原内容:" + message;
9045
+                            oper.F_Message = userinfo + " 修改了工单内容,原内容:" + message;
9046 9046
                             oper.F_CreateUser = User.F_UserCode;
9047 9047
                             oper.F_CreateTime = DateTime.Now;
9048 9048
                             oper.F_IsDelete = 0;
@@ -16907,6 +16907,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
16907 16907
                 Model.T_Bus_AssignedInfo modelT_Bus_AssignedInfo = assignBLL.GetNewModelByWorkOrderID(workorderid);
16908 16908
                 Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
16909 16909
                 Model.T_Bus_VisitResult modelT_Bus_VisitResult = new Model.T_Bus_VisitResult();
16910
+                if(string .IsNullOrEmpty (visituser))
16911
+                {
16912
+                    visituser = User.F_UserCode;
16913
+                }
16910 16914
                 if (modelT_Bus_WorkOrder != null)
16911 16915
                 {
16912 16916
                     if (modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.dealed|| modelT_Bus_WorkOrder.F_WorkState == (int)EnumWorkState.visit )

File diff suppressed because it is too large
+ 74 - 0
文档/Ivrhb(1).xml