Commit 895b76e1 by 纪旭 韦

汇总接口返回值增加了id

parents 9507bf30 cadad92f
...@@ -41,6 +41,7 @@ public class GatherRequest ...@@ -41,6 +41,7 @@ public class GatherRequest
public class GatherTotalRequest public class GatherTotalRequest
{ {
public int ID { get; set; }
public string Department { get; set; } public string Department { get; set; }
public string Source { get; set; } public string Source { get; set; }
public decimal Fee { get; set; } public decimal Fee { get; set; }
......
...@@ -1332,8 +1332,9 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request) ...@@ -1332,8 +1332,9 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
var datas = exresultgatherRepository.GetEntities(exp); var datas = exresultgatherRepository.GetEntities(exp);
var result = datas.GroupBy(a => new { a.Department,a.Source}).Select(t => new var result = datas.GroupBy(a => new { a.AllotId,a.Department,a.Source}).Select(t => new
{ {
ID = t.Key.AllotId,
Department = t.Key.Department, Department = t.Key.Department,
Source = t.Key.Source.Split(' ')[1], Source = t.Key.Source.Split(' ')[1],
Fee = t.Sum(a=> a.Fee) Fee = t.Sum(a=> a.Fee)
...@@ -1346,6 +1347,7 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request) ...@@ -1346,6 +1347,7 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
{ {
GatherTotalRequest gatherTotalRequest = new GatherTotalRequest() GatherTotalRequest gatherTotalRequest = new GatherTotalRequest()
{ {
ID = item.ID,
Department = item.Department, Department = item.Department,
Source = item.Source, Source = item.Source,
Fee = item.Fee Fee = item.Fee
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment