Quellcode durchsuchen

知识库已读未读

duhongyu vor 3 Jahren
Ursprung
Commit
a3dc444c0b

+ 4 - 0
CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs

@@ -967,6 +967,10 @@ namespace CallCenterApi.DAL
967 967
                 {
968 968
                     model.F_SpotCheck = int.Parse(row["F_SpotCheck"].ToString());
969 969
                 }
970
+                if (row["F_See"] != null)
971
+                {
972
+                    model.F_See = row["F_See"].ToString();
973
+                }
970 974
                 
971 975
             }
972 976
             return model;

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

@@ -300,13 +300,21 @@ namespace CallCenterApi.Interface.Controllers.knowledge
300 300
             }
301 301
             if (strkey.Trim() != "" && strkey != "undefined")
302 302
             {
303
-                sql += " and F_Content  like '%" + strkey + "%'";
303
+                sql += " and F_Title  like '%" + strkey + "%'";
304 304
             }
305 305
             if (knowledgekey.Trim() != "" && knowledgekey != "undefined")
306 306
             {
307 307
                 sql += " and    F_RepositoryId in (select F_RepositoryId from  T_RepositoryInformation  where  F_Content like '%" + knowledgekey + "%')  ";
308 308
             }
309
+            if (strpageindex.Trim() != "")
310
+            {
311
+                pageindex = Convert.ToInt32(strpageindex);
312
+            }
309 313
 
314
+            if (strpagesize.Trim() != "")
315
+            {
316
+                pagesize = Convert.ToInt32(strpagesize);
317
+            }
310 318
             int recordCount = 0;
