Просмотр исходного кода

工单类型试剂 和 工单类型仪器 bug 修改

lihai лет назад: 7
Родитель
Сommit
4eca8193d9

+ 26 - 11
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/GDLXSJController.cs

29
             //添加第一行标题
29
             //添加第一行标题
30
             //DataColumn dc1 = new DataColumn("");
30
             //DataColumn dc1 = new DataColumn("");
31
             //dtNew.Columns.Add(dc1);
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
             var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
33
             var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
34
             int dtGDLY1rowcount = dtGDLY1.Rows.Count;
34
             int dtGDLY1rowcount = dtGDLY1.Rows.Count;
35
             //列名
35
             //列名
66
             //添加第一行标题
66
             //添加第一行标题
67
             //DataColumn dc1 = new DataColumn("");
67
             //DataColumn dc1 = new DataColumn("");
68
             //dtNew.Columns.Add(dc1);
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
             var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
70
             var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
71
             int dtGDLY1rowcount = dtGDLY1.Rows.Count;
71
             int dtGDLY1rowcount = dtGDLY1.Rows.Count;
72
             //列名
72
             //列名
99
               "F_CategoryId",
99
               "F_CategoryId",
100
               "*",
100
               "*",
101
               sqlGDLY,
101
               sqlGDLY,
102
-              "ORDER BY F_ParentId asc",
102
+              "ORDER  BY F_ParentId ASC,F_Sort ASC",
103
               100,
103
               100,
104
               1,
104
               1,
105
               true,
105
               true,
110
             for (int i = 0; i < modelList.Count; i++)
110
             for (int i = 0; i < modelList.Count; i++)
111
             {
111
             {
112
                 string colname = modelList[i].F_CategoryName;
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
                 colnames.Add(colname);
116
                 colnames.Add(colname);
116
             }
117
             }
117
-            //dtNew.Columns.Add("总计");
118
             colnames.Add("");
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
             #endregion
132
             #endregion
120
             var obj = new
133
             var obj = new
121
             {
134
             {
122
                 linename = dtGDLY1_name,
135
                 linename = dtGDLY1_name,
123
                 linecount = dtGDLY1_count,
136
                 linecount = dtGDLY1_count,
124
                 lineSeName = colnames,
137
                 lineSeName = colnames,
138
+                lineSeName2 = colnames2,
125
                 dtlist = dtNew
139
                 dtlist = dtNew
126
             };
140
             };
127
             res = Success("获取工单类型数据成功", obj);
141
             res = Success("获取工单类型数据成功", obj);
143
               "F_CategoryId",
157
               "F_CategoryId",
144
               "*",
158
               "*",
145
               sqlGDLY,
159
               sqlGDLY,
146
-              "ORDER BY F_ParentId asc",
160
+              "ORDER  BY F_ParentId ASC,F_Sort ASC",
147
               100,
161
               100,
148
               1,
162
               1,
149
               true,
163
               true,
154
             for (int i = 0; i < modelList.Count; i++)
168
             for (int i = 0; i < modelList.Count; i++)
155
             {
169
             {
156
                 string colname = modelList[i].F_CategoryName;
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
                 dtNew.Columns.Add(new DataColumn(colname));
174
                 dtNew.Columns.Add(new DataColumn(colname));
160
                 cateid[i] = modelList[i].F_CategoryId;
175
                 cateid[i] = modelList[i].F_CategoryId;
161
             }
176
             }
230
                 //添加第一行标题
245
                 //添加第一行标题
231
                 //DataColumn dc1 = new DataColumn("");
246
                 //DataColumn dc1 = new DataColumn("");
232
                 //dtNew.Columns.Add(dc1);
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
                 var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
249
                 var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
235
                 int dtGDLY1rowcount = dtGDLY1.Rows.Count;
250
                 int dtGDLY1rowcount = dtGDLY1.Rows.Count;
236
                 //每块占的列数
251
                 //每块占的列数
305
                   "F_CategoryId",
320
                   "F_CategoryId",
306
                   "*",
321
                   "*",
307
                   sqlGDLY,
322
                   sqlGDLY,
308
-                  "ORDER BY F_ParentId asc",
323
+                  "ORDER  BY F_ParentId ASC,F_Sort ASC",
309
                   100,
324
                   100,
310
                   1,
325
                   1,
311
                   true,
326
                   true,

+ 24 - 9
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/GDLXYQController.cs

31
             //添加第一行标题
31
             //添加第一行标题
32
             //DataColumn dc1 = new DataColumn("");
32
             //DataColumn dc1 = new DataColumn("");
33
             //dtNew.Columns.Add(dc1);
33
             //dtNew.Columns.Add(dc1);
34
-            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";
34
+            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";
35
             var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
