瀏覽代碼

知识库已读未读

duhongyu 3 年之前
父節點
當前提交
a3dc444c0b

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

967
                 {
967
                 {
968
                     model.F_SpotCheck = int.Parse(row["F_SpotCheck"].ToString());
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
             return model;
976
             return model;

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

300
             }
300
             }
301
             if (strkey.Trim() != "" && strkey != "undefined")
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
             if (knowledgekey.Trim() != "" && knowledgekey != "undefined")
305
             if (knowledgekey.Trim() != "" && knowledgekey != "undefined")
306
             {
306
             {
307
                 sql += " and    F_RepositoryId in (select F_RepositoryId from  T_RepositoryInformation  where  F_Content like '%" + knowledgekey + "%')  ";
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
             int recordCount = 0;
318
             int recordCount = 0;
311
             dt = BLL.PagerBLL.GetListPager(
319
             dt = BLL.PagerBLL.GetListPager(
312
                 "T_RepositoryLog",
320
                 "T_RepositoryLog",
365
 
373
 
366
         [Authority]
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
             Model.T_RepositoryInformation dModel = new Model.T_RepositoryInformation();
378
             Model.T_RepositoryInformation dModel = new Model.T_RepositoryInformation();
371
             if (string.IsNullOrEmpty(title))
379
             if (string.IsNullOrEmpty(title))

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

544
                 "T_Repository_List_Demands a",
544
                 "T_Repository_List_Demands a",
545
                 "F_DemandsId",
545
                 "F_DemandsId",
546
                 "*,dbo.GetDeptName(F_Deptid) F_DeptName,dbo.GetUserName(F_CreateUser) as F_CreateUserName,dbo.GetUserName(F_SubmitUser) as F_SubmitUserName" +
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
                 sql,
550
                 sql,
549
                 "ORDER BY F_CreateTime desc",
551
                 "ORDER BY F_CreateTime desc",
550
                 pagesize,
552
                 pagesize,

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

1810
             //string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName";
1810
             //string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName";
1811
             string cols = "";
1811
             string cols = "";
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" +
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
             if (smspy > -1)
1815
             if (smspy > -1)
1815
             {
1816
             {
1816
                 order = "  order by F_Id  desc";
1817
                 order = "  order by F_Id  desc";
2577
             {
2578
             {
2578
                 sql += " and F_CreateTime<='" + strendtime + "' ";
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
             if (deptid != 0)
2597
             if (deptid != 0)
2596
             {
2598
             {
2597
                 sql += " and  (F_MainDeptId in (select F_DeptId from  GetDeptId ('" + deptid + "')) or F_MainDeptID3='" + deptid + "')";
2599
                 sql += " and  (F_MainDeptId in (select F_DeptId from  GetDeptId ('" + deptid + "')) or F_MainDeptID3='" + deptid + "')";
2626
 
2628
 
2627
             else
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
             if (isdc > 0)
2634
             if (isdc > 0)
2632
             {
2635
             {
3405
             //string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetOverState(F_WorkOrderId) as OverState,"
3408
             //string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetOverState(F_WorkOrderId) as OverState,"
3406
             //    + "dbo.GetDictionaryName(F_InfoSource) as SourceName,dbo.GetWorkOrderAssign(F_WorkOrderId) as DeptName ,dbo.GetLimitTime(F_WorkOrderId) as LimitTime";
3409
             //    + "dbo.GetDictionaryName(F_InfoSource) as SourceName,dbo.GetWorkOrderAssign(F_WorkOrderId) as DeptName ,dbo.GetLimitTime(F_WorkOrderId) as LimitTime";
3407
             //string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName";
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
             if (isdc > 0)
3413
             if (isdc > 0)
3410
             {
3414
             {
3411
                 var top = " "; var orderby = " order by F_CreateTime";
3415
                 var top = " "; var orderby = " order by F_CreateTime";
8465
                                     dt.Rows[0]["F_ConPhone"] = "";
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
                             #region 声音文件
8487
                             #region 声音文件
8471
                             dt.Columns.Add("FilePath", typeof(string));
8488
                             dt.Columns.Add("FilePath", typeof(string));
8472
 
8489
 
18553
                                 oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
18570
                                 oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
18554
 
18571
 
18555
                                 string userinfo = User.depname + "(" + User.F_UserCode + ")";
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
                                 else
18577
                                 else
18561
                                 {
18578
                                 {

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

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

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

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