|
|
|
|
|
|
27
|
/// <param name="sdate">开始时间</param>
|
27
|
/// <param name="sdate">开始时间</param>
|
|
28
|
/// <param name="edate">结束时间</param>
|
28
|
/// <param name="edate">结束时间</param>
|
|
29
|
/// <returns></returns>
|
29
|
/// <returns></returns>
|
|
30
|
- public ActionResult GetReport(string TaskID, string quesid, string countryid, string sdate, string edate)
|
|
|
|
|
|
30
|
+ public ActionResult GetReport(string TaskID, string quesid, string countryid,string villageid, string sdate, string edate)
|
|
31
|
{
|
31
|
{
|
|
32
|
#region 新建输出表
|
32
|
#region 新建输出表
|
|
33
|
DataTable dtnew = new DataTable();
|
33
|
DataTable dtnew = new DataTable();
|
|
|
|
|
|
|
46
|
string sqlans = " isnull(F_TaskID,'')='" + TaskID + "' ";
|
46
|
string sqlans = " isnull(F_TaskID,'')='" + TaskID + "' ";
|
|
47
|
if (!string.IsNullOrWhiteSpace(countryid))
|
47
|
if (!string.IsNullOrWhiteSpace(countryid))
|
|
48
|
sqlans += " and isnull(F_Expand1,'')='" + countryid + "' ";
|
48
|
sqlans += " and isnull(F_Expand1,'')='" + countryid + "' ";
|
|
|
|
49
|
+ if (!string.IsNullOrWhiteSpace(villageid))
|
|
|
|
50
|
+ sqlans += " and isnull(F_Expand2,'')='" + villageid + "' ";
|
|
49
|
if (!string.IsNullOrWhiteSpace(sdate))
|
51
|
if (!string.IsNullOrWhiteSpace(sdate))
|
|
50
|
sqlans += " and DATEDIFF(day,F_OptOn,'"+ sdate.Trim() + "')<=0";
|
52
|
sqlans += " and DATEDIFF(day,F_OptOn,'"+ sdate.Trim() + "')<=0";
|
|
51
|
if (!string.IsNullOrWhiteSpace(edate))
|
53
|
if (!string.IsNullOrWhiteSpace(edate))
|
|
|
|
|
|
|
100
|
}
|
102
|
}
|
|
101
|
|
103
|
|
|
102
|
#region 外呼任务报表导出Excel
|
104
|
#region 外呼任务报表导出Excel
|
|
103
|
- public ActionResult GetReportExpt(string TaskID, string quesid, string countryid, string sdate, string edate)
|
|
|
|
|
|
105
|
+ public ActionResult GetReportExpt(string TaskID, string quesid, string countryid, string villageid, string sdate, string edate)
|
|
104
|
{
|
106
|
{
|
|
105
|
#region 新建输出表
|
107
|
#region 新建输出表
|
|
106
|
DataTable dtnew = new DataTable();
|
108
|
DataTable dtnew = new DataTable();
|
|
|
|
|
|
|
119
|
string sqlans = " isnull(F_TaskID,'')='" + TaskID + "' ";
|
121
|
string sqlans = " isnull(F_TaskID,'')='" + TaskID + "' ";
|
|
120
|
if (!string.IsNullOrWhiteSpace(countryid))
|
122
|
if (!string.IsNullOrWhiteSpace(countryid))
|
|
121
|
sqlans += " and isnull(F_Expand1,'')='" + countryid + "' ";
|
123
|
sqlans += " and isnull(F_Expand1,'')='" + countryid + "' ";
|
|
|
|
124
|
+ if (!string.IsNullOrWhiteSpace(villageid))
|
|
|
|
125
|
+ sqlans += " and isnull(F_Expand2,'')='" + villageid + "' ";
|
|
122
|
if (!string.IsNullOrWhiteSpace(sdate))
|
126
|
if (!string.IsNullOrWhiteSpace(sdate))
|
|
123
|
sqlans += " and DATEDIFF(day,F_OptOn,'" + sdate.Trim() + "')<=0";
|
127
|
sqlans += " and DATEDIFF(day,F_OptOn,'" + sdate.Trim() + "')<=0";
|
|
124
|
if (!string.IsNullOrWhiteSpace(edate))
|
128
|
if (!string.IsNullOrWhiteSpace(edate))
|