Browse Source

流程使用排名修改

应县
北京泉江 9 months ago
parent
commit
36f768b242
1 changed files with 19 additions and 16 deletions
  1. +19
    -16
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Echarts/EchartsApi.cs

+ 19
- 16
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Echarts/EchartsApi.cs View File

@@ -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);
}
}

Loading…
Cancel
Save