|
|
@@ -231,10 +231,11 @@ namespace Learun.Application.WebApi.Modules.Echarts |
|
|
|
public Response WfUseFive(dynamic _) |
|
|
|
{ |
|
|
|
var data = nWFSchemeIBLL.GetUseCount().OrderByDescending(x => x.Value).Take(5); |
|
|
|
var value = data.Select(x => x.Value).ToList(); |
|
|
|
var nm = new List<string> { "No.1", "No.2", "No.3", "No.4", "No.5" }; |
|
|
|
//var value = data.Select(x => x.Value).ToList(); |
|
|
|
//var nm = new List<string> { "No.1", "No.2", "No.3", "No.4", "No.5" }; |
|
|
|
//var res = new { categories = nm, series = new List<object> { new { name = "", data = value } } }; |
|
|
|
|
|
|
|
var res = new { categories = nm, series = new List<object> { new { name = "", data = value } } }; |
|
|
|
var res = data.Select(x => new { name = x.Key, value = x.Value }).ToList(); |
|
|
|
return Res(res); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
@@ -245,17 +246,18 @@ namespace Learun.Application.WebApi.Modules.Echarts |
|
|
|
public Response WfUseSix(dynamic _) |
|
|
|
{ |
|
|
|
var data = nWFSchemeIBLL.GetUseCount().OrderByDescending(x => x.Value).Skip(5).Take(5); |
|
|
|
var value = data.Select(x => x.Value).ToList(); |
|
|
|
if(value.Count!=5) |
|
|
|
{ |
|
|
|
for (int i = 0; i < 5-value.Count; i++) |
|
|
|
{ |
|
|
|
value.Add(0); |
|
|
|
} |
|
|
|
} |
|
|
|
var nm = new List<string> { "No.5", "No.7", "No.8", "No.9", "No.10" }; |
|
|
|
|
|
|
|
var res = new { categories = nm, series = new List<object> { new { name = "", data = value } } }; |
|
|
|
//var value = data.Select(x => x.Value).ToList(); |
|
|
|
//if(value.Count!=5) |
|
|
|
//{ |
|
|
|
// for (int i = 0; i < 5-value.Count; i++) |
|
|
|
// { |
|
|
|
// value.Add(0); |
|
|
|
// } |
|
|
|
//} |
|
|
|
//var nm = new List<string> { "No.5", "No.7", "No.8", "No.9", "No.10" }; |
|
|
|
//var res = new { categories = nm, series = new List<object> { new { name = "", data = value } } }; |
|
|
|
|
|
|
|
var res = data.Select(x => new { name = x.Key, value = x.Value }).ToList(); |
|
|
|
return Res(res); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
@@ -348,7 +350,7 @@ namespace Learun.Application.WebApi.Modules.Echarts |
|
|
|
data.Add(dic[i]); |
|
|
|
} |
|
|
|
|
|
|
|
var res = new { categories = cate, series = new List<object> { new { name = "云盘", data = data } } }; |
|
|
|
var res = new { categories = cate, series = new List<object> { new { name = "申报经费", data = data } } }; |
|
|
|
return Res(res); |
|
|
|
} |
|
|
|
|
|
|
@@ -376,7 +378,8 @@ namespace Learun.Application.WebApi.Modules.Echarts |
|
|
|
public Response StuDeptSum(dynamic _) |
|
|
|
{ |
|
|
|
var dic = stuInfoBasicIBLL.GetDeptCount(); |
|
|
|
var res = dic.Select(x => new { name = x.Key, value = x.Value, url = string.Empty }); |
|
|
|
//var res = dic.Select(x => new { name = x.Key, value = x.Value, url = string.Empty }); |
|
|
|
var res = new { categories = dic.Keys.ToList(), series = new List<object> { new { name = "学生系部统计", data = dic.Values.ToList() } } }; |
|
|
|
return Res(res); |
|
|
|
} |
|
|
|
} |