zhaozhiqiang %!s(int64=3) %!d(string=před) roky
rodič
revize
49e1240606

+ 60 - 23
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WorkOrderReportController.cs

@@ -283,18 +283,33 @@ namespace CallCenterApi.Interface.Controllers.report
283 283
                 for (int i = 0; i < obj.Tables[0].Rows.Count; i++)
284 284
                 {
285 285
                     int completedcount = 0, timelycount = 0, timeoutcount = 0; double timelyrate = 0;
286
+                    int slcount = 0;//受理量
287
+                    int bjcount = 0;//办结量
288
+                    int remindcount = 0;//催办量
289
+                    double bjlyrate = 0;//办结率
290
+                    double yqlyrate = 0;// 延期率
291
+                    int.TryParse(obj.Tables[0].Rows[i]["slcount"].ToString(), out slcount);
292
+                    int.TryParse(obj.Tables[0].Rows[i]["bjcount"].ToString(), out bjcount);
286 293
                     int.TryParse(obj.Tables[0].Rows[i]["completedcount"].ToString(), out completedcount);
287 294
                     int.TryParse(obj.Tables[0].Rows[i]["timelycount"].ToString(), out timelycount);
288 295
                     int.TryParse(obj.Tables[0].Rows[i]["timeoutcount"].ToString(), out timeoutcount);
289
-                  //  timeoutcount = completedcount - timelycount;
290
-                  // obj.Tables[0].Rows[i]["timeoutcount"] = timeoutcount;
291
-                    
292
-                    if (completedcount > 0)
296
+                    int.TryParse(obj.Tables[0].Rows[i]["remindcount"].ToString(), out remindcount);
297
+                    //  timeoutcount = completedcount - timelycount;
298
+                    // obj.Tables[0].Rows[i]["timeoutcount"] = timeoutcount;
299
+                    if (slcount > 0)
293 300
                     {
294
-                        timelyrate = double.Parse((timelycount * 100).ToString()) / completedcount;
295
-                        obj.Tables[0].Rows[i]["timelyrate"] = timelyrate.ToString("f") + "%";
296
-                        obj.Tables[0].Rows[i]["rate"] = timelyrate;
301
+                        bjlyrate=bjcount/ slcount;
302
+                        obj.Tables[0].Rows[i]["bjlyrate"] = (bjlyrate*100).ToString("0") + "%";//办结率
303
+
304
+                        yqlyrate=timeoutcount / slcount;
305
+                        obj.Tables[0].Rows[i]["yqlyrate"] = (yqlyrate*100).ToString("0") + "%";//办结率
297 306
                     }
307
+                    //if (completedcount > 0)
308
+                    //{
309
+                    //    timelyrate = double.Parse((timelycount * 100).ToString()) / completedcount;
310
+                    //    obj.Tables[0].Rows[i]["timelyrate"] = timelyrate.ToString("f") + "%";
311
+                    //    obj.Tables[0].Rows[i]["rate"] = timelyrate;
312
+                    //}
298 313
                 }
299 314
                 obj.Tables[0].DefaultView.Sort = "rate desc";
300 315
                 newSet.Tables.Add(obj.Tables[0].DefaultView.ToTable());
@@ -303,7 +318,7 @@ namespace CallCenterApi.Interface.Controllers.report
303 318
             }
304 319
             if (isExport)
