Explorar el Código

大屏问卷数量统计添加时间段内总量

mengjie %!s(int64=5) %!d(string=hace) años
padre
commit
4ef0155f48

+ 14 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/InfoController.cs

@@ -2926,7 +2926,7 @@ namespace CallCenterApi.Interface.Controllers
2926 2926
             //从数据字典表中获取乡镇信息(JBDW)
2927 2927
             var dsc = dvItemBLL.GetModelList(" F_DictionaryFlag='XZQY'");
2928 2928
 
2929
-
2929
+            int totalnum = 0;
2930 2930
             if (dsc.Count > 0)
2931 2931
             {
2932 2932
                 foreach (var iconf in dsc)
@@ -2937,12 +2937,25 @@ namespace CallCenterApi.Interface.Controllers
2937 2937
                     if (dta.Rows.Count > 0)
2938 2938
                     {
2939 2939
                         dtnew.Rows[cou][1] = dta.Rows[0][0];
2940
+                        if (dta.Rows[0][0] != null && dta.Rows[0][0].ToString() != "")
2941
+                        {
2942
+                            totalnum += Convert.ToInt32(dta.Rows[0][0]);
2943
+                        }
2940 2944
                     }
2941 2945
                     cou++;
2942 2946
                 }
2943 2947
             }
2948
+
2949
+            
2950
+
2944 2951
             dtnew.DefaultView.Sort = "数量 DESC";
2945 2952
             dtnew = dtnew.DefaultView.ToTable();
2953
+
2954
+            #region 添加时间段总量
2955
+            dtnew.Rows.Add();
2956
+            dtnew.Rows[dtnew.Rows.Count - 1][0] = "总量";
2957
+            dtnew.Rows[dtnew.Rows.Count - 1][1] = totalnum;
2958
+            #endregion
2946 2959
             return Success("获取调查问卷统计数据成功", dtnew);
2947 2960
             #endregion
2948 2961