duhongyu 3 年 前
コミット
2f0bdcbcac

+ 7 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs

@@ -14,7 +14,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
14 14
     {
15 15
         BLL.T_RepositoryInformation infoBLL = new BLL.T_RepositoryInformation();
16 16
         // 获取知识库列表
17
-        public ActionResult GetList(string title, string content,string keywords, string pid)
17
+        public ActionResult GetList(string title, string content,string keywords, string pid,int deptid=0)
18 18
         {
19 19
             string issub = RequestString.GetQueryString("issub");
20 20
             string ispass = RequestString.GetQueryString("ispass");
@@ -57,11 +57,16 @@ namespace CallCenterApi.Interface.Controllers.knowledge
57 57
             {
58 58
                 sql += " and F_CategoryId=" + pid.Trim();
59 59
             }
60
-                                                                                                                                                                                     if (keywords != null && keywords.Trim() != "")
60
+            if (keywords != null && keywords.Trim() != "")
61 61
             {
62 62
                 sql += " and (F_Description like '%" + keywords.Trim() + "%' or F_Content like '%" + keywords.Trim() + "%' or F_Title like '%"
63 63
                                                                                                                                                                                                  + keywords.Trim() + "%' or F_KeyWords like '%" + keywords.Trim() + "%')";
64 64
             }
65
+
66
+            if (deptid >0)
67
+            {
68
+                sql += "and   F_CreateBy in( select F_UserId from T_Sys_UserAccount where F_DeptId ='" + deptid + "')";
69
+            }
65 70
             if (strpageindex.Trim() != "")
66 71
             {                    
67 72
                 pageindex = Convert.ToInt32(strpageindex);

+ 19 - 8
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -1877,7 +1877,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1877 1877
             string cols = "";
1878 1878
             cols = "F_WorkOrderId,F_InfoSource,F_CusName,F_ComTitle,F_WorkState,F_MainDeptId,F_OtherDeptIds,F_DealTime,F_LeaveRecordId,F_CallRecordId,F_IsResult,F_IsProtect,F_IsReturn,F_CreateTime,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName,(select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK)  where F_Type=3 and F_State=1 and F_IsDelete=0" +
1879 1879
               "and F_WorkOrderId=a.F_WorkOrderId order by F_CreateTime desc ) as Backreason ,F_CloseTime,F_Identification,F_IsRelease,F_InfoSource,F_Note" +
1880
-              ",(case when PATINDEX('%" + User.F_UserCode + "%',a.F_See)= 0  then 0  when  PATINDEX('%" + User.F_UserCode + "%',a.F_See) IS NULL then 0 else 1 end) as See";
1880
+              ",(case when PATINDEX('%''" + User.F_DeptId  + "''%',a.F_See)= 0  then 0  when  PATINDEX('%''" + User.F_DeptId + "''%',a.F_See) IS NULL then 0 else 1 end) as See";
1881 1881
             if (smspy > -1)
1882 1882
             {
1883 1883
                 order = "  order by F_Id  desc";
@@ -2695,7 +2695,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2695 2695
             else
2696 2696
             {
2697 2697
                 cols = "F_WorkOrderId,F_CusName,F_ComTitle,F_WorkState,F_MainDeptId,F_OtherDeptIds,F_DealTime,F_LeaveRecordId,F_CallRecordId,F_IsResult,F_IsProtect,F_IsReturn,F_CreateTime,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName, dbo.GetDeptNames(F_MainDeptId)as DeptNames,dbo.GetDictionaryName(F_InfoSource) as SourceName,F_CloseTime,F_ComContent,F_Identification,F_IsRelease,F_InfoSource" +
2698
-                    ",(case when PATINDEX('%" + User.F_UserCode + "%',a.F_See)= 0  then 0  when  PATINDEX('%" + User.F_UserCode + "%',a.F_See) IS NULL then 0 else 1 end) as See";
2698
+                    ",(case when PATINDEX('%''" + User.F_DeptId + "''%',a.F_See)= 0  then 0  when  PATINDEX('%''" + User.F_DeptId + "''%',a.F_See) IS NULL then 0 else 1 end) as See";
2699 2699
             }
2700 2700
             if (isdc > 0)
2701 2701
             {
@@ -3484,7 +3484,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
3484 3484
             //    + "dbo.GetDictionaryName(F_InfoSource) as SourceName,dbo.GetWorkOrderAssign(F_WorkOrderId) as DeptName ,dbo.GetLimitTime(F_WorkOrderId) as LimitTime";
3485 3485
             //string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName";
3486 3486
             string cols = "F_WorkOrderId,F_CusName,F_ComTitle,F_WorkState,F_MainDeptId,F_OtherDeptIds,F_DealTime,F_LeaveRecordId,F_CallRecordId,F_IsResult,F_IsProtect,F_IsReturn,F_CreateTime,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName,dbo.GetDeptNames(F_MainDeptID3) AS EJDeptName,F_CloseTime,F_IsRelease,F_Identification,F_IsRelease,F_InfoSource " +
3487
-                " ,(case when PATINDEX('%" + User.F_UserCode + "%',a.F_See)= 0  then 0  when  PATINDEX('%" + User.F_UserCode + "%',a.F_See) IS NULL then 0 else 1 end) as See";
3487
+                " ,(case when PATINDEX('%''" + User.F_DeptId + "''%',a.F_See)= 0  then 0  when  PATINDEX('%''" + User.F_DeptId + "''%',a.F_See) IS NULL then 0 else 1 end) as See";
3488 3488
             if (isdc > 0)
3489 3489
             {
3490 3490
                 var top = " "; var orderby = " order by F_CreateTime";
@@ -8547,17 +8547,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
8547 8547
                             }
8548 8548
                             if(dt.Rows[0]["F_See"] != null)
8549 8549
                             {
8550
-                                if (!dt.Rows[0]["F_See"].ToString ().Contains(User .F_UserCode ))
8550
+                                if (!dt.Rows[0]["F_See"].ToString ().Contains("'"+User .F_DeptId + "'"))
8551 8551
                                 {
8552 8552
                                     Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
8553
-                                    keyValuePairs.Add("F_See", dt.Rows[0]["F_See"].ToString()+","+ User.F_UserCode);
8553
+                                    keyValuePairs.Add("F_See", dt.Rows[0]["F_See"].ToString()+",'"+ User.F_DeptId+"'");
8554 8554
                                     workorderBLL.UpdateWorkOrder(int .Parse (dt.Rows[0]["F_Id"].ToString()), keyValuePairs);
8555 8555
                                 }
8556 8556
                             }
8557 8557
                             else
8558 8558
                             {
8559 8559
                                 Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
8560
-                                keyValuePairs.Add("F_See", User.F_UserCode);
8560
+                                keyValuePairs.Add("F_See", "'" + User.F_DeptId + "'");
8561 8561
                                 workorderBLL.UpdateWorkOrder(int.Parse(dt.Rows[0]["F_Id"].ToString()), keyValuePairs);
8562 8562
                             }
8563 8563
                             #region 声音文件
@@ -8678,8 +8678,19 @@ namespace CallCenterApi.Interface.Controllers.workorder
8678 8678
                     #endregion
8679 8679
                     case 4:
8680 8680
                         #region 办理情况
8681
-                        string blsql = "select *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDeptName(F_CreateDeptId) as DeptName from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime";
8682
-                        string ejblsql = "select *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDeptName(F_CreateDeptId) as DeptName from T_Bus_Feedback_Next WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime";
8681
+                        string blsql = "", ejblsql = "";
8682
+                        if (User .F_RoleCode == "WLDW" || User.F_RoleCode == "EJWLDW")
8683
+                        {
8684
+                            blsql = "select TOP 1 *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDeptName(F_CreateDeptId) as DeptName from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime";
8685
+                            ejblsql = "select TOP 1 *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDeptName(F_CreateDeptId) as DeptName from T_Bus_Feedback_Next WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime";
8686
+
8687
+                        }
8688
+                        else
8689
+                        {
8690
+                            blsql = "select *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDeptName(F_CreateDeptId) as DeptName from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime";
8691
+                            ejblsql = "select *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDeptName(F_CreateDeptId) as DeptName from T_Bus_Feedback_Next WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and  F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime";
8692
+
8693
+                        }
8683 8694
 
8684 8695
 
8685 8696
                         var bldt = DbHelperSQL.Query(blsql).Tables[0];

+ 10 - 9
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Common/ButtonGroup.cs

@@ -896,16 +896,17 @@ namespace CallCenterApi.Interface.Models.Common
896 896
                             buttons.Add(auditdeal());
897 897
                         }
898 898
 
899
-                        if (code == "EJWLDW")
899
+                        
900
+                    }
901
+                    if (code == "EJWLDW")
902
+                    {
903
+                        if (ispd == "1")
900 904
                         {
901
-                            if (ispd == "1")
902
-                            {
903
-                                buttons.Add(sign()); //buttons.Add(refuse());
904
-                            }
905
-                            if (ispd == "2")
906
-                            {
907
-                                buttons.Add(feedback());
908
-                            }
905
+                            buttons.Add(sign()); //buttons.Add(refuse());
906
+                        }
907
+                        if (ispd == "2")
908
+                        {
909
+                            buttons.Add(feedback());
909 910
                         }
910 911
                     }
911 912
                     //调度专员 中心领导管理员 管理员