1550076451 2 年之前
父節點
當前提交
ff8720480b

+ 19 - 5
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/YCWorkOrderReportController.cs

@@ -52,14 +52,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
52 52
             //    else if (usermodel.F_RoleCode == "EJWLDW")
53 53
             //    {
54 54
             //        maindeptid = usermodel.F_DeptId;
55
-                 
55
+
56 56
             //    }
57 57
             //}
58
-            Dictionary<string, string> paras = new Dictionary<string, string>();
58
+            string source = sourceInfo.ToString();
59
+            if (sourceInfo == 0)
60
+            {
61
+                source = "92,93";
62
+            }
63
+
64
+
65
+           Dictionary<string, string> paras = new Dictionary<string, string>();
59 66
             paras.Add("@sdate", sdate);
60 67
             paras.Add("@edate", edate);
61 68
           
62
-            paras.Add("@sourceinfo", sourceInfo.ToString());
69
+            paras.Add("@sourceinfo", source);
70
+          
63 71
 
64 72
             var obj = DbHelperSQL.RunProcedure("P_DeptDayReport_2", paras, "DeptDayReport");
65 73
             if (obj != null && obj.Tables[0] != null && obj.Tables[0].Rows.Count > 0)
@@ -258,6 +266,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
258 266
         /// <returns></returns>
259 267
         public ActionResult GetDeptSatisfied(DateTime? start, DateTime? end, int? sourceInfo, bool isExport = false)