305 320
             {
306
-                string[] cols = new string[] { "单位名称", "处理总量", "及时量", "超时量", "处理及时率" };
321
+                string[] cols = new string[] { "单位名称", "受理量", "办结量", "及时量", "超时量", "催办量", "办结率", "延期率" };
307 322
                 NPOIHelper npoi = new NPOIHelper();
308 323
                 if (npoi.ExportToExcel("处理效率统计报表", newSet.Tables[0], cols) == "")
309 324
                 {
@@ -2451,18 +2466,23 @@ namespace CallCenterApi.Interface.Controllers.report
2451 2466
         public ActionResult GetDayweekmonth(DateTime? date, int type = 0, int dateType = 0, int deptid = 0
2452 2467
             , bool isExport = false)
2453 2468
         {
2469
+            var date1 = date;
2470
+            var start1 = "";
2454 2471
             if (date == null)
2455 2472
             {
2456 2473
                 date = DateTime.Now.Date;
2474
+                start1 = DateTime.Now.ToString("yyyy-MM-dd");
2457 2475
             }
2458 2476
             if (type == 1)
2459 2477
             {
2460 2478
                 DateTime start = date.Value;
2461 2479
                 DateTime end = date.Value;
2462 2480
                 string where = "";
2481
+                string where1 = "";
2463 2482
                 if (dateType==1)
2464 2483
                 {
2465 2484
                     where = "and F_CreateTime>='" + date.Value.ToString("yyyy-MM-dd")+"' ";
2485
+                    where1 = " and wo.F_AssignTime <= CONVERT(datetime, '" + start1 + "' + ' 23:59:59', 20) and  wo.F_AssignTime>=CONVERT(datetime,'" + start1 + "'+' 00:00:00',20)";
2466 2486
                 }
2467 2487
                 else if (dateType == 2)
2468 2488
                 {
@@ -2476,6 +2496,7 @@ namespace CallCenterApi.Interface.Controllers.report
2476 2496
                     end = date.Value .AddDays(lastWeekDiff);
2477 2497
                     where = "and F_CreateTime>='" + start.ToString("yyyy-MM-dd")+"' ";
2478 2498
                     where = "and F_CreateTime<='" + end.ToString("yyyy-MM-dd")+"' ";
2499
+                    where1 = " and wo.F_AssignTime <= CONVERT(datetime, '" + end.ToString("yyyy-MM-dd") + "' + ' 23:59:59', 20) and  wo.F_AssignTime>=CONVERT(datetime,'" + start.ToString("yyyy-MM-dd") + "'+' 00:00:00',20)";
2479 2500
                 }
2480 2501
                 else
2481 2502
                 {
@@ -2483,35 +2504,51 @@ namespace CallCenterApi.Interface.Controllers.report
2483 2504
                     end = start.AddMonths(1).AddDays(-1);
2484 2505
                     where = "and F_CreateTime>='" + start.ToString("yyyy-MM-dd")+"'";
2485 2506
                     where = "and F_CreateTime<='" + end.ToString("yyyy-MM-dd")+"'";
2507
+
2508
+                     where1 = " and wo.F_AssignTime <= CONVERT(datetime, '" + end.ToString("yyyy-MM-dd") + "' + ' 23:59:59', 20) and  wo.F_AssignTime>=CONVERT(datetime,'" + start.ToString("yyyy-MM-dd") + "'+' 00:00:00',20)";
2486 2509
                 }
2487
-                string sql = $"  select  count(1)as 受理  from T_Bus_WorkOrder a where F_IsDelete=0"+ where;
2488
-                var dtsql = DbHelperSQL.Query(sql).Tables[0];
2489
-                string sql1 = $"  select COUNT(1) from T_Bus_WorkOrder a where a.F_DealTime >(SELECT cast(convert(varchar(10),a .F_CreateTime ,120)+' 00:00:00' as datetime)) and  a.F_DealTime <(SELECT cast(convert(varchar(10),a .F_CreateTime ,120)+' 23:59:59' as datetime))  and F_WorkState in (6,7,9,14) and F_IsDelete=0 " + where;
2490
-                var dtsql1 = DbHelperSQL.Query(sql1).Tables[0];
2491
-                string sql2 = $"  select COUNT(1) from T_Bus_WorkOrder a where F_IsDelete=0 and F_WorkState not  in (6,7,9,14)" + where;
2492
-                var dtsql2 = DbHelperSQL.Query(sql2).Tables[0];
2493
-              
2510
+
2511
+
2512
+                //string sql = $"  select  count(1)as 受理  from T_Bus_WorkOrder a where F_IsDelete=0"+ where;
2513
+                //var dtsql = DbHelperSQL.Query(sql).Tables[0];
2514
+                //string sql1 = $"  select COUNT(1) from T_Bus_WorkOrder a where a.F_DealTime >(SELECT cast(convert(varchar(10),a .F_CreateTime ,120)+' 00:00:00' as datetime)) and  a.F_DealTime <(SELECT cast(convert(varchar(10),a .F_CreateTime ,120)+' 23:59:59' as datetime))  and F_WorkState in (6,7,9,14) and F_IsDelete=0 " + where;
2515
+                //var dtsql1 = DbHelperSQL.Query(sql1).Tables[0];
2516
+                //string sql2 = $"  select COUNT(1) from T_Bus_WorkOrder a where F_IsDelete=0 and F_WorkState not  in (6,7,9,14)" + where;
2517
+                //var dtsql2 = DbHelperSQL.Query(sql2).Tables[0];
2518
+                //var ob = new
2519
+                //{
2520
+                //    Acceptance = dtsql,
2521
+                //    Handled = dtsql1,
2522
+                //    Nothandled = dtsql2
2523
+                //};
2524
+
2525
+                ///////////////条件重新写
2526
+                //郑州转派件
2527
+                string Zzzpj = $"select count(*) as 转派件 from (select DISTINCT wo.F_OldWorkOrderId from T_Bus_WorkOrder wo where F_OldWorkOrderId!='' "+ where1 + ") b"; 
2528
+                var Zzzpjcount = DbHelperSQL.Query(Zzzpj).Tables[0];
2529
+               //郑州已回传件
2530
+                string Zzyhc = $"select count(*) as 回传件 from (select DISTINCT wo.F_OldWorkOrderId from T_Bus_WorkOrder wo where F_OldWorkOrderId!='' and wo.F_WorkState = 9 " + where1 + ") b";
2531
+                var Zzyhccount = DbHelperSQL.Query(Zzyhc).Tables[0];
2494 2532
                 var ob = new
2495 2533
                 {
2496
-                    Acceptance = dtsql,
2497
-                    Handled = dtsql1,
2498
-                    Nothandled= dtsql2
2534
+                    Acceptance = Zzzpjcount,
2535
+                    Handled = Zzyhccount,
2499 2536
                 };
2500 2537
                 if (isExport)
2501 2538
                 { 
2502 2539
                   DataTable dt = new DataTable();
2503 2540
                     dt.Columns.Add("Acceptance", typeof(string));
2504 2541
                   dt.Columns.Add("Handled", typeof(string));
2505
-                  dt.Columns.Add("Nothandled", typeof(string));
2506
-                    dt.Rows[0]["Acceptance"] = dtsql;
2507
-                    dt.Rows[0]["Handled"] = dtsql1;
2508
-                    dt.Rows[0]["Nothandled"] = dtsql2;
2509
-                    var cols = new string[] { "受理数量", "当日已回复", "未回复" };
2542
+                    dt.Rows[0]["Acceptance"] = Zzzpjcount;
2543
+                    dt.Rows[0]["Handled"] = Zzyhccount;
2544
+                    var cols = new string[] { "郑州转派件", "郑州回传件"};
2510 2545
                     new NPOIHelper().ExportToExcel($"工单报表{Convert.ToDateTime(start).ToString("yyyyMMdd")}-{Convert.ToDateTime(end).ToString("yyyyMMdd")}", dt, cols);
2511 2546
                     return Success("导出excel");
2512 2547
                 }
2548
+                var a = ob.ToJson();
2513 2549
                 return Content(ob.ToJson());
2514 2550
             }
2551
+
2515 2552
             else if (type == 2)
2516 2553
             {
2517 2554
                 type = 1;

+ 11 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -97,6 +97,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
97 97
                     sql += " and F_WorkState in (" + (int)EnumWorkState.neworder + "," + (int)EnumWorkState.audit + ") ";
98 98
                 else
99 99
                     sql += " and F_WorkState = '" + strstate.Trim() + "' ";
100
+
100 101
             }
101 102
             if (files>1)
102 103
             {
@@ -478,6 +479,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
478 479
 
479 480
         }
480 481
 
482
+        public ActionResult GetTimeOutList()
483
+        {
484
+            return Success("成功");
485
+        }
486
+
481 487
         /// <summary>
482 488
         /// 获取坐席处理列表
483 489
         /// </summary>
@@ -4950,6 +4956,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
4950 4956
             return Content(obj.ToJson());
4951 4957
         }
4952 4958
 
4959
+
4960
+
4953 4961
         ///// <summary>
4954 4962
         ///// 获取通报工单列表
4955 4963
         ///// </summary>
@@ -8479,7 +8487,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
8479 8487
                                         modelT_Bus_WorkOrder.F_CloseUser = userModel.F_UserCode;
8480 8488
                                         modelT_Bus_WorkOrder.F_IsDelete = 1;//删除旧工单
8481 8489
                                         workorderBLL.Update(modelT_Bus_WorkOrder);
8482
-                                        msgs = userinfo + " 交办多单位,关闭此工单并生成新工单,新工单编号为:" + newids;
8490
+                                        msgs = userinfo + " 交办多单位,工单编号为:" + newids;
8483 8491
                                     }
8484 8492
                                     else
8485 8493
                                     {
@@ -8767,7 +8775,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
8767 8775
                                     modelT_Bus_WorkOrder.F_CloseUser = userModel.F_UserCode;
8768 8776
                                     modelT_Bus_WorkOrder.F_IsDelete = 1;//删除旧工单
8769 8777
                                     workorderBLL.Update(modelT_Bus_WorkOrder);
8770
-                                    msgs = userinfo + " 交办多单位,关闭此工单并生成新工单,新工单编号为:" + newids;
8778
+                                    msgs = userinfo + " 交办多单位,工单编号为:" + newids;
8771 8779
                                 }
8772 8780
                                 else
8773 8781
                                 {
@@ -13399,6 +13407,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
13399 13407
                                 }
13400 13408
 
13401 13409
                                 modeT_Bus_WorkOrder.F_WorkState = (int)EnumWorkState.closed;// 14;
13410
+                                modeT_Bus_WorkOrder.IsExport = 1;
13402 13411
                                 workorderBLL.Update(modeT_Bus_WorkOrder);
13403 13412
                                 #endregion
13404 13413
                             }

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

@@ -391,7 +391,8 @@ namespace CallCenterApi.Interface.Models.Common
391 391
                         buttons.Add(subreload());
392 392
                         buttons.Add(end());
393 393
                         buttons.Add(Result());
394
-                     //   buttons.Add(approval());
394
+                        buttons.Add(Reloadsuber());
395
+                        //   buttons.Add(approval());
395 396
                     }
396 397
                     if (code == "WLDW")
397 398
                     buttons.Add(Upload());

+ 2 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Common/EnumWorkState.cs

@@ -29,13 +29,13 @@ namespace CallCenterApi.Interface.Models.Common
29 29
         [Description("已办理")]
30 30
         dealed,
31 31
 
32
-        [Description("已回访")]
32
+        [Description("已回访待结案")]
33 33
         visit,
34 34
 
35 35
         [Description("重办中")]
36 36
         reload,
37 37
 
38
-        [Description("已结案")]
38
+        [Description("已回传")]
39 39
         finish,
40 40
 
41 41
         [Description("待审核")]