Quellcode durchsuchen

工单类型接口修改

machenyang vor 8 Jahren
Ursprung
Commit
ce58e5b737

+ 50 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/GDLXSJController.cs

@@ -12,7 +12,7 @@ namespace CallCenterApi.Interface.Controllers.report
12 12
 {
13 13
     public class GDLXSJController : BaseController
14 14
     {
15
-        //// GET: GDLXSJ
15
+        //// GET: GDLXYQ
16 16
         //public ActionResult Index()
17 17
         //{
18 18
         //    return View();
@@ -85,13 +85,47 @@ namespace CallCenterApi.Interface.Controllers.report
85 85
             dtGDLY1_name[dtGDLY1rowcount + 1] = "总计";
86 86
             dtGDLY1_count[dtGDLY1rowcount + 1] = 1;
87 87
             dtNew = getData(stime, endtime);
88
+
89
+            #region 获取第二行标题
90
+            //DataColumn dc = new DataColumn("姓名");
91
+            //dtNew.Columns.Add(dc);
92
+            List<string> colnames = new List<string>();
93
+            colnames.Add("姓名");
94
+            var sqlGDLY = " and F_CategoryType=1 and F_ParentId in (select F_CategoryId from T_RepositoryCategory where F_CategoryType = 1 and F_ParentId in (select F_CategoryId from T_RepositoryCategory where F_CategoryType = 1 and F_DeleteFlag = 0 and F_CategoryName = '试剂'))";
95
+            var recordCount = 0;
96
+            var dtGDLY = BLL.PagerBLL.GetListPager(
97
+              "T_RepositoryCategory",
98
+              "F_CategoryId",
99
+              "*",
100
+              sqlGDLY,
101
+              "ORDER BY F_ParentId asc",
102
+              10,
103
+              1,
104
+              true,
105
+              out recordCount);
106
+            int[] cateid = new int[recordCount];
107
+            List<Model.T_RepositoryCategory> modelList = new BLL.T_RepositoryCategory().DataTableToList(dtGDLY);
108
+
109
+            for (int i = 0; i < modelList.Count; i++)
110
+            {
111
+                string colname = modelList[i].F_CategoryName;
112
+                //if (dtNew.Columns.Contains(colname))
113
+                //    colname += "_1";
114
+                colnames.Add(colname);
115
+                //dtNew.Columns.Add(new DataColumn(colname));
116
+                //cateid[i] = modelList[i].F_CategoryId;
117
+            }
118
+            //dtNew.Columns.Add("总计");
119
+            colnames.Add("");
120
+            #endregion
88 121
             var obj = new
89 122
             {
90 123
                 linename = dtGDLY1_name,
91 124
                 linecount = dtGDLY1_count,
125
+                lineSeName = colnames,
92 126
                 dtlist = dtNew
93 127
             };
94
-            res = Success("获取工单来源数据成功", obj);
128
+            res = Success("获取工单类型数据成功", obj);
95 129
 
96 130
             return res;
97 131
         }
@@ -261,5 +295,19 @@ namespace CallCenterApi.Interface.Controllers.report
261 295
             }
262 296
             return res;
263 297
         }
298
+
299
+        ///// <summary>
300
+        ///// 合并单元格
301
+        ///// </summary>
302
+        ///// <param name="sheet">要合并单元格所在的sheet</param>
303
+        ///// <param name="rowstart">开始行的索引</param>
304
+        ///// <param name="rowend">结束行的索引</param>
305
+        ///// <param name="colstart">开始列的索引</param>
306
+        ///// <param name="colend">结束列的索引</param>
307
+        //public static void SetCellRangeAddress(ISheet sheet, int rowstart, int rowend, int colstart, int colend)
308
+        //{
309
+        //    CellRangeAddress cellRangeAddress = new CellRangeAddress(rowstart, rowend, colstart, colend);
310
+        //    sheet.AddMergedRegion(cellRangeAddress);
311
+        //}
264 312
     }
265 313
 }

+ 35 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/GDLXYQController.cs

@@ -88,13 +88,47 @@ namespace CallCenterApi.Interface.Controllers.report
88 88
             dtGDLY1_name[dtGDLY1rowcount + 1] = "总计";
89 89
             dtGDLY1_count[dtGDLY1rowcount + 1] = 1;
90 90
             dtNew = getData(stime, endtime);
91
+
92
+            #region 获取第二行标题
93
+            //DataColumn dc = new DataColumn("姓名");
94
+            //dtNew.Columns.Add(dc);
95
+            List<string> colnames = new List<string>();
96
+            colnames.Add("姓名");
97
+            var sqlGDLY = " and F_CategoryType=1 and F_ParentId in (select F_CategoryId from T_RepositoryCategory where F_CategoryType = 1 and F_ParentId in (select F_CategoryId from T_RepositoryCategory where F_CategoryType = 1 and F_DeleteFlag = 0 and F_CategoryName = '仪器'))";
98
+            var recordCount = 0;
99
+            var dtGDLY = BLL.PagerBLL.GetListPager(
100
+              "T_RepositoryCategory",
101
+              "F_CategoryId",
102
+              "*",
103
+              sqlGDLY,
104
+              "ORDER BY F_ParentId asc",
105
+              10,
106
+              1,
107
+              true,
108
+              out recordCount);
109
+            int[] cateid = new int[recordCount];
110
+            List<Model.T_RepositoryCategory> modelList = new BLL.T_RepositoryCategory().DataTableToList(dtGDLY);
111
+
112
+            for (int i = 0; i < modelList.Count; i++)
113
+            {
114
+                string colname = modelList[i].F_CategoryName;
115
+                //if (dtNew.Columns.Contains(colname))
116
+                //    colname += "_1";
117
+                colnames.Add(colname);
118
+                //dtNew.Columns.Add(new DataColumn(colname));
119
+                //cateid[i] = modelList[i].F_CategoryId;
120
+            }
121
+            //dtNew.Columns.Add("总计");
122
+            colnames.Add("");
123
+            #endregion
91 124
             var obj = new
92 125
             {
93 126
                 linename = dtGDLY1_name,
94 127
                 linecount = dtGDLY1_count,
128
+                lineSeName = colnames,
95 129
                 dtlist = dtNew
96 130
             };
97
-            res = Success("获取工单来源数据成功", obj);
131
+            res = Success("获取工单类型数据成功", obj);
98 132
 
99 133
             return res;
100 134
         }