浏览代码

增加筛选项,大屏修改

duhongyu 6 年之前
父节点
当前提交
74371207cc

+ 56 - 39
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WOReportController.cs

@@ -1842,7 +1842,9 @@ namespace CallCenterApi.Interface.Controllers.report
1842 1842
         /// 市场投诉处理时效明细表
1843 1843
         /// </summary>
1844 1844
         /// <returns></returns>
1845
-        public ActionResult GetPrescriptionList(string stime, string endtime, string salesBase, string channel, int page = 1, int limit = 10)
1845
+        public ActionResult GetPrescriptionList(string stime, string endtime, string salesBase, string channel, string
1846
+
1847
+question, int page = 1, int limit = 10)
1846 1848
         {
1847 1849
             string sql = $" and F_IsDelete=0";
1848 1850
             DataTable dt = new DataTable();
@@ -1856,6 +1858,10 @@ namespace CallCenterApi.Interface.Controllers.report
1856 1858
             {
1857 1859
                 sql += " and CONVERT(varchar , F_CreateOn, 120)<=CONVERT(varchar , '" + endtime.Trim() + " 23:59:59', 120) ";
1858 1860
             }
1861
+            if (!string.IsNullOrEmpty(question))
1862
+            {
1863
+                sql += $"  and T_Wo_WorkOrder.F_QuestionType in ( '" + GetComplaint("'" + question + "'") + "') "; ;
1864
+            }
1859 1865
             if (!string.IsNullOrWhiteSpace(salesBase))//销售基地
1860 1866
                 sql += $" and F_SalesBase like '%" + salesBase.Trim() + "%'";
1861 1867
             if (!string.IsNullOrWhiteSpace(channel))
@@ -2423,6 +2429,7 @@ namespace CallCenterApi.Interface.Controllers.report
2423 2429
                 foreach (var it in modlelist)
2424 2430
                 {
2425 2431
                     var itemList = itembll.GetModelList("  F_WoID=" + it.F_ID + "and F_WoState=1" + " order by F_ID desc");
2432
+                    
2426 2433
                     if (itemList.Count > 0)
2427 2434
                     {
2428 2435
                         if (itemList[0].F_NextDept > 0)
@@ -2978,7 +2985,7 @@ namespace CallCenterApi.Interface.Controllers.report
2978 2985
             DataTable QuestionManage = DbHelperSQL.Query(Queststr).Tables[0];
2979 2986
             List<Model.T_Wo_QuestionManage> categorylist = quesBLL.DataTableToList(QuestionManage);
2980 2987
             List<Complainthandling> modeNamelList = new List<Complainthandling>(categorylist.Count);
2981
-            var itemlasts = itembll.GetModelList("  F_ItemType=" + (int)EnumItemType.deal+ "order by F_ID desc ");
2988
+      //var itemlasts = itembll.GetModelList("  F_ItemType=" + (int)EnumItemType.deal+ "order by F_ID desc ");
2982 2989
             if (modellist !=null )
2983 2990
             {
2984 2991
                 for (int i=0;i < categorylist.Count; i++)
@@ -3041,26 +3048,36 @@ namespace CallCenterApi.Interface.Controllers.report
3041 3048
                                     worker.F_SalesBase = it.F_SalesBase;
3042 3049
                                     worker.F_Description = it.F_Description;
3043 3050
                                     string timeover = "", timeover2 = ""; int x = 0, y = 0;
3051
+                                    var itemList = itembll.GetModelList("  F_WoID=" + it.F_ID + "and F_WoState=1" + " order by F_ID desc");
3052
+                             
3053
+                                   
3054
+                                    if (itemList[0].F_NextDept > 0)
3055
+                                    {
3056
+                                        var deptmodel = departmentBLL.GetModel(int.Parse(itemList[0].F_NextDept.ToString()));
3057
+                                        if (deptmodel != null)
3058
+                                        {
3059
+                                            worker.F_Responsibility = deptmodel.F_DeptName;
3060
+                                        }
3061
+
3062
+                                    }
3044 3063
                                     int limit =0;
3045
-                                    if (itemlasts != null )
3064
+                                    if (itemList != null )
3046 3065
                                     {
3047
-                                     for (int z = 0; z < itemlasts.Count; z++)
3048
-                                      {
3049
-                                             if (it.F_ID == itemlasts[z].F_WoID)
3050
-                                              {
3051
-                                                if (itemlasts[z].F_WoState >= 1)
3066
+                                       for (int z = 0; z < itemList.Count; z++)
3067
+                                        {
3068
+                                                if (itemList[z].F_WoState >= 1)
3052 3069
                                                 {
3053
-                                                    if (itemlasts[z].F_WoState == 1)
3070
+                                                    if (itemList[z].F_WoState == 1)
3054 3071
                                                     {
3055 3072
                                                         x = z;
3056
-                                                        timeover = itemlasts[z].F_CreateTime.ToString();
3057
-                                                        limit =int .Parse ( itemlasts[z].F_LimitTime);
3073
+                                                        timeover = itemList[z].F_CreateTime.ToString();
3074
+                                                        limit =int .Parse (itemList[z].F_LimitTime);
3058 3075
                                                     }
3059
-                                                    if (itemlasts[z].F_WoState == 10)
3076
+                                                    if (itemList[z].F_WoState == 10)
3060 3077
                                                     {
3061 3078
                                                         y = z;
3062
-                                                        timeover2 = itemlasts[z].F_CreateTime.ToString();
3063
-                                                        limit = int.Parse(itemlasts[z].F_LimitTime);
3079
+                                                        timeover2 = itemList[z].F_CreateTime.ToString();
3080
+                                                        limit = int.Parse(itemList[z].F_LimitTime);
3064 3081
                                                     }
3065 3082
                                                 }
3066 3083
                                                 if (timeover2 != "")
@@ -3073,14 +3090,14 @@ namespace CallCenterApi.Interface.Controllers.report
3073 3090
                                                             double a = id.TotalHours;
3074 3091
                                                             worker.overtime = string .Format ("{0:f2}h", a - limit);
3075 3092
                                                             worker.time = a - limit;
3076
-                                                            if (itemlasts[x].F_NextDept > 0)
3077
-                                                            {
3078
-                                                                var deptment = departmentBLL.GetModel(int.Parse(itemlasts[x].F_NextDept.ToString()));
3079
-                                                                if (deptment != null)
3080
-                                                                {
3081
-                                                                    worker.F_Responsibility = deptment.F_DeptName;
3082
-                                                                }
3083
-                                                            }
3093
+                                                            //if (itemList[x].F_NextDept > 0)
3094
+                                                            //{
3095
+                                                            //    var deptment = departmentBLL.GetModel(int.Parse(itemList[x].F_NextDept.ToString()));
3096
+                                                            //    if (deptment != null)
3097
+                                                            //    {
3098
+                                                            //        worker.F_Responsibility = deptment.F_DeptName;
3099
+                                                            //    }
3100
+                                                            //}
3084 3101
 
3085 3102
                                                         }
3086 3103
                                                         else
@@ -3089,15 +3106,15 @@ namespace CallCenterApi.Interface.Controllers.report
3089 3106
                                                             double a = id.TotalHours;
3090 3107
                                                             worker.overtime = string.Format("{0:f2}h", a - limit);
3091 3108
                                                             worker.time = a - limit;
3092
-                                                            if (itemlasts[y].F_NextDept > 0)
3093
-                                                            {
3094
-                                                                var deptment = departmentBLL.GetModel(int.Parse(itemlasts[y].F_NextDept.ToString()));
3095
-                                                                if (deptment != null)
3096
-                                                                {
3097
-                                                                    worker.F_Responsibility = deptment.F_DeptName;
3098
-                                                                }
3109
+                                                            //if (itemList[y].F_NextDept > 0)
3110
+                                                            //{
3111
+                                                            //    var deptment = departmentBLL.GetModel(int.Parse(itemList[y].F_NextDept.ToString()));
3112
+                                                            //    if (deptment != null)
3113
+                                                            //    {
3114
+                                                            //        worker.F_Responsibility = deptment.F_DeptName;
3115
+                                                            //    }
3099 3116
 
3100
-                                                            }
3117
+                                                            //}
3101 3118
 
3102 3119
                                                         }
3103 3120
                                                     }
@@ -3109,18 +3126,18 @@ namespace CallCenterApi.Interface.Controllers.report
3109 3126
                                                     double a = id.TotalHours;
3110 3127
                                                     worker.overtime = string.Format("{0:f2}h", a - limit);
3111 3128
                                                     worker.time = a - limit;
3112
-                                                    if (itemlasts[x].F_NextDept > 0)
3113
-                                                    {
3114
-                                                        var deptment = departmentBLL.GetModel(int.Parse(itemlasts[x].F_NextDept.ToString()));
3115
-                                                        if (deptment != null)
3116
-                                                        {
3117
-                                                            worker.F_Responsibility = deptment.F_DeptName;
3118
-                                                        }
3119
-                                                    }
3129
+                                                    //if (itemList[x].F_NextDept > 0)
3130
+                                                    //{
3131
+                                                    //    var deptment = departmentBLL.GetModel(int.Parse(itemList[x].F_NextDept.ToString()));
3132
+                                                    //    if (deptment != null)
3133
+                                                    //    {
3134
+                                                    //        worker.F_Responsibility = deptment.F_DeptName;
3135
+                                                    //    }
3136
+                                                    //}
3120 3137
                                                 }
3121 3138
 
3122 3139
 
3123
-                                            }
3140
+                                            
3124 3141
                                            
3125 3142
                                         }
3126 3143
                                         }

+ 6 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/ZuoXiManYiDuController.cs

@@ -33,7 +33,12 @@ namespace CallCenterApi.Interface.Controllers.report
33 33
             ActionResult res = NoToken("未知错误,请重新登录");
34 34
 
35 35
             DataTable dtNew = new DataTable();
36
-            dtNew = getData(stime, endtime);
36
+            if (string .IsNullOrEmpty (stime) && string.IsNullOrEmpty(endtime))
37
+            {
38
+                stime = (DateTime.Now.AddDays(1 - DateTime.Now.Day).Date).ToString("yyyy-MM-dd");
39
+                endtime = DateTime.Now.ToString("yyyy-MM-dd");
40
+            }
41
+                dtNew = getData(stime, endtime);
37 42
             res = Success("获取坐席满意度评价情况报表数据成功", dtNew);
38 43
             return res;
39 44
         }

+ 31 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -2463,10 +2463,36 @@ namespace CallCenterApi.Interface.Controllers.workorder
2463 2463
 
2464 2464
         }
2465 2465
         /// <summary>
2466
+        /// 获取问题类别
2467
+        /// </summary>
2468
+        /// <returns></returns>
2469
+        public string GetComplaint(string msg)
2470
+        {
2471
+            string str = "";
2472
+            string str1 = " select F_Id from T_Wo_QuestionManage where F_QuestionName in(" + msg + ")";
2473
+            string str3 = " select F_Id from T_Wo_QuestionManage where F_ParentId in(" + str1 + ")";
2474
+            var dept = quesBLL.GetModelList("F_ParentId in(" + str3 + ")");
2475
+            if (dept != null)
2476
+            {
2477
+                foreach (var it in dept)
2478
+                {
2479
+
2480
+                    if (str != "")
2481
+                        str += "','" + it.F_Id;
2482
+                    else
2483
+                        str += it.F_Id;
2484
+
2485
+                }
2486
+            }
2487
+            //  string str4 = " select F_Id from T_Wo_QuestionManage where F_ParentId in(" + str3 + ")";
2488
+            return str;
2489
+        }
2490
+
2491
+        /// <summary>
2466 2492
         ///综合查询列表
2467 2493
         /// </summary>
2468 2494
         public ActionResult GetComprehensive(string code, string cusname,string createby, string starttime, string endtime, string keywords, string cusphone, string companyname, string province, string city,
2469
-            string country, string township,string category,string salebase, string touser,string visitby, string visitresult, int source = 0,int state=-1, int type = 0, int pageindex = 1, int pagesize = 10)
2495
+            string country, string township,string category,string salebase, string touser,string visitby, string visitresult, string question,int source = 0,int state=-1, int type = 0, int pageindex = 1, int pagesize = 10)
2470 2496
         {
2471 2497
             int userId = CurrentUser.UserData.F_UserId;
2472 2498
             if (userId != 0)
@@ -2497,6 +2523,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
2497 2523
                         sql += $" and F_State=" + state;
2498 2524
                     }
2499 2525
                 }
2526
+                if (!string.IsNullOrEmpty(question))
2527
+                {
2528
+                    sql += $"  and T_Wo_WorkOrder.F_QuestionType in ( '" + GetComplaint("'"+question+"'") + "') "; ;
2529
+                }
2500 2530
                 if (source > 0)//工单来源
2501 2531
                     sql += $" and F_Source=" + source;
2502 2532
                 if (!string.IsNullOrWhiteSpace(createby))//创建人