Просмотр исходного кода

获取乡镇排名报表添加任务列表查询条件

mengjie лет назад: 7
Родитель
Сommit
a54295f6c1

+ 7 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/CallOutReportController.cs

@@ -198,7 +198,7 @@ namespace CallCenterApi.Interface.Controllers.report
198 198
         #endregion
199 199
 
200 200
         #region  获取乡镇统计排名
201
-        public ActionResult GetRank(string sdate, string edate)
201
+        public ActionResult GetRank(string sdate, string edate,string taskid)
202 202
         {
203 203
             if (string.IsNullOrWhiteSpace(sdate))
204 204
             {
@@ -208,6 +208,11 @@ namespace CallCenterApi.Interface.Controllers.report
208 208
             {
209 209
                 edate = DateTime.Now.ToString("yyyy-MM-dd");
210 210
             }
211
+            string strand = "";
212
+            if (!string.IsNullOrWhiteSpace(taskid))
213
+            {
214
+                strand = "and F_TaskId='" + taskid + "'";
215
+            }
211 216
             DataTable dtnew = new DataTable();
212 217
             dtnew.Columns.Add("xiangzhen", Type.GetType("System.String"));
213 218
             dtnew.Columns.Add("zongshu", Type.GetType("System.Int32"));
@@ -220,7 +225,7 @@ namespace CallCenterApi.Interface.Controllers.report
220 225
                     DataRow dr = dtnew.NewRow();
221 226
                     dr["xiangzhen"] = itemconf.F_Name;
222 227
                     //根据乡镇获取总数
223
-                    int totalnum= otnBLL.GetRecordCount(" DATEDIFF(day,ExpandDatField1,'" + sdate + "')<=0 and DATEDIFF(day,ExpandDatField1,'" + edate + "')>=0 and ExpandIntField1='" + itemconf.F_DictionaryValueId+"' ");
228
+                    int totalnum= otnBLL.GetRecordCount(" DATEDIFF(day,ExpandDatField1,'" + sdate + "')<=0 and DATEDIFF(day,ExpandDatField1,'" + edate + "')>=0 and ExpandIntField1='" + itemconf.F_DictionaryValueId+ "' "+strand );
224 229
                     //int totalnum = ansBLL.GetRecordCount(" DATEDIFF(day,F_OptOn,'" + sdate + "')<=0 and DATEDIFF(day,F_OptOn,'" + edate + "')>=0 and F_Answer='" + itemconf.F_Name + "' ");
225 230
 
226 231
                     leiji += totalnum;