|
|
@@ -262,15 +262,17 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
262
|
262
|
starttime = starttime + " 00:00:00";
|
|
263
|
263
|
endtime = endtime + " 23:59:59";
|
|
264
|
264
|
|
|
265
|
|
- string sql = "select a.F_DeptId,dbo.GetDeptName(a.F_DeptId) as DeptName,w.F_WorkOrderId,w.F_ComContent,a.F_SubmitDate,"
|
|
266
|
|
- + "dbo.GetFeedBackTime(a.F_SubmitDate,10) as YFKDate, F_EndDate,"
|
|
267
|
|
- + "dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))-10 as OverDays "
|
|
268
|
|
- + " from T_Bus_WorkOrder w inner join T_Bus_AssignedInfo a on w.F_WorkOrderId=a.F_WorkOrderId "
|
|
269
|
|
- + "where w.F_IsDelete=0 and w.F_RegDate>'" + starttime + "' and w.F_RegDate<='" + endtime
|
|
270
|
|
- + "' and isnull(a.F_DeptId,0)<>0 and dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))>10 "
|
|
271
|
|
- + " order by a.F_DeptId";
|
|
272
|
|
-
|
|
|
265
|
+ //string sql = "select a.F_DeptId,dbo.GetDeptName(a.F_DeptId) as DeptName,w.F_WorkOrderId,w.F_ComContent,a.F_SubmitDate,"
|
|
|
266
|
+ // + "dbo.GetFeedBackTime(a.F_SubmitDate,10) as YFKDate, F_EndDate,"
|
|
|
267
|
+ // + "dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))-10 as OverDays "
|
|
|
268
|
+ // + " from T_Bus_WorkOrder w inner join T_Bus_AssignedInfo a on w.F_WorkOrderId=a.F_WorkOrderId "
|
|
|
269
|
+ // + "where w.F_IsDelete=0 and w.F_RegDate>'" + starttime + "' and w.F_RegDate<='" + endtime
|
|
|
270
|
+ // + "' and isnull(a.F_DeptId,0)<>0 and dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))>10 "
|
|
|
271
|
+ // + " order by a.F_DeptId";
|
|
|
272
|
+ string sql = "SELECT * FROM dbo.View_OverList where F_RegDate>='" + starttime + "' and F_RegDate<='" + endtime + "' order by F_DeptId";
|
|
273
|
273
|
var dt = DbHelperSQL.Query(sql).Tables[0];
|
|
|
274
|
+ dt.Columns.Remove("F_DeptId");
|
|
|
275
|
+ dt.Columns.Remove("F_RegDate");
|
|
274
|
276
|
|
|
275
|
277
|
string[] cols = { "单位", "编号", "内容", "转办日期", "应反馈日期", "反馈日期", "逾期天数" };
|
|
276
|
278
|
|
|
|
@@ -312,19 +314,23 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
312
|
314
|
// + "where w.F_IsDelete=0 and w.F_RegDate>'" + starttime + "' and w.F_RegDate<='" + endtime
|
|
313
|
315
|
// + "' and isnull(a.F_DeptId,0)<>0 and dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))>a.F_OverDay "
|
|
314
|
316
|
// + " order by a.F_DeptId";
|
|
315
|
|
- string sql = "select dbo.GetDeptName(a.F_DeptId) as '单位',w.F_WorkOrderId as '编号',w.F_ComContent as '内容',a.F_SubmitDate as '转办日期',"
|
|
316
|
|
- + "dbo.GetFeedBackTime(a.F_SubmitDate,10) as '应反馈日期', F_EndDate as '反馈日期',"
|
|
317
|
|
- + "dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))-10 as '逾期天数' "
|
|
318
|
|
- + " from T_Bus_WorkOrder w inner join T_Bus_AssignedInfo a on w.F_WorkOrderId=a.F_WorkOrderId "
|
|
319
|
|
- + "where w.F_IsDelete=0 and w.F_RegDate>'" + starttime + "' and w.F_RegDate<='" + endtime
|
|
320
|
|
- + "' and isnull(a.F_DeptId,0)<>0 and dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))>10 "
|
|
321
|
|
- + " order by a.F_DeptId";
|
|
322
|
|
-
|
|
|
317
|
+ //string sql = "select dbo.GetDeptName(a.F_DeptId) as '单位',w.F_WorkOrderId as '编号',w.F_ComContent as '内容',a.F_SubmitDate as '转办日期',"
|
|
|
318
|
+ // + "dbo.GetFeedBackTime(a.F_SubmitDate,10) as '应反馈日期', F_EndDate as '反馈日期',"
|
|
|
319
|
+ // + "dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))-10 as '逾期天数' "
|
|
|
320
|
+ // + " from T_Bus_WorkOrder w inner join T_Bus_AssignedInfo a on w.F_WorkOrderId=a.F_WorkOrderId "
|
|
|
321
|
+ // + "where w.F_IsDelete=0 and w.F_RegDate>'" + starttime + "' and w.F_RegDate<='" + endtime
|
|
|
322
|
+ // + "' and isnull(a.F_DeptId,0)<>0 and dbo.GetFeedBackOverDay(a.F_SubmitDate,ISNULL(a.F_EndDate, GETDATE()))>10 "
|
|
|
323
|
+ // + " order by a.F_DeptId";
|
|
|
324
|
+ string sql = "SELECT * FROM dbo.View_OverList where F_RegDate>='" + starttime + "' and F_RegDate<='" + endtime + "' order by F_DeptId";
|
|
323
|
325
|
var dt = DbHelperSQL.Query(sql).Tables[0];
|
|
|
326
|
+ dt.Columns.Remove("F_DeptId");
|
|
|
327
|
+ dt.Columns.Remove("F_RegDate");
|
|
|
328
|
+
|
|
|
329
|
+ string[] cols = { "单位", "编号", "内容", "转办日期", "应反馈日期", "反馈日期", "逾期天数" };
|
|
324
|
330
|
|
|
325
|
331
|
NPOIHelper npoi = new NPOIHelper();
|
|
326
|
332
|
|
|
327
|
|
- if (npoi.ExportToExcel("逾期统计", dt) == "")
|
|
|
333
|
+ if (npoi.ExportToExcel("逾期统计", dt, cols) == "")
|
|
328
|
334
|
{
|
|
329
|
335
|
return Success("导出成功");
|
|
330
|
336
|
}
|
|
|
@@ -405,6 +411,9 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
405
|
411
|
ActionResult res = NoToken("未知错误,请重新登录");
|
|
406
|
412
|
if (Request.IsAuthenticated)
|
|
407
|
413
|
{
|
|
|
414
|
+ int type = RequestString.GetInt("type", 0);
|
|
|
415
|
+ int bigtype = RequestString.GetInt("bigtype", 0);
|
|
|
416
|
+ int smalltype = RequestString.GetInt("smalltype", 0);
|
|
408
|
417
|
string year = RequestString.GetQueryString("year");
|
|
409
|
418
|
string month = RequestString.GetQueryString("month");
|
|
410
|
419
|
if (string.IsNullOrEmpty(year))
|
|
|
@@ -417,7 +426,23 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
417
|
426
|
}
|
|
418
|
427
|
string sql = "SELECT * FROM dbo.View_DealList where SUBSTRING(F_RegDate,1,7)='" + (year + "-" + month) + "'";
|
|
419
|
428
|
|
|
|
429
|
+ if (type != 0)
|
|
|
430
|
+ {
|
|
|
431
|
+ sql += " and F_InfoType = '" + type + "' ";
|
|
|
432
|
+ }
|
|
|
433
|
+ if (bigtype != 0)
|
|
|
434
|
+ {
|
|
|
435
|
+ sql += " and F_InfoConBigType = '" + bigtype + "' ";
|
|
|
436
|
+ }
|
|
|
437
|
+ if (smalltype != 0)
|
|
|
438
|
+ {
|
|
|
439
|
+ sql += " and F_InfoConSmallType = '" + smalltype + "' ";
|
|
|
440
|
+ }
|
|
|
441
|
+
|
|
420
|
442
|
var dt = DbHelperSQL.Query(sql).Tables[0];
|
|
|
443
|
+ dt.Columns.Remove("F_InfoType");
|
|
|
444
|
+ dt.Columns.Remove("F_InfoConBigType");
|
|
|
445
|
+ dt.Columns.Remove("F_InfoConSmallType");
|
|
421
|
446
|
|
|
422
|
447
|
string[] cols = { "受理编号", "投诉人及电话", "投诉时间", "办理部门", "办结时间", "内容摘要", "办理结果", "备注" };
|
|
423
|
448
|
|
|
|
@@ -441,7 +466,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
441
|
466
|
cols = cols,
|
|
442
|
467
|
data = dt
|
|
443
|
468
|
};
|
|
444
|
|
- return Success("成功");
|
|
|
469
|
+ return Success("成功",obj);
|
|
445
|
470
|
}
|
|
446
|
471
|
}
|
|
447
|
472
|
return res;
|