1550076451 2 jaren geleden
bovenliggende
commit
d3c7bdbe10

+ 226 - 0
RMYY_CallCenter_Api.Utility/Helper/NPOIHelper.cs

@@ -470,7 +470,233 @@ namespace RMYY_CallCenter_Api.Utility
470 470
                 return "导出失败!";
471 471
             }
472 472
         }
473
+        /// <summary>
474
+        /// </summary>
475
+        /// <param name="Name"></param>
476
+        /// <param name="dt"></param>
477
+        /// <returns></returns>
478
+        public string CarMaintenance(string Name, DataTable dt, bool type = true)
479
+        {
480
+            try
481
+            {
482
+                HSSFWorkbook workbook = new HSSFWorkbook();
483
+                string message = "车辆调度科室维修情况";
484
+                if (!type)
485
+                    message = "车辆调度工勤维修情况";
486
+                ISheet sheet = workbook.CreateSheet(message);
487
+                ICellStyle cellStyle = workbook.CreateCellStyle();
488
+                NPOI.SS.UserModel.IFont cellfont = workbook.CreateFont();
489
+                cellfont.Boldweight = (short)FontBoldWeight.Normal;
490
+                cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
491
+                cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
492
+                cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
493
+                cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
494
+                cellStyle.VerticalAlignment = VerticalAlignment.Center;
495
+                cellStyle.Alignment = HorizontalAlignment.Center;
496
+                cellStyle.SetFont(cellfont);
497
+
498
+
499
+
500
+                ICellStyle HeadercellStyle = workbook.CreateCellStyle();
501
+                HeadercellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
502
+                HeadercellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
503
+                HeadercellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
504
+                HeadercellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
505
+                HeadercellStyle.VerticalAlignment = VerticalAlignment.Center;
506
+                HeadercellStyle.Alignment = HorizontalAlignment.Center;
507
+                HeadercellStyle.FillForegroundColor = NPOI.HSSF.Util.HSSFColor.SkyBlue.Index;
508
+                HeadercellStyle.FillPattern = FillPattern.SolidForeground;
509
+                HeadercellStyle.FillBackgroundColor = NPOI.HSSF.Util.HSSFColor.SkyBlue.Index;
510
+
511
+                //字体
512
+                NPOI.SS.UserModel.IFont headerfont = workbook.CreateFont();
513
+                headerfont.Boldweight = (short)FontBoldWeight.Bold;
514
+                headerfont.FontHeightInPoints = 12;
515
+                HeadercellStyle.SetFont(headerfont);
516
+                IRow irow1 = sheet.CreateRow(0);
517
+                IRow irow3 = sheet.CreateRow(1);
518
+                IRow irow2 = sheet.CreateRow(2);
519
+                for (int i = 0; i < 9; i++)
520
+                {
521
+                    ICell cel16 = irow1.CreateCell(i);
522
+                    cel16.CellStyle = HeadercellStyle;
523
+                    ICell cel17 = irow2.CreateCell(i);
524
+                    cel17.CellStyle = HeadercellStyle;
525
+                    ICell cel18 = irow3.CreateCell(i);
526
+                    cel18.CellStyle = HeadercellStyle;
527
+                }
528
+
529
+
530
+                ICell cell1 = irow1.CreateCell(0);
531
+                sheet.AddMergedRegion(new CellRangeAddress(0, 2, 0, 0));
532
+                cell1.CellStyle = HeadercellStyle;
533
+                cell1.SetCellValue("院区");
534
+
535
+                ICell cell2 = irow1.CreateCell(1);
536
+                sheet.AddMergedRegion(new CellRangeAddress(0, 2, 1, 1));
537
+                cell2.SetCellValue("科室");
538
+                cell2.CellStyle = HeadercellStyle;
539
+
540
+
541
+                ICell cell3 = irow1.CreateCell(2);
542
+                sheet.AddMergedRegion(new CellRangeAddress(0, 2, 2, 2));
543
+                if (!type)
544
+                    cell3.SetCellValue("工勤");
545
+                else
546
+                    cell3.SetCellValue("工单类型");
547
+                cell3.CellStyle = HeadercellStyle;
548
+
549
+
550
+
551
+                ICell cell4 = irow1.CreateCell(3);
552
+                cell4.SetCellValue("工单数量");
553
+                sheet.AddMergedRegion(new CellRangeAddress(0, 0, 3, 6));
554
+                cell4.CellStyle = HeadercellStyle;
555
+
556
+                ICell cell5 = irow1.CreateCell(7);
557
+                cell5.SetCellValue("不满意量");
558
+                sheet.AddMergedRegion(new CellRangeAddress(0, 1, 7, 8));
559
+                cell5.CellStyle = HeadercellStyle;
560
+
561
+
562
+
563
+                ICell cell9 = irow3.CreateCell(3);
564
+                sheet.AddMergedRegion(new CellRangeAddress(1, 2, 3, 3));
565
+                cell9.SetCellValue("接单量");
566
+                cell9.CellStyle = HeadercellStyle;
567
+
568
+                ICell cell11 = irow3.CreateCell(4);
569
+                cell11.SetCellValue("完成情况");
570
+                sheet.AddMergedRegion(new CellRangeAddress(1, 1, 4, 6));
571
+                cell11.CellStyle = HeadercellStyle;
572
+
573
+       
574
+
575
+               
576
+
577
+
578
+             
579
+
580
+
581
+
582
+
583
+                // ICell cel8 = irow1.CreateCell(17);
584
+                // cel8.CellStyle = HeadercellStyle;
585
+
586
+
473 587
 
588
+
589
+                string[] cols = {"完成量","未完成量","完成率",
590
+             "数量","不满意率" };
591
+                int icolIndex = 0;
592
+
593
+
594
+                //ICell cel6 = irow2.CreateCell(0);
595
+                //cel6.CellStyle = HeadercellStyle;
596
+
597
+                //ICell cel7 = irow2.CreateCell(1);
598
+                //cel7.CellStyle = HeadercellStyle;
599
+
600
+
601
+                foreach (string dc in cols)
602
+                {
603
+                    ICell cell = irow2.CreateCell(icolIndex + 4);
604
+                    cell.SetCellValue(dc);
605
+                    cell.CellStyle = HeadercellStyle;
606
+                    icolIndex++;
607
+                }
608
+
609
+
610
+                int iRowIndex = 2;
611
+
612
+
613
+
614
+                foreach (DataRow dr in dt.Rows)
615
+                {
616
+                    int iCellIndex = 0;
617
+                    IRow irow = sheet.CreateRow(iRowIndex + 1);
618
+                    for (int i = 0; i < dt.Columns.Count; i++)
619
+                    {
620
+                        string strsj = string.Empty;
621
+                        if (dr[i] != null)
622
+                        {
623
+                            strsj = dr[i].ToString();
624
+                        }
625
+                        ICell cell = irow.CreateCell(iCellIndex);
626
+                        cell.SetCellValue(strsj);
627
+                        cell.CellStyle = cellStyle;
628
+                        iCellIndex++;
629
+                    }
630
+                    iRowIndex++;
631
+                }
632
+
633
+                int start = 3;
634
+                iRowIndex = 2;
635
+                int end = 3;
636
+                string woname = dt.Rows[0]["woname"].ToString();
637
+                for (int i = 0; i < dt.Rows.Count; i++)
638
+                {
639
+                    if (woname == dt.Rows[i]["woname"].ToString())
640
+                    {
641
+                        end++;
642
+                    }
643
+                    else
644
+                    {
645
+                        woname = dt.Rows[i]["woname"].ToString();
646
+                        sheet.AddMergedRegion(new CellRangeAddress(start, end - 1, 0, 0));
647
+                        start = end;
648
+                        end++;
649
+                    }
650
+                }
651
+
652
+
653
+
654
+
655
+
656
+
657
+                //自适应列宽度
658
+                for (int i = 0; i < 9; i++)
659
+                {
660
+                    if (i == 0)
661
+                    {
662
+                        sheet.SetColumnWidth(i, 25 * 256);
663
+                    }
664
+                    else if (i < 3)
665
+                        sheet.AutoSizeColumn(i);
666
+                    else
667
+                        sheet.SetColumnWidth(i, 10 * 256);
668
+                }
669
+
670
+                using (MemoryStream ms = new MemoryStream())
671
+                {
672
+                    workbook.Write(ms);
673
+
674
+                    HttpContext curContext = HttpContext.Current;
675
+
676
+
677
+                    // 设置编码和附件格式
678
+                    curContext.Response.ContentType = "application/vnd.ms-excel";
679
+                    curContext.Response.ContentEncoding = Encoding.UTF8;
680
+                    curContext.Response.Charset = "";
681
+                    curContext.Response.AppendHeader("Access-Control-Expose-Headers", "Content-Disposition");
682
+                    curContext.Response.AppendHeader("Content-Disposition",
683
+                        "attachment;filename=" + HttpUtility.UrlEncode(message + ".xls", Encoding.UTF8));
684
+
685
+                    curContext.Response.BinaryWrite(ms.GetBuffer());
686
+
687
+                    workbook = null;
688
+                    ms.Close();
689
+                    ms.Dispose();
690
+
691
+                    curContext.Response.End();
692
+                }
693
+                return "";
694
+            }
695
+            catch
696
+            {
697
+                return "导出失败!";
698
+            }
699
+        }
474 700
         /// <summary>