260 268
         {
269
+           
261 270
             if (start == null)
262 271
             {
263 272
                 start = DateTime.Now;
@@ -268,6 +277,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
268 277
                 end = DateTime.Now;
269 278
             }
270 279
             string wheresql = "  F_WorkState=9 AND F_IsDelete=0";
280
+            wheresql += $" and F_CreateTime>='{start.Value .ToString ("yyyy-MM-dd")} 00:00:00' and F_CreateTime<='{end .Value.ToString("yyyy-MM-dd")} 23:59:59'";
271 281
             if (sourceInfo != null && sourceInfo != 0) {
272 282
                 wheresql += " and F_InfoSource='"+ sourceInfo + "'";
273 283
             }
@@ -1893,7 +1903,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1893 1903
         /// 成员单位办理情况
1894 1904
         /// </summary>
1895 1905
         /// <returns></returns>
1896
-        public ActionResult GetHandling(DateTime? start, DateTime? end, bool isExport = false)
1906
+        public ActionResult GetHandling(DateTime? start, DateTime? end,int source=0, bool isExport = false)
1897 1907
         {
1898 1908
             if (start == null)
1899 1909
             {
@@ -1904,15 +1914,19 @@ namespace CallCenterApi.Interface.Controllers.workorder
1904 1914
             {
1905 1915
                 end = DateTime.Now;
1906 1916
             }
1917
+            string sourceinfo = source.ToString();
1918
+            if (source == 0)
1919
+                sourceinfo = "92,93";
1907 1920
 
1908 1921
             Dictionary<string, string> paras = new Dictionary<string, string>();
1909 1922
             paras.Add("@sdate", start.Value.ToString("yyyy-MM-dd"));
1910 1923
             paras.Add("@edate", end.Value.ToString("yyyy-MM-dd"));
1924
+            paras.Add("@source", sourceinfo);
1911 1925
             var obj = DbHelperSQL.RunProcedure("P_Handling", paras, "Handling");
1912 1926
             if (isExport)
1913 1927
             {
1914 1928
                 var cols = new string[] { "单位名称", "数量" };
1915
-                new NPOIHelper().ExportHandling($"伊川县12345热线诉求件办理情况统计表({start.Value .ToString ("yyyy年MM月")})", obj.Tables[0]);
1929
+                new NPOIHelper().ExportHandling($"伊川县12345热线诉求件办理情况统计表({start.Value .ToString ("yyyy年MM月dd日")}-{end .Value.ToString("yyyy年MM月dd日")})", obj.Tables[0]);
1916 1930
                 return Success("导出excel");
1917 1931
             }
1918 1932
             return Success("成功", obj);

+ 18 - 21
CallCenterCommon/CallCenter.Utility/NPOI/NPOIHelper.cs

@@ -826,54 +826,51 @@ namespace CallCenter.Utility
826 826
                 ICell cell1 = irow1.CreateCell(0);
827 827
                 cell1.SetCellValue(Name);
828 828
                 cell1.CellStyle = cellStylebt;
829
-                sheet.AddMergedRegion(new CellRangeAddress(0, 0, 0, 30));
829
+                sheet.AddMergedRegion(new CellRangeAddress(0, 0, 0, 16));
830 830
 
831 831
                 IRow irow2 = sheet.CreateRow(1);
832
-                ICell cell2 = irow2.CreateCell(2);
833
-                cell2.SetCellValue("热线诉求件");
834
-                cell2.CellStyle = cellStylebt;
835
-                sheet.AddMergedRegion(new CellRangeAddress(1, 1, 2, 16));
832
+                //ICell cell2 = irow2.CreateCell(2);
833
+                //cell2.SetCellValue("热线诉求件");
834
+                //cell2.CellStyle = cellStylebt;
835
+                //sheet.AddMergedRegion(new CellRangeAddress(1, 1, 2, 16));
836 836
 
837
-                ICell cell3 = irow2.CreateCell(17);
838
-                cell3.SetCellValue("网民诉求件");
839
-                cell3.CellStyle = cellStylebt;
840
-                sheet.AddMergedRegion(new CellRangeAddress(1, 1, 17, 30));
841
-                IRow irow4 = sheet.CreateRow(2);
837
+                //ICell cell3 = irow2.CreateCell(17);
838
+                //cell3.SetCellValue("网民诉求件");
839
+                //cell3.CellStyle = cellStylebt;
840
+                //sheet.AddMergedRegion(new CellRangeAddress(1, 1, 17, 30));
841
+               // IRow irow4 = sheet.CreateRow(1);
842 842
 
843 843
 
844 844
                
845 845
                 ICell cell5 = irow2.CreateCell(0);
846 846
                 cell5.SetCellValue("序号");
847 847
                 cell5.CellStyle = cellStylebt;
848
-                sheet.AddMergedRegion(new CellRangeAddress(1, 2, 0, 0));
848
+               // sheet.AddMergedRegion(new CellRangeAddress(1, 1, 0, 0));
849 849
 
850 850
                 ICell cell4 = irow2.CreateCell(1);
851 851
                 cell4.SetCellValue("12345成员单位");
852 852
                 cell4.CellStyle = cellStylebt;
853
-                sheet.AddMergedRegion(new CellRangeAddress(1, 2, 1, 1));
853
+               // sheet.AddMergedRegion(new CellRangeAddress(1, 1, 1, 1));
854 854
 
855 855
 
856 856
                 
857 857
                 string[] cols = {"诉求总数",
858 858
                 "省派件","按时受理数","按时受理率","催办数","催办率",
859 859
                 "按时反馈件","按时反馈率","按时办结数","按时办结率","超时受理数",
860
-                "超时反馈数","超时办结数","群众满意度","市转督办","诉求总数",
861
-                "按时受理数","按时受理率","催办数","催办率",
862
-                "按时反馈件","按时反馈率","按时办结数","按时办结率","超时受理数",
863 860
                 "超时反馈数","超时办结数","群众满意度","市转督办"};
864 861
             
865
-                int icolIndex = 2;
862
+                int icolIndex = 1;
866 863
                 foreach (string dc in cols)
867 864
                 {
868
-                   
869
-                    ICell cell = irow4.CreateCell(icolIndex);
865
+                    icolIndex++;
866
+                    ICell cell = irow2.CreateCell(icolIndex);
870 867
                    
871 868
                     cell.SetCellValue(dc);
872 869
                     cell.CellStyle = cellStylebt;
873 870
                     
874
-                    icolIndex++;
871
+                   
875 872
                 }
876
-                int iRowIndex = 3;
873
+                int iRowIndex = 2;
877 874
               
878 875
                 
879 876
                 int index = 0;
@@ -919,7 +916,7 @@ namespace CallCenter.Utility
919 916
                
920 917
 
921 918
                 //自适应列宽度
922
-                for (int i = 0; i < 22; i++)
919
+                for (int i = 0; i < 16; i++)
923 920
                 {
924 921
                     sheet.AutoSizeColumn(i);
925 922
                     // sheet.SetColumnWidth(i, 20 * 256);