加全年总数
This commit is contained in:
parent
9779619812
commit
d0c29666ad
|
@ -171,6 +171,13 @@ namespace CompetitionAPI.Controllers.api
|
||||||
dic[a.First().INSTRG_DATE.Value.Month]++;
|
dic[a.First().INSTRG_DATE.Value.Month]++;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//总数
|
||||||
|
decimal yearNum = 0;
|
||||||
|
foreach (var item in dic)
|
||||||
|
{
|
||||||
|
yearNum += item.Value;
|
||||||
|
}
|
||||||
|
dic.Add(13, yearNum);
|
||||||
return Json(Tool.GetJsonWithCode(APICode.Success, dic));
|
return Json(Tool.GetJsonWithCode(APICode.Success, dic));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,7 +210,14 @@ namespace CompetitionAPI.Controllers.api
|
||||||
dic[a.INSTRG_DATE.Value.Month] += a.BILL_GROSS_WT.Value;
|
dic[a.INSTRG_DATE.Value.Month] += a.BILL_GROSS_WT.Value;
|
||||||
});
|
});
|
||||||
|
|
||||||
var data = new { dic };
|
//总数
|
||||||
|
decimal yearNum = 0;
|
||||||
|
foreach (var item in dic)
|
||||||
|
{
|
||||||
|
yearNum += item.Value;
|
||||||
|
}
|
||||||
|
dic.Add(13, yearNum);
|
||||||
|
|
||||||
return Json(Tool.GetJsonWithCode(APICode.Success, dic));
|
return Json(Tool.GetJsonWithCode(APICode.Success, dic));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue