Browse Source

定时任务,坐席工作统计分组,回访报表

duhongyu 4 years ago
parent
commit
f59f5cd222

+ 32 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WorkOrderReportController.cs

954
             return Success("成功", obj);
954
             return Success("成功", obj);
955
         }
955
         }
956
 
956
 
957
+        public ActionResult GetUserReturn(DateTime? start, DateTime? end, bool isExport = false)
958
+        {
959
+            StringBuilder sb1 = new StringBuilder();
960
+            StringBuilder sb2 = new StringBuilder();
961
+            if (start == null)
962
+            {
963
+                start = DateTime.Now;
964
+                start = new DateTime(start.Value.Year, start.Value.Month, 1);
965
+            }
966
+            if (end == null)
967
+            {
968
+                end = DateTime.Now;
969
+            }
970
+            Dictionary<string, string> paras = new Dictionary<string, string>();
971
+            paras.Add("@sdate", start.Value.ToString("yyyy-MM-dd HH:mm:ss"));
972
+            paras.Add("@edate", end.Value.ToString("yyyy-MM-dd HH:mm:ss"));
973
+            var obj = DbHelperSQL.RunProcedure("P_UserReturn", paras, "UserReturn");
974
+            if (isExport)
975
+            {
976
+                string[] cols = new string[] { "姓名", "工单量", "回访量", "未回访量", "回访率" };
977
+                NPOIHelper npoi = new NPOIHelper();
978
+                if (npoi.ExportToExcel("坐席回访统计报表", obj.Tables[0], cols) == "")
979
+                {
980
+                    return Success("导出成功");
981
+                }
982
+                else
983
+                {
984
+                    return Error("导出失败");
985
+                }
986
+            }
987
+            return Success("成功", obj);
988
+        }
957
         /// <summary>
989
         /// <summary>
958
         /// 逾期未回复统计
990
         /// 逾期未回复统计
959
         /// </summary>
991
         /// </summary>

+ 5 - 5
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Global.asax.cs

15
 {
15
 {
16
     public class MvcApplication : System.Web.HttpApplication
16
     public class MvcApplication : System.Web.HttpApplication
17
     {
17
     {
18
-        //private static QuartzWorker _worker;
18
+        private static QuartzWorker _worker;
19
         protected void Application_Start()
19
         protected void Application_Start()
20
         {
20
         {
21
             AreaRegistration.RegisterAllAreas();
21
             AreaRegistration.RegisterAllAreas();
23
             //clq 增加异常日志记录 自定义 HandleErrorAttribute
23
             //clq 增加异常日志记录 自定义 HandleErrorAttribute
24
             FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
24
             FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
25
 
25
 
26
-            //_worker = new QuartzWorker();
27
-            //var callPlanWork = new CallPlanWork();
28
-            //_worker.AddWork(callPlanWork);
29
-            //_worker.Start();
26
+            _worker = new QuartzWorker();
27
+            var satisfactionClose = new SatisfactionClose();
28
+            _worker.AddWork(satisfactionClose);
29
+            _worker.Start();
30
         }
30
         }
31
 
31
 
32
         protected void Application_AuthenticateRequest(object sender, EventArgs e)
32
         protected void Application_AuthenticateRequest(object sender, EventArgs e)