duhongyu лет назад: 5
Родитель
Сommit
737840dfbb

+ 28 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/callout/CallOutPlanController.cs

@@ -954,7 +954,35 @@ namespace CallCenterApi.Interface.Controllers.callout
954 954
             };
955 955
             return Content(obj.ToJson());
956 956
         }
957
+        public ActionResult GetQuestionnaire(
958
+            int  quesid=0,int township=0,string starttime="" ,string endtime="",bool  isExport=false )
959
+        {
960
+            if (starttime == "")
961
+                starttime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ToString("yyyy-MM-dd");
962
+            if (endtime == "")
963
+                endtime = DateTime.Now.ToString("yyyy-MM-dd");
964
+
965
+            Dictionary<string, string> paras = new Dictionary<string, string>();
966
+            paras.Add("@sdate", starttime);
967
+            paras.Add("@edate", endtime);
968
+            paras.Add("@quesid", quesid.ToString());
969
+            paras.Add("@township", township.ToString ());
970
+            var obj = DbHelperSQL.RunProcedure("P_Questionnaire", paras, "Questionnaire");
971
+            if (isExport)
972
+            {
973
+                var cols = new string[] { "题目", "答案", "数量", "占比"};
974
+              
975
+                new NPOIHelper().ExportToExcel("问卷调查", obj.Tables[0], cols);
976
+                return Success("导出excel");
977
+            }
978
+            return Success("成功", obj);
979
+
980
+
957 981
 
982
+
983
+
984
+
985
+        }
958 986
         //获取任务结果详情
959 987
         public ActionResult GetTaskTelInfo(int id = 0)
960 988
         {