|
|
@@ -29,7 +29,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
29
|
29
|
//添加第一行标题
|
|
30
|
30
|
//DataColumn dc1 = new DataColumn("");
|
|
31
|
31
|
//dtNew.Columns.Add(dc1);
|
|
32
|
|
- 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
|
+ 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 ORDER BY F_ParentId ASC";
|
|
33
|
33
|
var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
|
|
34
|
34
|
int dtGDLY1rowcount = dtGDLY1.Rows.Count;
|
|
35
|
35
|
//列名
|
|
|
@@ -66,7 +66,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
66
|
66
|
//添加第一行标题
|
|
67
|
67
|
//DataColumn dc1 = new DataColumn("");
|
|
68
|
68
|
//dtNew.Columns.Add(dc1);
|
|
69
|
|
- 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";
|
|
|
69
|
+ 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 ORDER BY F_ParentId ASC";
|
|
70
|
70
|
var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
|
|
71
|
71
|
int dtGDLY1rowcount = dtGDLY1.Rows.Count;
|
|
72
|
72
|
//列名
|
|
|
@@ -99,7 +99,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
99
|
99
|
"F_CategoryId",
|
|
100
|
100
|
"*",
|
|
101
|
101
|
sqlGDLY,
|
|
102
|
|
- "ORDER BY F_ParentId asc",
|
|
|
102
|
+ "ORDER BY F_ParentId ASC,F_Sort ASC",
|
|
103
|
103
|
100,
|
|
104
|
104
|
1,
|
|
105
|
105
|
true,
|
|
|
@@ -110,18 +110,32 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
110
|
110
|
for (int i = 0; i < modelList.Count; i++)
|
|
111
|
111
|
{
|
|
112
|
112
|
string colname = modelList[i].F_CategoryName;
|
|
113
|
|
- if (colnames.Contains(colname))
|
|
114
|
|
- colname += "_" + i;
|
|
|
113
|
+ //if (colnames.Contains(colname))
|
|
|
114
|
+ // colname += "_" + i;
|
|
|
115
|
+ //colname = "list" + i;
|
|
115
|
116
|
colnames.Add(colname);
|
|
116
|
117
|
}
|
|
117
|
|
- //dtNew.Columns.Add("总计");
|
|
118
|
118
|
colnames.Add("");
|
|
|
119
|
+
|
|
|
120
|
+ #region 第二行标题 - 作为临时字段(解决返回字典重复问题)
|
|
|
121
|
+ List<string> colnames2 = new List<string>();
|
|
|
122
|
+ colnames2.Add("姓名");
|
|
|
123
|
+ for (int i = 0; i < modelList.Count; i++)
|
|
|
124
|
+ {
|
|
|
125
|
+ string colname2 = "";
|
|
|
126
|
+ colname2 = "list" + i;
|
|
|
127
|
+ colnames2.Add(colname2);
|
|
|
128
|
+ }
|
|
|
129
|
+ colnames2.Add("");
|
|
|
130
|
+ #endregion
|
|
|
131
|
+
|
|
119
|
132
|
#endregion
|
|
120
|
133
|
var obj = new
|
|
121
|
134
|
{
|
|
122
|
135
|
linename = dtGDLY1_name,
|
|
123
|
136
|
linecount = dtGDLY1_count,
|
|
124
|
137
|
lineSeName = colnames,
|
|
|
138
|
+ lineSeName2 = colnames2,
|
|
125
|
139
|
dtlist = dtNew
|
|
126
|
140
|
};
|
|
127
|
141
|
res = Success("获取工单类型数据成功", obj);
|
|
|
@@ -143,7 +157,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
143
|
157
|
"F_CategoryId",
|
|
144
|
158
|
"*",
|
|
145
|
159
|
sqlGDLY,
|
|
146
|
|
- "ORDER BY F_ParentId asc",
|
|
|
160
|
+ "ORDER BY F_ParentId ASC,F_Sort ASC",
|
|
147
|
161
|
100,
|
|
148
|
162
|
1,
|
|
149
|
163
|
true,
|
|
|
@@ -154,8 +168,9 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
154
|
168
|
for (int i = 0; i < modelList.Count; i++)
|
|
155
|
169
|
{
|
|
156
|
170
|
string colname = modelList[i].F_CategoryName;
|
|
157
|
|
- if (dtNew.Columns.Contains(colname))
|
|
158
|
|
- colname += "_" + i;
|
|
|
171
|
+ //if (dtNew.Columns.Contains(colname))
|
|
|
172
|
+ // colname += "_" + i;
|
|
|
173
|
+ colname = "list" + i;
|
|
159
|
174
|
dtNew.Columns.Add(new DataColumn(colname));
|
|
160
|
175
|
cateid[i] = modelList[i].F_CategoryId;
|
|
161
|
176
|
}
|
|
|
@@ -230,7 +245,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
230
|
245
|
//添加第一行标题
|
|
231
|
246
|
//DataColumn dc1 = new DataColumn("");
|
|
232
|
247
|
//dtNew.Columns.Add(dc1);
|
|
233
|
|
- 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";
|
|
|
248
|
+ 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 ORDER BY F_ParentId ASC";
|
|
234
|
249
|
var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
|
|
235
|
250
|
int dtGDLY1rowcount = dtGDLY1.Rows.Count;
|
|
236
|
251
|
//每块占的列数
|
|
|
@@ -305,7 +320,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
305
|
320
|
"F_CategoryId",
|
|
306
|
321
|
"*",
|
|
307
|
322
|
sqlGDLY,
|
|
308
|
|
- "ORDER BY F_ParentId asc",
|
|
|
323
|
+ "ORDER BY F_ParentId ASC,F_Sort ASC",
|
|
309
|
324
|
100,
|
|
310
|
325
|
1,
|
|
311
|
326
|
true,
|