Przeglądaj źródła

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

mengjie 7 lat temu
rodzic
commit
a54295f6c1

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

198
         #endregion
198
         #endregion
199
 
199
 
200
         #region  获取乡镇统计排名
200
         #region  获取乡镇统计排名
201
-        public ActionResult GetRank(string sdate, string edate)
201
+        public ActionResult GetRank(string sdate, string edate,string taskid)
202
         {
202
         {
203
             if (string.IsNullOrWhiteSpace(sdate))
203
             if (string.IsNullOrWhiteSpace(sdate))
204
             {
204
             {
208
             {
208
             {
209
                 edate = DateTime.Now.ToString("yyyy-MM-dd");
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
             DataTable dtnew = new DataTable();
216
             DataTable dtnew = new DataTable();
212
             dtnew.Columns.Add("xiangzhen", Type.GetType("System.String"));
217
             dtnew.Columns.Add("xiangzhen", Type.GetType("System.String"));
213
             dtnew.Columns.Add("zongshu", Type.GetType("System.Int32"));
218
             dtnew.Columns.Add("zongshu", Type.GetType("System.Int32"));
220
                     DataRow dr = dtnew.NewRow();
225
                     DataRow dr = dtnew.NewRow();
221
                     dr["xiangzhen"] = itemconf.F_Name;
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
                     //int totalnum = ansBLL.GetRecordCount(" DATEDIFF(day,F_OptOn,'" + sdate + "')<=0 and DATEDIFF(day,F_OptOn,'" + edate + "')>=0 and F_Answer='" + itemconf.F_Name + "' ");
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
                     leiji += totalnum;
231
                     leiji += totalnum;