Bladeren bron

调整bug

mengjie 6 jaren geleden
bovenliggende
commit
6b47ca5090
1 gewijzigde bestanden met toevoegingen van 25 en 10 verwijderingen
  1. 25 10
      CallCenterApi.Interface/Controllers/County/CountyBusinessController.cs

+ 25 - 10
CallCenterApi.Interface/Controllers/County/CountyBusinessController.cs

@@ -15,7 +15,7 @@ using Newtonsoft.Json.Linq;
15 15
 
16 16
 namespace CallCenterApi.Interface.Controllers.County
17 17
 {
18
-    [Authority]
18
+    //[Authority]
19 19
     public class CountyBusinessController : BaseController
20 20
     {
21 21
         // GET: CountyBusiness
@@ -228,6 +228,7 @@ namespace CallCenterApi.Interface.Controllers.County
228 228
         /// <returns></returns>
229 229
         public ActionResult GetAreaAssessmentNew(string branchcode, DateTime? start, DateTime? end, int isdc = 0)
230 230
         {
231
+            start = DateTime.Now.AddDays(-100);
231 232
             
232 233
             #region 定义新表
233 234
             DataTable dtnew = new DataTable();
@@ -267,7 +268,7 @@ namespace CallCenterApi.Interface.Controllers.County
267 268
             ArrayList result = new ArrayList();
268 269
             var list = new BLL.T_Branch_List().GetModelList(sqlwhere);
269 270
             string controllername = RouteData.Values["controller"].ToString();
270
-            string actionname = RouteData.Values["action"].ToString();
271
+            string actionname = "GetAreaAssessment";//RouteData.Values["action"].ToString();
271 272
             foreach (var l in list)
272 273
             {
273 274
                 if (!string.IsNullOrEmpty(l.F_Sign) && !string.IsNullOrEmpty(l.F_Url))
@@ -302,19 +303,33 @@ namespace CallCenterApi.Interface.Controllers.County
302 303
                         }
303 304
                         else
304 305
                         {
306
+                            int isbh = 0;
305 307
                             //前部分相加
306 308
                             DataTable dt1 = HeadToDataTable(jo0["data"].ToString(), "Item");
307
-                            for (int i = 0; i < dtnew .Columns .Count ; i++)
309
+                            for (int m = 0; m < dt1 .Rows  .Count ; m++)
308 310
                             {
309
-                                for (int j = 1; j < 11; j++)
311
+                                for (int i = 0; i < dtnew.Rows.Count; i++)
310 312
                                 {
311
-                                    string cols = dtnew.Columns[j].ColumnName;
312
-                                    decimal t = decimal.Parse(dtnew.Rows[i][cols].ToString()) + decimal.Parse(dt1.Rows[i][cols].ToString());
313
-
314
-                                    dtnew.Rows[i][cols] = t;
315
-
313
+                                    if (dtnew.Rows[i]["areaname"].ToString() == dt1.Rows[m]["areaname"].ToString())
314
+                                    {
315
+                                        for (int j = 1; j < 11; j++)
316
+                                        {
317
+                                            string cols = dtnew.Columns[j].ColumnName;
318
+                                            decimal t = decimal.Parse(dtnew.Rows[i][cols].ToString()) + decimal.Parse(dt1.Rows[m][cols].ToString());
319
+
320
+                                            dtnew.Rows[i][cols] = t;
321
+                                            isbh = 1;
322
+                                        }
323
+                                        //totalcount += Int64.Parse(dtnew.Rows[i]["TotalCount"].ToString());
324
+                                    }
325
+                                }
326
+                                if (isbh == 0)
327
+                                {
328
+                                    
329
+                                    DataRow dr = dt1.Rows[m];
330
+                                    dtnew.ImportRow(dr);
331
+                                    
316 332
                                 }
317
-                                //totalcount += Int64.Parse(dtnew.Rows[i]["TotalCount"].ToString());
318 333
                             }
319 334
 
320 335
                         }