|
|
|
|
|
|
280
|
paras.Add("@source", source);
|
280
|
paras.Add("@source", source);
|
|
281
|
var obj = DbHelperSQL.RunProcedure("P_DeptEfficiencyReport_1", paras, "DeptEfficiencyReport");
|
281
|
var obj = DbHelperSQL.RunProcedure("P_DeptEfficiencyReport_1", paras, "DeptEfficiencyReport");
|
|
282
|
var newSet = new DataSet();
|
282
|
var newSet = new DataSet();
|
|
|
|
283
|
+ var newSet1 = new DataSet();
|
|
|
|
284
|
+ DataTable exceldt = new DataTable();
|
|
|
|
285
|
+
|
|
|
|
286
|
+ exceldt.Columns.Add("deptname", typeof(string));//单位名称
|
|
|
|
287
|
+ exceldt.Columns.Add("slcount", typeof(int));//受理量
|
|
|
|
288
|
+ exceldt.Columns.Add("bjcount", typeof(int));//办结量
|
|
|
|
289
|
+ exceldt.Columns.Add("timelycount", typeof(int));//及时量
|
|
|
|
290
|
+ exceldt.Columns.Add("timeoutcount", typeof(int));//延期量
|
|
|
|
291
|
+ exceldt.Columns.Add("remindcount", typeof(int));//催办量
|
|
|
|
292
|
+ exceldt.Columns.Add("zzreloadcount", typeof(string));//郑州重办量
|
|
|
|
293
|
+ exceldt.Columns.Add("bdreloadcount", typeof(string));//本地重办量
|
|
|
|
294
|
+ exceldt.Columns.Add("bjlyrate", typeof(string));//办结率
|
|
|
|
295
|
+ exceldt.Columns.Add("yqlyrate", typeof(string));//延期率
|
|
|
|
296
|
+
|
|
283
|
if (obj != null && obj.Tables[0] != null && obj.Tables[0].Rows.Count > 0)
|
297
|
if (obj != null && obj.Tables[0] != null && obj.Tables[0].Rows.Count > 0)
|
|
284
|
{
|
298
|
{
|
|
|
|
299
|
+
|
|
|
|
300
|
+
|
|
285
|
obj.Tables[0].Columns.Add("rate", typeof(decimal));
|
301
|
obj.Tables[0].Columns.Add("rate", typeof(decimal));
|
|
286
|
for (int i = 0; i < obj.Tables[0].Rows.Count; i++)
|
302
|
for (int i = 0; i < obj.Tables[0].Rows.Count; i++)
|
|
287
|
{
|
303
|
{
|
|
|
|
304
|
+ var deptname = obj.Tables[0].Rows[i]["deptname"].ToString();
|
|
288
|
int completedcount = 0, timelycount = 0, timeoutcount = 0; double timelyrate = 0;
|
305
|
int completedcount = 0, timelycount = 0, timeoutcount = 0; double timelyrate = 0;
|
|
289
|
int slcount = 0;//受理量
|
306
|
int slcount = 0;//受理量
|
|
290
|
int bjcount = 0;//办结量
|
307
|
int bjcount = 0;//办结量
|
|
291
|
int remindcount = 0;//催办量
|
308
|
int remindcount = 0;//催办量
|
|
|
|
309
|
+ int zzreloadcount = 0;//郑州重办量
|
|
|
|
310
|
+ int bdreloadcount = 0;//本地重办量
|
|
292
|
double bjlyrate = 0;//办结率
|
311
|
double bjlyrate = 0;//办结率
|
|
293
|
double yqlyrate = 0;// 延期率
|
312
|
double yqlyrate = 0;// 延期率
|
|
|
|
313
|
+ #region 赋值
|
|
294
|
int.TryParse(obj.Tables[0].Rows[i]["slcount"].ToString(), out slcount);
|
314
|
int.TryParse(obj.Tables[0].Rows[i]["slcount"].ToString(), out slcount);
|
|
295
|
int.TryParse(obj.Tables[0].Rows[i]["bjcount"].ToString(), out bjcount);
|
315
|
int.TryParse(obj.Tables[0].Rows[i]["bjcount"].ToString(), out bjcount);
|
|
296
|
- int.TryParse(obj.Tables[0].Rows[i]["completedcount"].ToString(), out completedcount);
|
|
|
|
297
|
int.TryParse(obj.Tables[0].Rows[i]["timelycount"].ToString(), out timelycount);
|
316
|
int.TryParse(obj.Tables[0].Rows[i]["timelycount"].ToString(), out timelycount);
|
|
298
|
int.TryParse(obj.Tables[0].Rows[i]["timeoutcount"].ToString(), out timeoutcount);
|
317
|
int.TryParse(obj.Tables[0].Rows[i]["timeoutcount"].ToString(), out timeoutcount);
|
|
299
|
int.TryParse(obj.Tables[0].Rows[i]["remindcount"].ToString(), out remindcount);
|
318
|
int.TryParse(obj.Tables[0].Rows[i]["remindcount"].ToString(), out remindcount);
|
|
|
|
319
|
+ int.TryParse(obj.Tables[0].Rows[i]["zzreloadcount"].ToString(), out zzreloadcount);
|
|
|
|
320
|
+ int.TryParse(obj.Tables[0].Rows[i]["bdreloadcount"].ToString(), out bdreloadcount);
|
|
|
|
321
|
+ int.TryParse(obj.Tables[0].Rows[i]["completedcount"].ToString(), out completedcount);
|
|
300
|
// timeoutcount = completedcount - timelycount;
|
322
|
// timeoutcount = completedcount - timelycount;
|
|
301
|
// obj.Tables[0].Rows[i]["timeoutcount"] = timeoutcount;
|
323
|
// obj.Tables[0].Rows[i]["timeoutcount"] = timeoutcount;
|
|
302
|
if (slcount > 0)
|
324
|
if (slcount > 0)
|
|
303
|
{
|
325
|
{
|
|
304
|
- bjlyrate=(double)bjcount/(double)slcount;
|
|
|
|
|
|
326
|
+ bjlyrate = (double)bjcount / (double)slcount;
|
|
305
|
obj.Tables[0].Rows[i]["bjlyrate"] = bjlyrate.ToString("0.00%");//办结率
|
327
|
obj.Tables[0].Rows[i]["bjlyrate"] = bjlyrate.ToString("0.00%");//办结率
|
|
306
|
|
328
|
|
|
307
|
- yqlyrate= (double)timeoutcount/(double)slcount;
|
|
|
|
|
|
329
|
+ yqlyrate = (double)timeoutcount / (double)slcount;
|
|
308
|
obj.Tables[0].Rows[i]["yqlyrate"] = yqlyrate.ToString("0.00%");//办结率
|
330
|
obj.Tables[0].Rows[i]["yqlyrate"] = yqlyrate.ToString("0.00%");//办结率
|
|
309
|
}
|
331
|
}
|
|
310
|
//if (completedcount > 0)
|
332
|
//if (completedcount > 0)
|
|
|
|
|
|
|
312
|
// timelyrate = double.Parse((timelycount * 100).ToString()) / completedcount;
|
334
|
// timelyrate = double.Parse((timelycount * 100).ToString()) / completedcount;
|
|
313
|
// obj.Tables[0].Rows[i]["timelyrate"] = timelyrate.ToString("f") + "%";
|
335
|
// obj.Tables[0].Rows[i]["timelyrate"] = timelyrate.ToString("f") + "%";
|
|
314
|
// obj.Tables[0].Rows[i]["rate"] = timelyrate;
|
336
|
// obj.Tables[0].Rows[i]["rate"] = timelyrate;
|
|
315
|
- //}
|
|
|
|
|
|
337
|
+ //}
|
|
|
|
338
|
+ #endregion
|
|
|
|
339
|
+ #region 赋值
|
|
|
|
340
|
+ DataRow dr = exceldt.NewRow();
|
|
|
|
341
|
+ dr["deptname"] = deptname;
|
|
|
|
342
|
+ dr["slcount"] = slcount.ToString();
|
|
|
|
343
|
+ dr["bjcount"] =bjcount .ToString();
|
|
|
|
344
|
+ dr["timelycount"] =timelycount .ToString();
|
|
|
|
345
|
+ dr["timeoutcount"] =timeoutcount .ToString();
|
|
|
|
346
|
+ dr["remindcount"] =remindcount .ToString();
|
|
|
|
347
|
+ dr["zzreloadcount"] =zzreloadcount .ToString();
|
|
|
|
348
|
+ dr["bdreloadcount"] = bdreloadcount.ToString();
|
|
|
|
349
|
+ if (slcount > 0)
|
|
|
|
350
|
+ {
|
|
|
|
351
|
+ bjlyrate = (double)bjcount / (double)slcount;
|
|
|
|
352
|
+ dr["bjlyrate"] = bjlyrate.ToString("0.00%");//办结率
|
|
|
|
353
|
+
|
|
|
|
354
|
+ yqlyrate = (double)timeoutcount / (double)slcount;
|
|
|
|
355
|
+ dr["yqlyrate"] = yqlyrate.ToString("0.00%");//办结率
|
|
|
|
356
|
+ }
|
|
|
|
357
|
+ exceldt.Rows.Add(dr);
|
|
|
|
358
|
+ #endregion
|
|
316
|
}
|
359
|
}
|
|
|
|
360
|
+ newSet1.Tables.Add(exceldt);
|
|
317
|
obj.Tables[0].DefaultView.Sort = "rate desc";
|
361
|
obj.Tables[0].DefaultView.Sort = "rate desc";
|
|
318
|
newSet.Tables.Add(obj.Tables[0].DefaultView.ToTable());
|
362
|
newSet.Tables.Add(obj.Tables[0].DefaultView.ToTable());
|
|
319
|
newSet.Tables[0].Columns.Remove("rate");
|
363
|
newSet.Tables[0].Columns.Remove("rate");
|
|
|
|
|
|
|
321
|
}
|
365
|
}
|
|
322
|
if (isExport)
|
366
|
if (isExport)
|
|
323
|
{
|
367
|
{
|
|
324
|
- string[] cols = new string[] { "单位名称", "受理量", "办结量", "及时量", "超时量", "催办量", "办结率", "延期率" };
|
|
|
|
|
|
368
|
+ string[] cols = new string[] { "单位名称", "受理量", "办结量", "及时量", "延期量", "催办量","郑州重办量","本地重办量" ,"办结率", "延期率" };
|
|
325
|
NPOIHelper npoi = new NPOIHelper();
|
369
|
NPOIHelper npoi = new NPOIHelper();
|
|
326
|
- if (npoi.ExportToExcel("处理效率统计报表", newSet.Tables[0], cols) == "")
|
|
|
|
|
|
370
|
+ if (npoi.ExportToExcel("处理效率统计报表", newSet1.Tables[0], cols) == "")
|
|
327
|
{
|
371
|
{
|
|
328
|
return Success("导出成功");
|
372
|
return Success("导出成功");
|
|
329
|
}
|
373
|
}
|
|
|
|
|
|
|
2530
|
|
2574
|
|
|
2531
|
///////////////条件重新写
|
2575
|
///////////////条件重新写
|
|
2532
|
//郑州转派件
|
2576
|
//郑州转派件
|
|
2533
|
- string Zzzpj = $"select count(*) as 转派件 from (select DISTINCT wo.F_OldWorkOrderId from T_Bus_WorkOrder wo where F_OldWorkOrderId!='' "+ where1 + ") b";
|
|
|
|
2534
|
- var Zzzpjcount = DbHelperSQL.Query(Zzzpj).Tables[0];
|
|
|
|
2535
|
- //郑州已回传件
|
|
|
|
|
|
2577
|
+ string Zzzpj = $"select count(*) as 转派件 from (select DISTINCT wo.F_OldWorkOrderId from T_Bus_WorkOrder wo where F_OldWorkOrderId!='' "+ where1 + ") b";
|
|
|
|
2578
|
+ var Zzzpjcount = DbHelperSQL.GetSingle(Zzzpj);
|
|
|
|
2579
|
+ //郑州已回传件
|
|
2536
|
string Zzyhc = $"select count(*) as 回传件 from (select DISTINCT wo.F_OldWorkOrderId from T_Bus_WorkOrder wo where F_OldWorkOrderId!='' and wo.F_WorkState = 9 " + where1 + ") b";
|
2580
|
string Zzyhc = $"select count(*) as 回传件 from (select DISTINCT wo.F_OldWorkOrderId from T_Bus_WorkOrder wo where F_OldWorkOrderId!='' and wo.F_WorkState = 9 " + where1 + ") b";
|
|
2537
|
- var Zzyhccount = DbHelperSQL.Query(Zzyhc).Tables[0];
|
|
|
|
|
|
2581
|
+ var Zzyhccount = DbHelperSQL.GetSingle(Zzyhc);
|
|
2538
|
var ob = new
|
2582
|
var ob = new
|
|
2539
|
{
|
2583
|
{
|
|
2540
|
Acceptance = Zzzpjcount,
|
2584
|
Acceptance = Zzzpjcount,
|
|
|
|
|
|
|
2626
|
paras.Add("@deptid", dept);
|
2670
|
paras.Add("@deptid", dept);
|
|
2627
|
paras.Add("@source", source);
|
2671
|
paras.Add("@source", source);
|
|
2628
|
var obj = DbHelperSQL.RunProcedure("P_DeptSatisfaction", paras, "DeptSatisfactionReport");
|
2672
|
var obj = DbHelperSQL.RunProcedure("P_DeptSatisfaction", paras, "DeptSatisfactionReport");
|
|
|
|
2673
|
+ obj.Tables[0].Columns.Remove("rate");
|
|
|
|
2674
|
+
|
|
2629
|
if (isExport)
|
2675
|
if (isExport)
|
|
2630
|
{
|
2676
|
{
|
|
2631
|
- string[] cols = new string[] { "单位名称", "处理总量", "满意数", "基本满意数", "不满意数", "满意率" };
|
|
|
|
|
|
2677
|
+ string[] cols = new string[] { "单位名称", "办结量", "满意数", "基本满意数", "不满意数", "满意率" };
|
|
2632
|
NPOIHelper npoi = new NPOIHelper();
|
2678
|
NPOIHelper npoi = new NPOIHelper();
|
|
2633
|
if (npoi.ExportToExcel("满意度报表", obj.Tables[0], cols) == "")
|
2679
|
if (npoi.ExportToExcel("满意度报表", obj.Tables[0], cols) == "")
|
|
2634
|
{
|
2680
|
{
|