311 319
             dt = BLL.PagerBLL.GetListPager(
312 320
                 "T_RepositoryLog",
@@ -365,7 +373,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
365 373
 
366 374
         [Authority]
367 375
         //添加知识库
368
-        public ActionResult AddInfo(string title, string con, string pid,string key, int issub=0, int keyid = 0,int demandsid=0)
376
+        public ActionResult AddInfo(string title, string con, string pid,string key, int issub=1, int keyid = 0,int demandsid=0)
369 377
         {
370 378
             Model.T_RepositoryInformation dModel = new Model.T_RepositoryInformation();
371 379
             if (string.IsNullOrEmpty(title))

+ 3 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/RepositoryController.cs

@@ -544,7 +544,9 @@ namespace CallCenterApi.Interface.Controllers.knowledge
544 544
                 "T_Repository_List_Demands a",
545 545
                 "F_DemandsId",
546 546
                 "*,dbo.GetDeptName(F_Deptid) F_DeptName,dbo.GetUserName(F_CreateUser) as F_CreateUserName,dbo.GetUserName(F_SubmitUser) as F_SubmitUserName" +
547
-                ",(select F_Score from T_RepositoryInformation where F_RepositoryId=a.F_RepositoryId) as F_Score",
547
+                ",(select F_Score from T_RepositoryInformation where F_RepositoryId=a.F_RepositoryId) as F_Score" +
548
+                ",(select  top 1 F_ISPass from T_RepositoryAudit where F_RepositoryId=a.F_RepositoryId order by F_CreateOn desc) as F_ISPass" +
549
+                ",(select  top 1 F_AuditRemark from T_RepositoryAudit where F_RepositoryId=a.F_RepositoryId order by F_CreateOn desc) as F_AuditRemark",
548 550
                 sql,
549 551
                 "ORDER BY F_CreateTime desc",
550 552
                 pagesize,

+ 39 - 22
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -1810,7 +1810,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
1810 1810
             //string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName";
1811 1811
             string cols = "";
1812 1812
             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" +
1813
-              "and F_WorkOrderId=a.F_WorkOrderId order by F_CreateTime desc ) as Backreason ,F_CloseTime,F_Identification,F_IsRelease,F_InfoSource,F_Note";
1813
+              "and F_WorkOrderId=a.F_WorkOrderId order by F_CreateTime desc ) as Backreason ,F_CloseTime,F_Identification,F_IsRelease,F_InfoSource,F_Note" +
1814
+              ",(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";
1814 1815
             if (smspy > -1)
1815 1816
             {
1816 1817
                 order = "  order by F_Id  desc";
@@ -2577,21 +2578,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
2577 2578
             {
2578 2579
                 sql += " and F_CreateTime<='" + strendtime + "' ";
2579 2580
             }
2580
-            if (deptid != 0 && strtab != "1")
2581
-            {
2582
-                if (deptlevel == 0)
2583
-                {
2584
-                    string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo WITH(NOLOCK) where F_MainDeptId = '" + deptid + "' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
2585
-                    //string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo where ',' + F_MainDeptID + ',' like '%," + deptid.ToString() + ",%' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
2586
-                    sql += " and F_WorkOrderID in(" + sqlwhere + ")";
2587
-                }
2588
-                else
2589
-                {
2590
-                    //string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo_Next where ',' + F_MainDeptID + ',' like '%," + deptid.ToString() + ",%' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
2591
-                    string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo_Next WITH(NOLOCK) where F_MainDeptId = '" + deptid + "' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
2592
-                    sql += " and F_WorkOrderID in(" + sqlwhere + ")";
2593
-                }
2594
-            }
2581
+            //if (deptid != 0 && strtab != "1")
2582
+            //{
2583
+            //    if (deptlevel == 0)
2584
+            //    {
2585
+            //        string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo WITH(NOLOCK) where F_MainDeptId = '" + deptid + "' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
2586
+            //        //string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo where ',' + F_MainDeptID + ',' like '%," + deptid.ToString() + ",%' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
2587
+            //        sql += " and F_WorkOrderID in(" + sqlwhere + ")";
2588
+            //    }
2589
+            //    else
2590
+            //    {
2591
+            //        //string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo_Next where ',' + F_MainDeptID + ',' like '%," + deptid.ToString() + ",%' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
2592
+            //        string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo_Next WITH(NOLOCK) where" +
2593
+            //            " F_MainDeptId = '" + deptid + "' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
2594
+            //        sql += " and F_WorkOrderID in(" + sqlwhere + ")";
2595
+            //    }
2596
+            //}
2595 2597
             if (deptid != 0)
2596 2598
             {
2597 2599
                 sql += " and  (F_MainDeptId in (select F_DeptId from  GetDeptId ('" + deptid + "')) or F_MainDeptID3='" + deptid + "')";
@@ -2626,7 +2628,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
2626 2628
 
2627 2629
             else
2628 2630
             {
2629
-                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";
2631
+                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" +
2632
+                    ",(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";
2630 2633
             }
2631 2634
             if (isdc > 0)
2632 2635
             {
@@ -3405,7 +3408,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
3405 3408
             //string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetOverState(F_WorkOrderId) as OverState,"
3406 3409
             //    + "dbo.GetDictionaryName(F_InfoSource) as SourceName,dbo.GetWorkOrderAssign(F_WorkOrderId) as DeptName ,dbo.GetLimitTime(F_WorkOrderId) as LimitTime";
3407 3410
             //string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName";
3408
-            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";
3411
+            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 " +
3412
+                " ,(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";
3409 3413
             if (isdc > 0)
3410 3414
             {
3411 3415
                 var top = " "; var orderby = " order by F_CreateTime";
@@ -8465,8 +8469,21 @@ namespace CallCenterApi.Interface.Controllers.workorder
8465 8469
                                     dt.Rows[0]["F_ConPhone"] = "";
8466 8470
                                 }
8467 8471
                             }
8468
-
8469
-
8472
+                            if(dt.Rows[0]["F_See"] != null)
8473
+                            {
8474
+                                if (!dt.Rows[0]["F_See"].ToString ().Contains(User .F_UserCode ))
8475
+                                {
8476
+                                    Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
8477
+                                    keyValuePairs.Add("F_See", dt.Rows[0]["F_See"].ToString()+","+ User.F_UserCode);
8478
+                                    workorderBLL.UpdateWorkOrder(int .Parse (dt.Rows[0]["F_Id"].ToString()), keyValuePairs);
8479
+                                }
8480
+                            }
8481
+                            else
8482
+                            {
8483
+                                Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
8484
+                                keyValuePairs.Add("F_See", User.F_UserCode);
8485
+                                workorderBLL.UpdateWorkOrder(int.Parse(dt.Rows[0]["F_Id"].ToString()), keyValuePairs);
8486
+                            }
8470 8487
                             #region 声音文件
8471 8488
                             dt.Columns.Add("FilePath", typeof(string));
8472 8489
 
@@ -18553,9 +18570,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
18553 18570
                                 oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
18554 18571
 
18555 18572
                                 string userinfo = User.depname + "(" + User.F_UserCode + ")";
18556
-                                if (!string.IsNullOrEmpty(assignedopinion))
18573
+                                if (!string.IsNullOrEmpty(reason))
18557 18574
                                 {
18558
-                                    oper.F_Message = userinfo + " 提交了驳回重办工单,意见:" + assignedopinion;
18575
+                                    oper.F_Message = userinfo + " 提交了驳回重办工单,原因:" + reason;
18559 18576
                                 }
18560 18577
                                 else
18561 18578
                                 {

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Common/ButtonGroup.cs

@@ -735,7 +735,7 @@ namespace CallCenterApi.Interface.Models.Common
735 735
                     if (code == "SPZ" || code == "ZXHWY" || code == "GLY" || code == "SPZJZ")
736 736
                     {
737 737
                         buttons.Add(subreload());
738
-                        buttons.Add(end());
738
+                        //buttons.Add(end());
739 739
                         buttons.Add(modify());
740 740
                     }
741 741
                     else if (code == "ZXLD" || code == "YSZY" || code == "MTDD")

+ 4 - 0
CallCenterApi/CallCenterApi.Model/T_Bus_WorkOrder.cs

@@ -752,6 +752,10 @@ namespace CallCenterApi.Model
752 752
         /// 是否抽查
753 753
         /// </summary>
754 754
         public int? F_SpotCheck { set; get; }
755
+        /// <summary>
756
+        /// 查看人
757
+        /// </summary>
758
+        public string F_See { set; get; }
755 759
         #endregion Model
756 760
 
757 761
     }