|
|
@@ -89,7 +89,7 @@ namespace CallCenterApi.Interface.Controllers
|
|
89
|
89
|
private object GetSourceCount()
|
|
90
|
90
|
{
|
|
91
|
91
|
string sql = " select F_Value Source,(select COUNT(1) from T_Bus_WorkOrder where datediff(day,F_RegDate,getdate())=0 and F_IsDelete=0 "
|
|
92
|
|
- + " and isnull(F_InfoConSmallType,0)!=0 and F_InfoSource=F_ValueId) Count from dbo.T_Sys_DictionaryValue where F_ItemId=6 ";
|
|
|
92
|
+ + " and datalength(F_ComContent) >0 and F_InfoSource=F_ValueId) Count from dbo.T_Sys_DictionaryValue where F_ItemId=6 ";
|
|
93
|
93
|
DataTable dt = DbHelperSQL.Query(sql).Tables[0];
|
|
94
|
94
|
|
|
95
|
95
|
return dt;
|
|
|
@@ -98,7 +98,7 @@ namespace CallCenterApi.Interface.Controllers
|
|
98
|
98
|
private object GetAreaCount()
|
|
99
|
99
|
{
|
|
100
|
100
|
string sql = " select F_AreaName AreaName,(select COUNT(1) from T_Bus_WorkOrder where datediff(day,F_RegDate,getdate())=0 and F_IsDelete=0 "
|
|
101
|
|
- + "and isnull(F_InfoConSmallType,0)!=0 and F_SourceArea=F_AreaId) Count from dbo.T_Sys_Area ";
|
|
|
101
|
+ + "and datalength(F_ComContent) >0 and F_SourceArea=F_AreaId) Count from dbo.T_Sys_Area ";
|
|
102
|
102
|
DataTable dt = DbHelperSQL.Query(sql).Tables[0];
|
|
103
|
103
|
|
|
104
|
104
|
return dt;
|
|
|
@@ -115,7 +115,7 @@ namespace CallCenterApi.Interface.Controllers
|
|
115
|
115
|
cols = areaList.Select(p => p.F_AreaName),
|
|
116
|
116
|
counts = new List<int[]>()
|
|
117
|
117
|
};
|
|
118
|
|
- //string sql = " select datepart(hh, F_RegDate) as h,COUNT(1) as n from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
118
|
+ //string sql = " select datepart(hh, F_RegDate) as h,COUNT(1) as n from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 "
|
|
119
|
119
|
// + " and datediff(day, F_RegDate, getdate()) = 0 group by datepart(hh, F_RegDate) ";
|
|
120
|
120
|
//DataTable dt = DbHelperSQL.Query(sql).Tables[0];
|
|
121
|
121
|
foreach (var area in areaList)
|
|
|
@@ -123,10 +123,10 @@ namespace CallCenterApi.Interface.Controllers
|
|
123
|
123
|
int[] count = new int[24];
|
|
124
|
124
|
for (int i = 0; i < hours.Length; i++)
|
|
125
|
125
|
{
|
|
126
|
|
- string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
126
|
+ string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 "
|
|
127
|
127
|
+ " and datediff(day, F_RegDate, getdate()) = 0 and datepart(hh, F_RegDate)=" + hours[i];
|
|
128
|
128
|
count[i] = Int32.Parse(DbHelperSQL.Query(sql).Tables[0].Rows[0][0].ToString());
|
|
129
|
|
- //var list = workOrderBLL.GetModelList("F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
129
|
+ //var list = workOrderBLL.GetModelList("F_IsDelete = 0 and datalength(F_ComContent) >0 "
|
|
130
|
130
|
// + " and datediff(day, F_RegDate, getdate()) = 0 and datepart(hh, F_RegDate)=" + hours[i]);
|
|
131
|
131
|
//count[i] = list.Count;
|
|
132
|
132
|
//var n = dt.Select(" h=" + hours[i])[0]["n"].ToString();
|
|
|
@@ -171,11 +171,11 @@ namespace CallCenterApi.Interface.Controllers
|
|
171
|
171
|
int[] count = new int[12];
|
|
172
|
172
|
for (int i = 0; i < ints.Length; i++)
|
|
173
|
173
|
{
|
|
174
|
|
- string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
174
|
+ string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 "
|
|
175
|
175
|
+ " and datediff(month,F_RegDate,getdate())<=12 and datepart(month, F_RegDate)=" + ints[i];
|
|
176
|
176
|
count[i] = Int32.Parse(DbHelperSQL.Query(sql).Tables[0].Rows[0][0].ToString());
|
|
177
|
177
|
|
|
178
|
|
- //var list = workOrderBLL.GetModelList("F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 and "
|
|
|
178
|
+ //var list = workOrderBLL.GetModelList("F_IsDelete = 0 and datalength(F_ComContent) >0 and "
|
|
179
|
179
|
// + "datediff(month,F_RegDate,getdate())<=12 and datepart(month, F_RegDate)=" + ints[i]);
|
|
180
|
180
|
//count[i] = list.Count;
|
|
181
|
181
|
}
|
|
|
@@ -203,19 +203,19 @@ namespace CallCenterApi.Interface.Controllers
|
|
203
|
203
|
|
|
204
|
204
|
//for (int i = 0; i < list.Count; i++)
|
|
205
|
205
|
//{
|
|
206
|
|
- // string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
206
|
+ // string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 "
|
|
207
|
207
|
// + " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_AssignedInfo where 1=1 "
|
|
208
|
208
|
// + " and F_DeptId=" + list[i].F_DeptId + ")";
|
|
209
|
209
|
// var tl = Int32.Parse(DbHelperSQL.Query(sql).Tables[0].Rows[0][0].ToString());
|
|
210
|
|
- // sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
210
|
+ // sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 "
|
|
211
|
211
|
// + " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_AssignedInfo where 1=1 "
|
|
212
|
212
|
// + " and F_State=1 and F_DeptId=" + list[i].F_DeptId + ")";
|
|
213
|
213
|
// var cl = Int32.Parse(DbHelperSQL.Query(sql).Tables[0].Rows[0][0].ToString());
|
|
214
|
|
- // //var tl = workOrderBLL.GetModelList("F_IsDelete=0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
214
|
+ // //var tl = workOrderBLL.GetModelList("F_IsDelete=0 and datalength(F_ComContent) >0 "
|
|
215
|
215
|
// ////+ " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_AssignedInfo where datediff(day,F_SubmitDate,getdate())=0 "
|
|
216
|
216
|
// //+ " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_AssignedInfo where 1=1 "
|
|
217
|
217
|
// //+ " and F_DeptId=" + list[i].F_DeptId + ")");
|
|
218
|
|
- // //var cl = workOrderBLL.GetModelList("F_IsDelete=0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
218
|
+ // //var cl = workOrderBLL.GetModelList("F_IsDelete=0 and datalength(F_ComContent) >0 "
|
|
219
|
219
|
// ////+ " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_AssignedInfo where datediff(day,F_SubmitDate,getdate())=0 "
|
|
220
|
220
|
// //+ " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_AssignedInfo where 1=1 "
|
|
221
|
221
|
// //+ " and F_State=1 and F_DeptId=" + list[i].F_DeptId + ")");
|
|
|
@@ -230,11 +230,11 @@ namespace CallCenterApi.Interface.Controllers
|
|
230
|
230
|
//obj.percents.Add(percent);
|
|
231
|
231
|
|
|
232
|
232
|
var obj = list.Select(p => {
|
|
233
|
|
- string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
233
|
+ string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 "
|
|
234
|
234
|
+ " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_AssignedInfo where 1=1 "
|
|
235
|
235
|
+ " and F_DeptId=" + p.F_DeptId + ")";
|
|
236
|
236
|
var tl = Int32.Parse(DbHelperSQL.Query(sql).Tables[0].Rows[0][0].ToString());
|
|
237
|
|
- sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
237
|
+ sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 "
|
|
238
|
238
|
+ " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_AssignedInfo where 1=1 "
|
|
239
|
239
|
+ " and F_State=1 and F_DeptId=" + p.F_DeptId + ")";
|
|
240
|
240
|
var cl = Int32.Parse(DbHelperSQL.Query(sql).Tables[0].Rows[0][0].ToString());
|
|
|
@@ -257,18 +257,18 @@ namespace CallCenterApi.Interface.Controllers
|
|
257
|
257
|
|
|
258
|
258
|
for (int i = 0; i < hours.Count(); i++)
|
|
259
|
259
|
{
|
|
260
|
|
- string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
260
|
+ string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 "
|
|
261
|
261
|
+ " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_AssignedInfo where datediff(day,F_SubmitDate,getdate())=0 "
|
|
262
|
262
|
+ " and datepart(hh, F_SubmitDate)=" + hours[i] + ")";
|
|
263
|
263
|
var al = Int32.Parse(DbHelperSQL.Query(sql).Tables[0].Rows[0][0].ToString());
|
|
264
|
|
- sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
264
|
+ sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 "
|
|
265
|
265
|
+ " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_AssignedInfo where datediff(day,F_EndDate,getdate())=0 "
|
|
266
|
266
|
+ " and F_State=1 and datepart(hh, F_EndDate)=" + hours[i] + ")";
|
|
267
|
267
|
var fl = Int32.Parse(DbHelperSQL.Query(sql).Tables[0].Rows[0][0].ToString());
|
|
268
|
|
- //var al = workOrderBLL.GetModelList("F_IsDelete=0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
268
|
+ //var al = workOrderBLL.GetModelList("F_IsDelete=0 and datalength(F_ComContent) >0 "
|
|
269
|
269
|
// + " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_AssignedInfo where datediff(day,F_SubmitDate,getdate())=0 "
|
|
270
|
270
|
// + " and datepart(hh, F_SubmitDate)=" + hours[i] + ")");
|
|
271
|
|
- //var fl = workOrderBLL.GetModelList("F_IsDelete=0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
271
|
+ //var fl = workOrderBLL.GetModelList("F_IsDelete=0 and datalength(F_ComContent) >0 "
|
|
272
|
272
|
// + " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_AssignedInfo where datediff(day,F_EndDate,getdate())=0 "
|
|
273
|
273
|
// + " and F_State=1 and datepart(hh, F_EndDate)=" + hours[i] + ")");
|
|
274
|
274
|
acounts[i] = al;
|
|
|
@@ -294,7 +294,7 @@ namespace CallCenterApi.Interface.Controllers
|
|
294
|
294
|
|
|
295
|
295
|
var obj = list.Select(p =>
|
|
296
|
296
|
{
|
|
297
|
|
- string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
297
|
+ string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 "
|
|
298
|
298
|
+ " and F_InfoType=" + p.F_ValueId;
|
|
299
|
299
|
var tl = Int32.Parse(DbHelperSQL.Query(sql).Tables[0].Rows[0][0].ToString());
|
|
300
|
300
|
return new
|
|
|
@@ -332,10 +332,10 @@ namespace CallCenterApi.Interface.Controllers
|
|
332
|
332
|
int[] count = new int[12];
|
|
333
|
333
|
for (int i = 0; i < ints.Length; i++)
|
|
334
|
334
|
{
|
|
335
|
|
- string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 and F_InfoType=" + l.F_ValueId
|
|
|
335
|
+ string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 and F_InfoType=" + l.F_ValueId
|
|
336
|
336
|
+ " and datediff(month,F_RegDate,getdate())<=12 and datepart(month, F_RegDate)=" + ints[i];
|
|
337
|
337
|
count[i] = Int32.Parse(DbHelperSQL.Query(sql).Tables[0].Rows[0][0].ToString());
|
|
338
|
|
- //var list = workOrderBLL.GetModelList("F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 and F_InfoType="+l.F_ValueId
|
|
|
338
|
+ //var list = workOrderBLL.GetModelList("F_IsDelete = 0 and datalength(F_ComContent) >0 and F_InfoType="+l.F_ValueId
|
|
339
|
339
|
// + " and datediff(month,F_RegDate,getdate())<=12 and datepart(month, F_RegDate)=" + ints[i]);
|
|
340
|
340
|
//count[i] = list.Count;
|
|
341
|
341
|
}
|
|
|
@@ -361,10 +361,10 @@ namespace CallCenterApi.Interface.Controllers
|
|
361
|
361
|
int[] count = new int[24];
|
|
362
|
362
|
for (int i = 0; i < hours.Length; i++)
|
|
363
|
363
|
{
|
|
364
|
|
- string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 and F_InfoType=" + l.F_ValueId
|
|
|
364
|
+ string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 and F_InfoType=" + l.F_ValueId
|
|
365
|
365
|
+ " and datediff(day,F_RegDate,getdate())=0 and datepart(hh, F_RegDate)=" + hours[i];
|
|
366
|
366
|
count[i] = Int32.Parse(DbHelperSQL.Query(sql).Tables[0].Rows[0][0].ToString());
|
|
367
|
|
- //var list = workOrderBLL.GetModelList("F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 and F_InfoType=" + l.F_ValueId
|
|
|
367
|
+ //var list = workOrderBLL.GetModelList("F_IsDelete = 0 and datalength(F_ComContent) >0 and F_InfoType=" + l.F_ValueId
|
|
368
|
368
|
// + " and datediff(day,F_RegDate,getdate())=0 and datepart(hh, F_RegDate)=" + hours[i]);
|
|
369
|
369
|
//count[i] = list.Count;
|
|
370
|
370
|
}
|
|
|
@@ -394,7 +394,7 @@ namespace CallCenterApi.Interface.Controllers
|
|
394
|
394
|
}
|
|
395
|
395
|
}
|
|
396
|
396
|
|
|
397
|
|
- string sqltotal = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 and F_InfoType=6";
|
|
|
397
|
+ string sqltotal = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 and F_InfoType=6";
|
|
398
|
398
|
var t = Int32.Parse(DbHelperSQL.Query(sqltotal).Tables[0].Rows[0][0].ToString());
|
|
399
|
399
|
|
|
400
|
400
|
var typelist = dicValueBLL.GetModelList(" F_ValueId in (" + ids + ") ");
|
|
|
@@ -420,7 +420,7 @@ namespace CallCenterApi.Interface.Controllers
|
|
420
|
420
|
|
|
421
|
421
|
var obj = list.Select(p =>
|
|
422
|
422
|
{
|
|
423
|
|
- string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
423
|
+ string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 "
|
|
424
|
424
|
+ " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_AssignedInfo where 1=1 "
|
|
425
|
425
|
+ " and F_DeptId=" + p.F_DeptId + ")";
|
|
426
|
426
|
var tl = Int32.Parse(DbHelperSQL.Query(sql).Tables[0].Rows[0][0].ToString());
|
|
|
@@ -583,10 +583,10 @@ namespace CallCenterApi.Interface.Controllers
|
|
583
|
583
|
|
|
584
|
584
|
// for (int i = 0; i < typelist.Count; i++)
|
|
585
|
585
|
// {
|
|
586
|
|
- // string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 "
|
|
|
586
|
+ // string sql = " select count(1) from dbo.T_Bus_WorkOrder where F_IsDelete = 0 and datalength(F_ComContent) >0 "
|
|
587
|
587
|
// + " and F_InfoType=" + typelist[i].F_ValueId;
|
|
588
|
588
|
// counts[i] = Int32.Parse(DbHelperSQL.Query(sql).Tables[0].Rows[0][0].ToString());
|
|
589
|
|
- // //var list = workOrderBLL.GetModelList("F_IsDelete = 0 and isnull(F_InfoConSmallType,0)!=0 and F_InfoType=" + typelist[i].F_ValueId);
|
|
|
589
|
+ // //var list = workOrderBLL.GetModelList("F_IsDelete = 0 and datalength(F_ComContent) >0 and F_InfoType=" + typelist[i].F_ValueId);
|
|
590
|
590
|
// //counts[i] = list.Count;
|
|
591
|
591
|
// }
|
|
592
|
592
|
// var obj = new
|