新增统计功能
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"Env": [],
|
||||
"IIsConfig": {
|
||||
"SdkType": null,
|
||||
"WebSiteName": "",
|
||||
"LastEnvName": null,
|
||||
"EnvPairList": []
|
||||
},
|
||||
"WindowsServiveConfig": {
|
||||
"ServiceName": "",
|
||||
"SdkType": null,
|
||||
"LastEnvName": null,
|
||||
"EnvPairList": []
|
||||
},
|
||||
"LinuxServiveConfig": {
|
||||
"ServiceName": "",
|
||||
"EnvParam": "",
|
||||
"LastEnvName": null,
|
||||
"EnvPairList": []
|
||||
},
|
||||
"DockerConfig": {
|
||||
"Prot": "",
|
||||
"AspNetCoreEnv": "",
|
||||
"LastEnvName": null,
|
||||
"RemoveDaysFromPublished": "10",
|
||||
"WorkDir": "",
|
||||
"Volume": "",
|
||||
"Other": "",
|
||||
"EnvPairList": []
|
||||
},
|
||||
"DockerImageConfig": {
|
||||
"BaseHttpProxy": "",
|
||||
"BaseImage": "",
|
||||
"BaseImageCredential": {
|
||||
"UserName": "",
|
||||
"Password": ""
|
||||
},
|
||||
"TargetImage": "",
|
||||
"TargetHttpProxy": "",
|
||||
"TargetTags": [
|
||||
""
|
||||
],
|
||||
"TargetImageCredential": {
|
||||
"UserName": "",
|
||||
"Password": ""
|
||||
},
|
||||
"ImageFormat": "Docker",
|
||||
"Entrypoint": [
|
||||
""
|
||||
],
|
||||
"Cmd": [
|
||||
""
|
||||
],
|
||||
"IgnoreList": [],
|
||||
"SkipExistingImages": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
//
|
||||
// SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
// 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
// 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
// 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
|
||||
using MoYu.FriendlyException;
|
||||
using SimpleAdmin.Application.Services.Statistics;
|
||||
|
||||
namespace SimpleAdmin.Web.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 统计分析
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings("Application", Tag = "统计分析")]
|
||||
[Route("biz/weibingju/statistics")]
|
||||
[RolePermission]
|
||||
public class StatisticsController : IDynamicApiController
|
||||
{
|
||||
private readonly IStatisticsService _service;
|
||||
|
||||
public StatisticsController(IStatisticsService service)
|
||||
{
|
||||
_service = service;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取全量总览数据(不区分年份,含剩余药材库存价值)
|
||||
/// </summary>
|
||||
[HttpGet("overview")]
|
||||
[DisplayName("获取全量总览数据")]
|
||||
public async Task<dynamic> GetTotalOverview()
|
||||
{
|
||||
return await _service.GetTotalOverview();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取年度统计数据(含同比趋势)
|
||||
/// </summary>
|
||||
[HttpGet("yearly")]
|
||||
[DisplayName("获取年度统计数据")]
|
||||
public async Task<dynamic> GetYearlyStatistics([FromQuery] string year)
|
||||
{
|
||||
if (!int.TryParse(year, out int yearInt) || yearInt < 2000 || yearInt > 2100)
|
||||
throw Oops.Bah("年份参数不合法");
|
||||
|
||||
return await _service.GetYearlyStatistics(yearInt);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取月度明细数据(返回 12 个月,无数据月份自动补零)
|
||||
/// </summary>
|
||||
[HttpGet("monthly")]
|
||||
[DisplayName("获取月度明细数据")]
|
||||
public async Task<dynamic> GetMonthlyDetails([FromQuery] string year)
|
||||
{
|
||||
if (!int.TryParse(year, out int yearInt) || yearInt < 2000 || yearInt > 2100)
|
||||
throw Oops.Bah("年份参数不合法");
|
||||
|
||||
return await _service.GetMonthlyDetails(yearInt);
|
||||
}
|
||||
}
|
||||
@@ -420,6 +420,26 @@
|
||||
获取关系类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:SimpleAdmin.Web.Core.StatisticsController">
|
||||
<summary>
|
||||
统计分析
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:SimpleAdmin.Web.Core.StatisticsController.GetTotalOverview">
|
||||
<summary>
|
||||
获取全量总览数据(不区分年份,含剩余药材库存价值)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:SimpleAdmin.Web.Core.StatisticsController.GetYearlyStatistics(System.String)">
|
||||
<summary>
|
||||
获取年度统计数据(含同比趋势)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:SimpleAdmin.Web.Core.StatisticsController.GetMonthlyDetails(System.String)">
|
||||
<summary>
|
||||
获取月度明细数据(返回 12 个月,无数据月份自动补零)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:SimpleAdmin.Web.Core.AuthBController">
|
||||
<summary>
|
||||
B端登录控制器
|
||||
|
||||
Reference in New Issue
Block a user