475 701
         /// </summary>
476 702
         /// <param name="Name"></param>

+ 275 - 1
RMYY_CallCenter_Api/Controllers/CarManage/T_Car_WorkOrderController.cs

@@ -1456,8 +1456,282 @@ namespace RMYY_CallCenter_Api.Controllers.CarManage
1456 1456
             int n = new BLL.T_Car_Operation().Add(oper);
1457 1457
             return n;
1458 1458
         }
1459
+        /// <summary>
1460
+        ///科室维修
1461
+        /// </summary>
1462
+        /// <param name="starttime"></param>
1463
+        /// <param name="endtime"></param>
1464
+        /// <param name="type"></param>
1465
+        /// <param name="loweltype"></param>
1466
+        /// <param name="deptid"></param>
1467
+        /// <returns></returns>
1468
+       
1469
+        public ActionResult DeptMaintenance(string starttime, string endtime,  int loweltype = 0, int deptid = 0, int isdc = 0)
1470
+        {
1471
+            string where = "";
1472
+            if (!string.IsNullOrEmpty(starttime))
1473
+            {
1474
+                where += "and F_CreateTime>='" + starttime + "'";
1475
+            }
1476
+            if (!string.IsNullOrEmpty(endtime))
1477
+            {
1478
+                where += "and F_CreateTime<='" + endtime + "'";
1479
+            }
1480
+            if (deptid > 0)
1481
+            {
1482
+                where += "and [dbo].[GetDeptIdByUserCode](F_DriverCode)='" + deptid + "'";
1483
+            }
1484
+           
1485
+            if (loweltype > 0)
1486
+            {
1487
+                where += $" and  F_Type in(select F_GDId from  [dbo].[GetValueId]({loweltype}))";
1488
+            }
1489
+
1490
+
1491
+            string sql = " select  [dbo].[GetYQNameByDeptId]([dbo].[GetDeptIdByUserCode](F_DriverCode)) woname  ,  " +
1492
+                "    dbo.[GetCompleteDeptNames]([dbo].[GetDeptIdByUserCode](F_DriverCode)) MaintenanceDept," +
1493
+                "    dbo.GetGongDanNameByID(F_Type) gdtype ,  " +
1494
+                "     count(1) total," +
1495
+                "     sum( case    when F_State >= 7 then 1 else 0 end) complete," +
1496
+                "     sum(case when  F_State < 7 then 1 else 0 end) undone,CONVERT(int, (select count(1) from T_Car_Evaluate  where" +
1497
+                "      F_WorkOrderCode in ((stuff((select ',' + T.F_WorkOrderCode  FROM T_Car_WorkOrder T WHERE" +
1498
+                "          dbo.GetGongDanNameByID(a.F_Type) = dbo.GetGongDanNameByID(T.F_Type)  and F_Source < 3" +
1499
+                "        and[dbo].[GetDeptIdByUserCode](a.F_DriverCode) =[dbo].[GetDeptIdByUserCode](T.F_DriverCode)" +
1500
+                " for xml path('')),1,1,'')" +
1501
+                "    )))) score     from  T_Car_WorkOrder a" + " where F_DriverCode is not null and F_DriverCode!= ''and F_State >= 1" + where
1502
+                + " group by[dbo].[GetDeptIdByUserCode] (a.F_DriverCode),  dbo.GetGongDanNameByID(F_Type) " +
1503
+                "  order by[dbo].[GetDeptIdByUserCode] (F_DriverCode)";
1504
+            var dataTable = DbHelperSQL.Query(sql ).Tables[0];
1505
+
1506
+            dataTable.Columns.Add("completerate", typeof(string));
1507
+            dataTable.Columns.Add("scorerate", typeof(string));
1459 1508
 
1460
-           /// <summary>
1509
+            int total = 0, complete = 0, undone = 0, score = 0;
1510
+            foreach (DataRow row in dataTable.Rows)
1511
+            {
1512
+                if (row["total"] != null && row["total"].ToString() != "")
1513
+                {
1514
+                    if (int.Parse(row["total"].ToString()) > 0)
1515
+                    {
1516
+                        total += int.Parse(row["total"].ToString());
1517
+                        if (row["complete"] != null && row["complete"].ToString() != "")
1518
+                            complete += int.Parse(row["complete"].ToString());
1519
+                        if (row["undone"] != null && row["undone"].ToString() != "")
1520
+                            undone += int.Parse(row["undone"].ToString());
1521
+                      
1522
+                        if (row["score"] != null && row["score"].ToString() != "")
1523
+                            score += int.Parse(row["score"].ToString());
1524
+                        if (row["complete"] != null && row["complete"].ToString() != "")
1525
+                        {
1526
+                            row["completerate"] = string.Format("{0:f2}%", float.Parse(row["complete"].ToString()) / float.Parse(row["total"].ToString()) * 100);
1527
+                            if (int.Parse(row["complete"].ToString()) > 0)
1528
+                            {
1529
+                                if (row["score"] != null && row["score"].ToString() != "")
1530
+                                {
1531
+                                    row["scorerate"] = string.Format("{0:f2}%", float.Parse(row["score"].ToString()) / float.Parse(row["complete"].ToString()) * 100);
1532
+                                }
1533
+                            }
1534
+                            else
1535
+                            {
1536
+                                row["scorerate"] = "0%";
1537
+                            }
1538
+                        }
1539
+
1540
+                    }
1541
+                    else
1542
+                    {
1543
+                        row["completerate"] = "0%";
1544
+                    }
1545
+                }
1546
+            }
1547
+            DataRow drtNew = dataTable.NewRow();
1548
+            drtNew["woname"] = "合计";//院区
1549
+            drtNew["MaintenanceDept"] = "";//科室
1550
+            drtNew["gdtype"] = "";//工单类别
1551
+            drtNew["total"] = total;//接单量
1552
+            drtNew["complete"] = complete;//完成量
1553
+            drtNew["undone"] = undone;//未完成量
1554
+            drtNew["score"] = score;//
1555
+            if (total > 0)
1556
+            {
1557
+                drtNew["completerate"] = string.Format("{0:f2}%", ((float)complete / total) * 100);
1558
+            }
1559
+            else
1560
+            {
1561
+                drtNew["completerate"] = "0%";//完成率
1562
+            }
1563
+           
1564
+          
1565
+            if (complete > 0)
1566
+            {
1567
+                drtNew["scorerate"] = string.Format("{0:f2}%", ((float)score  / complete) * 100);
1568
+            }
1569
+            else
1570
+            {
1571
+                drtNew["scorerate"] = "0%";//态度率
1572
+            }
1573
+
1574
+           
1575
+            dataTable.Rows.Add(drtNew);
1576
+            dataTable = dataTable.DefaultView.ToTable(false, new string[] { "woname", "MaintenanceDept", "gdtype",
1577
+                "total", "complete", "undone", "completerate",
1578
+                "score", "scorerate"
1579
+         });
1580
+            if (isdc > 0)
1581
+            {
1582
+                NPOIHelper npoi = new NPOIHelper();
1583
+                if (npoi.CarMaintenance ("车辆调度科室维修情况报表", dataTable) == "")
1584
+                {
1585
+                    return Success("导出成功");
1586
+                }
1587
+                else
1588
+                {
1589
+                    return Error("导出失败");
1590
+                }
1591
+            }
1592
+            else
1593
+                return Success("车辆调度科室维修情况报表数据成功", dataTable);
1594
+        }
1595
+
1596
+
1597
+        /// <summary>
1598
+        /// 工勤维修
1599
+        /// </summary>
1600
+        /// <param name="starttime"></param>
1601
+        /// <param name="endtime"></param>
1602
+        /// <param name="type"></param>
1603
+        /// <param name="loweltype"></param>
1604
+        /// <param name="deptid"></param>
1605
+        /// <returns></returns>
1606
+    
1607
+        public ActionResult WorkMaintenance(string starttime, string endtime, int type = 0, int loweltype = 0, int deptid = 0, int isdc = 0)
1608
+        {
1609
+            string where = "";
1610
+            if (!string.IsNullOrEmpty(starttime))
1611
+            {
1612
+                where += "and F_CreateTime>='" + starttime + "'";
1613
+            }
1614
+            if (!string.IsNullOrEmpty(endtime))
1615
+            {
1616
+                where += "and F_CreateTime<='" + endtime + "'";
1617
+            }
1618
+            if (deptid > 0)
1619
+            {
1620
+                where += "and [dbo].[GetDeptIdByUserCode](F_DriverCode)='" + deptid + "'";
1621
+            }
1622
+          
1623
+            if (loweltype > 0)
1624
+            {
1625
+                where += $" and  F_Type in(select F_GDId from  [dbo].[GetValueId]({loweltype}))";
1626
+            }
1627
+            string sql = "    select  [dbo].[GetYQNameByDeptId]([dbo].[GetDeptIdByUserCode](F_DriverCode)) woname  , " +
1628
+                "  dbo.[GetCompleteDeptNames]([dbo].[GetDeptIdByUserCode](F_DriverCode)) MaintenanceDept," +
1629
+                "   [dbo].[GetUserName]     (F_DriverCode) DealUser," +
1630
+                "    count(1) total,     sum( case    when F_State>=7 then 1 else 0 end ) complete," +
1631
+                "  sum(case when F_State<7 then 1 else 0 end) undone," +
1632
+                "	  CONVERT(int , (select count(1) from T_Car_Evaluate  where" +
1633
+                "      F_WorkOrderCode in((stuff((select ','+T.F_WorkOrderCode FROM T_Car_WorkOrder T WHERE" +
1634
+                "     a.F_DriverCode=T.F_DriverCode and F_Source<3   for xml path('')),1,1,'')" +
1635
+                "    )))) score     from  T_Car_WorkOrder a";
1636
+ 
1637
+            var dataTable = DbHelperSQL.Query(sql + " where F_DriverCode is not null and F_DriverCode!= '' " +
1638
+                "and F_State >= 1" + where
1639
+                + "  group by dbo.[GetCompleteDeptNames] ([dbo].[GetDeptIdByUserCode] (F_DriverCode)),F_DriverCode " +
1640
+                "   order by[dbo].[GetDeptIdByUserCode] (F_DriverCode)").Tables[0];
1641
+
1642
+            dataTable.Columns.Add("completerate", typeof(string));
1643
+            dataTable.Columns.Add("scorerate", typeof(string));
1644
+
1645
+            int total = 0, complete = 0, undone = 0, score = 0;
1646
+            foreach (DataRow row in dataTable.Rows)
1647
+            {
1648
+                if (row["total"] != null && row["total"].ToString() != "")
1649
+                {
1650
+                    if (int.Parse(row["total"].ToString()) > 0)
1651
+                    {
1652
+                        total += int.Parse(row["total"].ToString());
1653
+                        if (row["complete"] != null && row["complete"].ToString() != "")
1654
+                            complete += int.Parse(row["complete"].ToString());
1655
+                        if (row["undone"] != null && row["undone"].ToString() != "")
1656
+                            undone += int.Parse(row["undone"].ToString());
1657
+
1658
+                        if (row["score"] != null && row["score"].ToString() != "")
1659
+                            score += int.Parse(row["score"].ToString());
1660
+                        if (row["complete"] != null && row["complete"].ToString() != "")
1661
+                        {
1662
+                            row["completerate"] = string.Format("{0:f2}%", float.Parse(row["complete"].ToString()) / float.Parse(row["total"].ToString()) * 100);
1663
+                            if (int.Parse(row["complete"].ToString()) > 0)
1664
+                            {
1665
+                                if (row["score"] != null && row["score"].ToString() != "")
1666
+                                {
1667
+                                    row["scorerate"] = string.Format("{0:f2}%", float.Parse(row["score"].ToString()) / float.Parse(row["complete"].ToString()) * 100);
1668
+                                }
1669
+                            }
1670
+                            else
1671
+                            {
1672
+                                row["scorerate"] = "0%";
1673
+                            }
1674
+                        }
1675
+
1676
+                    }
1677
+                    else
1678
+                    {
1679
+                        row["completerate"] = "0%";
1680
+                    }
1681
+                }
1682
+            }
1683
+            DataRow drtNew = dataTable.NewRow();
1684
+            drtNew["woname"] = "合计";//院区
1685
+            drtNew["MaintenanceDept"] = "";//科室
1686
+            drtNew["DealUser"] = "";//
1687
+            drtNew["total"] = total;//接单量
1688
+            drtNew["complete"] = complete;//完成量
1689
+            drtNew["undone"] = undone;//未完成量
1690
+            drtNew["score"] = score;//未完成量
1691
+
1692
+            
1693
+            if (total > 0)
1694
+            {
1695
+                drtNew["completerate"] = string.Format("{0:f2}%", ((float)complete / total) * 100);
1696
+            }
1697
+            else
1698
+            {
1699
+                drtNew["completerate"] = "0%";//完成率
1700
+            }
1701
+
1702
+
1703
+            if (complete > 0)
1704
+            {
1705
+                drtNew["scorerate"] = string.Format("{0:f2}%", ((float)score / complete) * 100);
1706
+            }
1707
+            else
1708
+            {
1709
+                drtNew["scorerate"] = "0%";//态度率
1710
+            }
1711
+
1712
+
1713
+            dataTable.Rows.Add(drtNew);
1714
+            dataTable = dataTable.DefaultView.ToTable(false, new string[] { "woname", "MaintenanceDept", "DealUser",
1715
+                "total", "complete", "undone", "completerate",
1716
+                "score", "scorerate"
1717
+         });
1718
+            if (isdc > 0)
1719
+            {
1720
+                NPOIHelper npoi = new NPOIHelper();
1721
+                if (npoi.CarMaintenance("车辆调度工勤维修情况报表", dataTable) == "")
1722
+                {
1723
+                    return Success("导出成功");
1724
+                }
1725
+                else
1726
+                {
1727
+                    return Error("导出失败");
1728
+                }
1729
+            }
1730
+            else
1731
+                return Success("车辆调度工勤维修情况报表数据成功", dataTable);
1732
+
1733
+        }
1734
+        /// <summary>
1461 1735
         /// 添加操作记录
