1550076451 лет назад: 2
Родитель
Сommit
88e4a11234

+ 15 - 6
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WorkOrderReportController.cs

@@ -343,9 +343,9 @@ namespace CallCenterApi.Interface.Controllers.report
343 343
 
344 344
                         if (type > 0)
345 345
                         {
346
-                            timelyrate = (double)timelycount / (double)slcount;
347
-                            obj.Tables[0].Rows[i]["timely"] = timelyrate;
348
-                            obj.Tables[0].Rows[i]["timelyrate"] = timelyrate.ToString("0.00%");//及时率
346
+                          //  timelyrate = (double)timelycount / (double)slcount;
347
+                           // obj.Tables[0].Rows[i]["timely"] = timelyrate;
348
+                          //  obj.Tables[0].Rows[i]["timelyrate"] = timelyrate.ToString("0.00%");//及时率
349 349
 
350 350
                         }
351 351
                           
@@ -377,17 +377,26 @@ namespace CallCenterApi.Interface.Controllers.report
377 377
                         if (type > 0)
378 378
                         {
379 379
                             timelyrate = (double)timelycount / (double)slcount;
380
-                            obj.Tables[0].Rows[i]["timely"] = timelyrate;
381
-                            obj.Tables[0].Rows[i]["timelyrate"] = timelyrate.ToString("0.00%");//及时率
380
+                            dr["timely"] = timelyrate;
381
+                            dr["timelyrate"] = timelyrate.ToString("0.00%");//及时率
382
+                        }
383
+                    }
384
+                    else
385
+                    {
386
+                        if (type > 0)
387
+                        {
388
+                            dr["timely"] = 0;
382 389
                         }
383 390
                     }
391
+                   
384 392
                     exceldt.Rows.Add(dr);
385 393
                     #endregion
386 394
                 }
387 395
             
388 396
                 if (type >0)
389 397
                 {
390
-                    exceldt.DefaultView.Sort = "timely desc";
398
+                     exceldt.DefaultView.Sort = "timely desc";
399
+                    exceldt = exceldt.DefaultView.ToTable();
391 400
                     for (int i = 0; i < exceldt.Rows.Count; i++)
392 401
                     {
393 402
                         exceldt.Rows[i]["ranking"] = i + 1;