1550076451 před 1 rokem
rodič
revize
a15768b51f

+ 2 - 0
CallCenterApi/CallCenterApi.BLL/T_Sys_DictionaryValue.cs

@@ -283,6 +283,8 @@ namespace CallCenterApi.BLL
283 283
             RedisHelper.KeyDelete("ztree_38new");
284 284
             RedisHelper1.KeyDelete("key_38");
285 285
             RedisHelper1.KeyDelete("ZTreeList_0");
286
+            RedisHelper1.KeyDelete("ztreeDic_38new");
287
+            RedisHelper1.KeyDelete("dickey_38");
286 288
         }
287 289
     }
288 290
 }

File diff suppressed because it is too large
+ 77 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/DictionaryController.cs


+ 127 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/BusinessController.cs

@@ -398,7 +398,7 @@ namespace CallCenterApi.Interface.Controllers.report
398 398
         }
399 399
 
400 400
         /// <summary>
401
-        /// 逾期工单报表
401
+        /// 逾期统计
402 402
         /// </summary>
403 403
         /// <returns></returns>
404 404
         public ActionResult GetDeptYiQiList(int isdc = 0)
@@ -446,7 +446,133 @@ namespace CallCenterApi.Interface.Controllers.report
446 446
             };
447 447
             return Success("成功", obj);
448 448
         }
449
+        /// <summary>
450
+        /// 数据汇总报表
451
+        /// </summary>
452
+        /// <returns></returns>
453
+        public ActionResult GetDeptSummary(string sdate,string edate,int deptid=0)
454
+        {
455
+           if (User.F_RoleCode=="WLDW")
456
+            {
457
+                deptid = User.F_DeptId;
458
+            }
459
+             if (string .IsNullOrEmpty(sdate))
460
+            {
461
+                sdate = DateTime.Now.ToString("yyyy-MM") + "-01 00:00:00";
462
+            }
463
+            if (string.IsNullOrEmpty(edate))
464
+            {
465
+                edate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") ;
466
+            }
467
+            Dictionary<string, string> paras = new Dictionary<string, string>();
468
+           
469
+            paras.Add("@sdate", sdate);
470
+            paras.Add("@edate", edate);
471
+            if (deptid>0)
472
+            {
473
+                paras.Add("@deptid", deptid.ToString());
474
+            }
475
+            var obj = DbHelperSQL.RunProcedure("P_DeptSummary", paras, "DeptSummary");
476
+            return Success("成功", obj);
477
+        }
478
+        /// <summary>
479
+        /// 数据汇总列表
480
+        /// </summary>
481
+        /// <returns></returns>
482
+        public ActionResult GetDeptSummaryList(string sdate, string edate,int tab=1, int deptid = 0,int  isdc = 0)
483
+        {
484
+            if (User.F_RoleCode == "WLDW")
485
+            {
486
+                deptid = User.F_DeptId;
487
+            }
488
+            if (string.IsNullOrEmpty(sdate))
489
+            {
490
+                sdate = DateTime.Now.ToString("yyyy-MM") + "-01 00:00:00";
491
+            }
492
+            if (string.IsNullOrEmpty(edate))
493
+            {
494
+                edate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
495
+            }
496
+            if (deptid<=0)
497
+            {
498
+                return Error("请选择部门");
499
+            }
500
+            string strpageindex = RequestString.GetQueryString("page");
501
+            int pageindex = 1;
502
+            string strpagesize = RequestString.GetQueryString("pagesize");
503
+            int pagesize = 10;
504
+            if (strpageindex.Trim() != "")
505
+            {
506
+                pageindex = Convert.ToInt32(strpageindex);
507
+            }
508
+
509
+            if (strpagesize.Trim() != "")
510
+            {
511
+                pagesize = Convert.ToInt32(strpagesize);
512
+            }
513
+            string sql = $" and a.F_IsDelete=0 and a.F_CreateTime >='{sdate}'  " +
514
+          $" and a.F_CreateTime <= '{edate}'   and a.F_MainDeptId ={deptid}  and a.F_IsResult != 1 ";
515
+            string join = "";
516
+            switch(tab )
517
+            {
518
+                case 1://逾期件
519
+                    sql += " and a.F_LimitTime<ISNULL(a.F_DealTime,GETDATE())";
520
+                    break;
521
+                case 2://回访满意件
522
+                    join = " inner  join (select * " +
523
+                         " from(select F_IsSatisfied, F_WorkOrderId, " +
524
+                         " ROW_NUMBER() over(partition by F_WorkOrderId order by F_ID desc) " +
525
+                         " m from T_Bus_Feedback WHERE F_IsDelete = 0 ) " +
526
+                         " t1 where m = 1) b on a.F_WorkOrderId = b.F_WorkOrderId " +
527
+                         " and b.F_IsSatisfied not  in(0,-1,3) ";
528
+                    break;
529
+                case 3://回访不满意件
530
+                    join = " inner  join (select * " +
531
+                        " from(select F_IsSatisfied, F_WorkOrderId, " +
532
+                        " ROW_NUMBER() over(partition by F_WorkOrderId order by F_ID desc) " +
533
+                        " m from T_Bus_Feedback WHERE F_IsDelete = 0 ) " +
534
+                        " t1 where m = 1) b on a.F_WorkOrderId = b.F_WorkOrderId " +
535
+                        " and b.F_IsSatisfied in(-1,3) ";
536
+                    break;
537
+                case 4://退单件
538
+                    sql += " and a.F_Identification  in(1,2)";
539
+                    break;
540
+                case 5://按时查收件
541
+                    join = " inner  join (select * " +
542
+                        " from(select F_SureTime, F_IsReload, F_TimeResp, F_WorkOrderId, " +
543
+                        "  ROW_NUMBER() over(partition by F_WorkOrderId order by F_ID desc) m " +
544
+                        "from T_Bus_AssignedInfo " +
545
+                        " WHERE F_IsDelete = 0 ) t1 where m=1) b on a.F_WorkOrderId=b.F_WorkOrderId " +
546
+                        " and ((b.ISNULL(F_SureTime,GETDATE())<=F_TimeResp and F_TimeResp is not null)" +
547
+                        " or b.F_IsReload>0)";
548
+                    break;
549
+               
550
+            }
551
+
552
+
553
+            string cols = "a.F_WorkOrderId,dbo.GetDeptName(a.F_MainDeptId) DeptName" +
554
+                ",a.F_LimitTime,a.F_WorkState,a.F_ComTitle,a.F_ComContent";
555
+            int recordCount = 0;
556
+            var dt = BLL.PagerBLL.GetListPager(
557
+                "T_Bus_WorkOrder a WITH(NOLOCK)" + join,
558
+                "a.F_Id",
559
+                cols,
560
+                sql ,
561
+                "ORDER BY a.F_Id DESC",
562
+                pagesize,
563
+                pageindex,
564
+                true,
565
+                out recordCount);
449 566
 
567
+            var obj = new
568
+            {
569
+                state = "success",
570
+                message = "成功",
571
+                rows = dt,
572
+                total = recordCount
573
+            };
574
+            return Content(obj.ToJson());
575
+        }
450 576
         /// <summary>
451 577
         /// 办理情况统计(台账)
452 578
         /// </summary>