1462 1736
         /// </summary>
1463 1737
         /// <param name="message"></param>

+ 3 - 3
RMYY_CallCenter_Api/Controllers/FaultRepairController.cs

@@ -4401,7 +4401,7 @@ namespace RMYY_CallCenter_Api.Controllers
4401 4401
         /// <param name="loweltype"></param>
4402 4402
         /// <param name="deptid"></param>
4403 4403
         /// <returns></returns>
4404
-        [AllowAnonymous ]
4404
+      
4405 4405
         public ActionResult DeptMaintenance (string starttime,string endtime,int type=0,int loweltype=0,  int deptid=0,int isdc=0)
4406 4406
 >>>>>>> 说的是事实
4407 4407
         {
@@ -4550,7 +4550,7 @@ namespace RMYY_CallCenter_Api.Controllers
4550 4550
             drtNew["gdtype"] = "";//工单类别
4551 4551
             drtNew["total"] = total;//接单量
4552 4552
             drtNew["complete"] = complete;//完成量
4553
-            drtNew["undone"] = complete;//未完成量
4553
+            drtNew["undone"] = undone;//未完成量
4554 4554
             if (total>0 )
4555 4555
             {
4556 4556
                 drtNew["completerate"] = string.Format("{0:f2}%", ((float )complete / total) * 100);
@@ -4778,7 +4778,7 @@ namespace RMYY_CallCenter_Api.Controllers
4778 4778
             drtNew["DealUser"] = "";//工单类别
4779 4779
             drtNew["total"] = total;//接单量
4780 4780
             drtNew["complete"] = complete;//完成量
4781
-            drtNew["undone"] = complete;//未完成量
4781
+            drtNew["undone"] = undone;//未完成量
4782 4782
             if (total > 0)
4783 4783
             {
4784 4784
                 drtNew["completerate"] = string.Format("{0:f2}%", ((float)complete / total) * 100);