|
|
@@ -33,7 +33,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
33
|
33
|
ActionResult res = NoToken("未知错误,请重新登录");
|
|
34
|
34
|
|
|
35
|
35
|
DataTable dtNew = new DataTable();
|
|
36
|
|
- dtNew = getData(stime, endtime);
|
|
|
36
|
+ dtNew = getData(stime, endtime,0);
|
|
37
|
37
|
res = Success("获取坐席满意度评价情况报表数据成功", dtNew);
|
|
38
|
38
|
return res;
|
|
39
|
39
|
}
|
|
|
@@ -45,7 +45,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
45
|
45
|
if (Request.IsAuthenticated)
|
|
46
|
46
|
{
|
|
47
|
47
|
NPOIHelper npoi = new NPOIHelper();
|
|
48
|
|
- DataTable dt = getData(stime, endtime);
|
|
|
48
|
+ DataTable dt = getData(stime, endtime,1);
|
|
49
|
49
|
if (npoi.ExportToExcel("坐席满意度评价情况", dt) == "")
|
|
50
|
50
|
{
|
|
51
|
51
|
return Success("导出成功");
|
|
|
@@ -58,7 +58,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
58
|
58
|
return res;
|
|
59
|
59
|
}
|
|
60
|
60
|
|
|
61
|
|
- private DataTable getData(string stime, string endtime)
|
|
|
61
|
+ private DataTable getData(string stime, string endtime ,int isdc)
|
|
62
|
62
|
{
|
|
63
|
63
|
DataTable dtNew = new DataTable();
|
|
64
|
64
|
#region
|
|
|
@@ -109,7 +109,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
109
|
109
|
//1非常满意、2基本满意、3不满意、4未评价
|
|
110
|
110
|
for (int j = 1; j <= 4; j++)
|
|
111
|
111
|
{
|
|
112
|
|
- string[] cp = getMYDCountAndPercent(dt, j);
|
|
|
112
|
+ string[] cp = getMYDCountAndPercent(dt, j,isdc);
|
|
113
|
113
|
bodyitem.AddRange(cp);
|
|
114
|
114
|
}
|
|
115
|
115
|
if (body.ContainsKey(UNDN[1]))
|
|
|
@@ -172,7 +172,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
172
|
172
|
/// <param name="dt"></param>
|
|
173
|
173
|
/// <param name="type"></param>
|
|
174
|
174
|
/// <returns></returns>
|
|
175
|
|
- private string[] getMYDCountAndPercent(DataTable dt, int type)
|
|
|
175
|
+ private string[] getMYDCountAndPercent(DataTable dt, int type,int isdc)
|
|
176
|
176
|
{
|
|
177
|
177
|
int allcount = dt.Rows.Count;
|
|
178
|
178
|
int typecount = 0;
|
|
|
@@ -180,7 +180,14 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
180
|
180
|
else typecount = dt.Select("MYD=" + type).Count();
|
|
181
|
181
|
string percent = "0.00";
|
|
182
|
182
|
if (allcount > 0) percent = (typecount * 1.0 / allcount).ToString("0.00");
|
|
183
|
|
- return new string[] { typecount.ToString(), percent };
|
|
|
183
|
+ if (isdc == 1)
|
|
|
184
|
+ {
|
|
|
185
|
+ return new string[] { typecount.ToString(), percent+"%" };
|
|
|
186
|
+ }
|
|
|
187
|
+ else
|
|
|
188
|
+ {
|
|
|
189
|
+ return new string[] { typecount.ToString(), percent };
|
|
|
190
|
+ }
|
|
184
|
191
|
}
|
|
185
|
192
|
}
|
|
186
|
193
|
}
|