|
|
@@ -28,7 +28,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
28
|
28
|
//添加第一行标题
|
|
29
|
29
|
//DataColumn dc1 = new DataColumn("");
|
|
30
|
30
|
//dtNew.Columns.Add(dc1);
|
|
31
|
|
- var sqlGDLY1 = "select F_CategoryId,F_CategoryName from T_RepositoryCategory where 1=1 and F_CategoryType = 1 and F_ParentId in (select F_CategoryId from T_RepositoryCategory where F_CategoryType = 1 and F_DeleteFlag = 0 and F_CategoryName = '试剂')";
|
|
|
31
|
+ var sqlGDLY1 = "select F_CategoryId,F_CategoryName from T_RepositoryCategory where 1=1 and F_CategoryType = 1 and F_ParentId in (select F_CategoryId from T_RepositoryCategory where F_CategoryType = 1 and F_DeleteFlag = 0 and F_CategoryName = '试剂') and F_DeleteFlag = 0";
|
|
32
|
32
|
var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
|
|
33
|
33
|
int dtGDLY1rowcount = dtGDLY1.Rows.Count;
|
|
34
|
34
|
//列名
|
|
|
@@ -41,7 +41,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
41
|
41
|
for (int v = 0; v < dtGDLY1rowcount; v++)
|
|
42
|
42
|
{
|
|
43
|
43
|
string catename = dtGDLY1.Rows[v]["F_CategoryName"].ToString();
|
|
44
|
|
- var count_sub = int.Parse(DbHelperSQL.GetSingle("select count(*) from T_RepositoryCategory where 1=1 and F_CategoryType = 1 and F_DeleteFlag = 0 and F_ParentId=" + int.Parse(dtGDLY1.Rows[v]["F_CategoryId"].ToString()) + "").ToString());
|
|
|
44
|
+ var count_sub = int.Parse(DbHelperSQL.GetSingle("select count(*) from T_RepositoryCategory where 1=1 and F_DeleteFlag = 0 and F_CategoryType = 1 and F_ParentId=" + int.Parse(dtGDLY1.Rows[v]["F_CategoryId"].ToString()) + "").ToString());
|
|
45
|
45
|
dtGDLY1_name[v + 1] = catename;
|
|
46
|
46
|
dtGDLY1_count[v + 1] = count_sub;
|
|
47
|
47
|
}
|
|
|
@@ -99,7 +99,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
99
|
99
|
"*",
|
|
100
|
100
|
sqlGDLY,
|
|
101
|
101
|
"ORDER BY F_ParentId asc",
|
|
102
|
|
- 10,
|
|
|
102
|
+ 100,
|
|
103
|
103
|
1,
|
|
104
|
104
|
true,
|
|
105
|
105
|
out recordCount);
|
|
|
@@ -134,31 +134,10 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
134
|
134
|
{
|
|
135
|
135
|
DataTable dtNew = new DataTable();
|
|
136
|
136
|
#region 添加表格标题
|
|
137
|
|
- ////添加第一行标题
|
|
138
|
|
- ////DataColumn dc1 = new DataColumn("");
|
|
139
|
|
- ////dtNew.Columns.Add(dc1);
|
|
140
|
|
- //var sqlGDLY1 = "select F_CategoryId,F_CategoryName from T_RepositoryCategory where 1=1 and F_CategoryType = 1 and F_ParentId in (select F_CategoryId from T_RepositoryCategory where F_CategoryType = 1 and F_DeleteFlag = 0 and F_CategoryName = '试剂'))";
|
|
141
|
|
- //var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
|
|
142
|
|
- //int dtGDLY1rowcount = dtGDLY1.Rows.Count;
|
|
143
|
|
- ////列名
|
|
144
|
|
- //string[] dtGDLY1_name = new string[dtGDLY1rowcount + 1];
|
|
145
|
|
- //dtGDLY1_name[0] = "";
|
|
146
|
|
- ////列数
|
|
147
|
|
- //int[] dtGDLY1_count = new int[dtGDLY1rowcount + 1];
|
|
148
|
|
- //dtGDLY1_count[0] = 1;
|
|
149
|
|
-
|
|
150
|
|
- //for (int v = 0; v < dtGDLY1rowcount; v++)
|
|
151
|
|
- //{
|
|
152
|
|
- // string catename = dtGDLY1.Rows[v]["F_CategoryName"].ToString();
|
|
153
|
|
- // var count_sub = int.Parse(DbHelperSQL.GetSingle("select count(*) from T_RepositoryCategory where 1=1 and F_CategoryType = 1 and F_ParentId=" + int.Parse(dtGDLY1.Rows[v]["F_CategoryId"].ToString()) + "").ToString());
|
|
154
|
|
- // dtGDLY1_name[v + 1] = catename;
|
|
155
|
|
- // dtGDLY1_count[v + 1] = count_sub;
|
|
156
|
|
- //}
|
|
157
|
|
-
|
|
158
|
137
|
//添加第二行标题
|
|
159
|
138
|
DataColumn dc = new DataColumn("姓名");
|
|
160
|
139
|
dtNew.Columns.Add(dc);
|
|
161
|
|
- 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 = '试剂') and F_DeleteFlag = 0 ) and F_DeleteFlag = 0";
|
|
|
140
|
+ 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 = '试剂') and F_DeleteFlag = 0) and F_DeleteFlag = 0";
|
|
162
|
141
|
var recordCount = 0;
|
|
163
|
142
|
var dtGDLY = BLL.PagerBLL.GetListPager(
|
|
164
|
143
|
"T_RepositoryCategory",
|
|
|
@@ -166,7 +145,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
166
|
145
|
"*",
|
|
167
|
146
|
sqlGDLY,
|
|
168
|
147
|
"ORDER BY F_ParentId asc",
|
|
169
|
|
- 10,
|
|
|
148
|
+ 100,
|
|
170
|
149
|
1,
|
|
171
|
150
|
true,
|
|
172
|
151
|
out recordCount);
|
|
|
@@ -313,6 +292,8 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
313
|
292
|
//colpos[dtcolpos + 2] = 1;
|
|
314
|
293
|
//colpos[dtcolpos + 3] = 1;
|
|
315
|
294
|
|
|
|
295
|
+
|
|
|
296
|
+
|
|
316
|
297
|
NPOIHelper npoi = new NPOIHelper();
|
|
317
|
298
|
DataTable dt = getData(stime, endtime);
|
|
318
|
299
|
#region 处理第二行标题
|
|
|
@@ -326,7 +307,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
326
|
307
|
"*",
|
|
327
|
308
|
sqlGDLY,
|
|
328
|
309
|
"ORDER BY F_ParentId asc",
|
|
329
|
|
- 10,
|
|
|
310
|
+ 100,
|
|
330
|
311
|
1,
|
|
331
|
312
|
true,
|
|
332
|
313
|
out recordCount);
|
|
|
@@ -340,6 +321,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
340
|
321
|
}
|
|
341
|
322
|
colnames.Add("");
|
|
342
|
323
|
#endregion
|
|
|
324
|
+
|
|
343
|
325
|
if (npoi.ExportToExcelForGDLX("工单类型试剂报表", dt, "试剂", dtGDLY1_name, colpos, colnames) == "")
|
|
344
|
326
|
{
|
|
345
|
327
|
var obj = new
|