35
             var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
36
             int dtGDLY1rowcount = dtGDLY1.Rows.Count;
36
             int dtGDLY1rowcount = dtGDLY1.Rows.Count;
37
             //列名
37
             //列名
68
             //添加第一行标题
68
             //添加第一行标题
69
             //DataColumn dc1 = new DataColumn("");
69
             //DataColumn dc1 = new DataColumn("");
70
             //dtNew.Columns.Add(dc1);
70
             //dtNew.Columns.Add(dc1);
71
-            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";
71
+            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";
72
             var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
72
             var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
73
             int dtGDLY1rowcount = dtGDLY1.Rows.Count;
73
             int dtGDLY1rowcount = dtGDLY1.Rows.Count;
74
             //列名
74
             //列名
101
               "F_CategoryId",
101
               "F_CategoryId",
102
               "*",
102
               "*",
103
               sqlGDLY,
103
               sqlGDLY,
104
-              "ORDER BY F_ParentId asc",
104
+              "ORDER  BY F_ParentId ASC,F_Sort ASC",
105
               100,
105
               100,
106
               1,
106
               1,
107
               true,
107
               true,
120
             }
120
             }
121
             //dtNew.Columns.Add("总计");
121
             //dtNew.Columns.Add("总计");
122
             colnames.Add("");
122
             colnames.Add("");
123
+
124
+            #region 第二行标题 - 作为临时字段(解决返回字典重复问题)
125
+            List<string> colnames2 = new List<string>();
126
+            colnames2.Add("姓名");
127
+            for (int i = 0; i < modelList.Count; i++)
128
+            {
129
+                string colname2 = "";
130
+                colname2 = "list" + i;
131
+                colnames2.Add(colname2);
132
+            }
133
+            colnames2.Add("");
134
+            #endregion
123
             #endregion
135
             #endregion
124
             var obj = new
136
             var obj = new
125
             {
137
             {
126
                 linename = dtGDLY1_name,
138
                 linename = dtGDLY1_name,
127
                 linecount = dtGDLY1_count,
139
                 linecount = dtGDLY1_count,
128
                 lineSeName = colnames,
140
                 lineSeName = colnames,
141
+                lineSeName2 = colnames2,
129
                 dtlist = dtNew
142
                 dtlist = dtNew
130
             };
143
             };
131
             res = Success("获取工单类型数据成功", obj);
144
             res = Success("获取工单类型数据成功", obj);
147
               "F_CategoryId",
160
               "F_CategoryId",
148
               "*",
161
               "*",
149
               sqlGDLY,
162
               sqlGDLY,
150
-              "ORDER BY F_ParentId asc",
163
+              "ORDER  BY F_ParentId ASC,F_Sort ASC",
151
               100,
164
               100,
152
               1,
165
               1,
153
               true,
166
               true,
157
 
170
 
158
             for (int i = 0; i < modelList.Count; i++)
171
             for (int i = 0; i < modelList.Count; i++)
159
             {
172
             {
160
-                string colname = modelList[i].F_CategoryName;
161
-                if (dtNew.Columns.Contains(colname))
162
-                    colname += "_" + i;
173
+                //string colname = modelList[i].F_CategoryName;
174
+                //if (dtNew.Columns.Contains(colname))
175
+                //    colname += "_" + i;
176
+                string colname = "";
177
+                colname = "list" + i;
163
                 dtNew.Columns.Add(new DataColumn(colname));
178
                 dtNew.Columns.Add(new DataColumn(colname));
164
                 cateid[i] = modelList[i].F_CategoryId;
179
                 cateid[i] = modelList[i].F_CategoryId;
165
             }
180
             }
234
                 //添加第一行标题
249
                 //添加第一行标题
235
                 //DataColumn dc1 = new DataColumn("");
250
                 //DataColumn dc1 = new DataColumn("");
236
                 //dtNew.Columns.Add(dc1);
251
                 //dtNew.Columns.Add(dc1);
237
-                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";
252
+                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";
238
                 var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
253
                 var dtGDLY1 = DbHelperSQL.Query(sqlGDLY1).Tables[0];
239
                 int dtGDLY1rowcount = dtGDLY1.Rows.Count;
254
                 int dtGDLY1rowcount = dtGDLY1.Rows.Count;
240
                 //每块占的列数
255
                 //每块占的列数
309
                   "F_CategoryId",
324
                   "F_CategoryId",
310
                   "*",
325
                   "*",
311
                   sqlGDLY,
326
                   sqlGDLY,
312
-                  "ORDER BY F_ParentId asc",
327
+                  "ORDER  BY F_ParentId ASC,F_Sort ASC",
313
                   100,
328
                   100,
314
                   1,
329
                   1,
315
                   true,
330
                   true,