This commit is contained in:
2025-09-02 14:52:56 +08:00
parent c4d6c52196
commit ae49652868
11 changed files with 415 additions and 36 deletions

View File

@@ -1,7 +1,9 @@
using MyCode.Project.Domain.Message.Act.Common;
using MyCode.Project.Domain.Message.Act.AdminReport.PrdReport;
using MyCode.Project.Domain.Message.Act.Common;
using MyCode.Project.Domain.Message.Response.LxmZHMDReport;
using MyCode.Project.Infrastructure.Common;
using MyCode.Project.Infrastructure.JackYun;
using System.Collections.Generic;
namespace MyCode.Project.Services
{
@@ -27,5 +29,22 @@ namespace MyCode.Project.Services
/// <param name="search"></param>
/// <returns></returns>
PageResult<PrdMOExecuteDetailRpt> GetMoExecuteSumRespData(PagedSearch search);
/// <summary>
/// 获取报表头
/// </summary>
/// <param name="yearAndMonth"></param>
/// <returns></returns>
PrdReportHead GetMoDataChartHeadByYearAndMonth(YearAndMonth yearAndMonth);
/// <summary>
/// 获取看板折现图
/// </summary>
/// <param name="yearAndMonth"></param>
/// <returns></returns>
List<PrdReportHead> GetMoDataChartByYearAndMonth(YearAndMonth yearAndMonth);
List<MaterialAndQty> GetPrdInStockGroupByMaterial(YearAndMonth yearAndMonth);
List<MaterialAndQty> GetPrdMoGroupByMaterial(YearAndMonth yearAndMonth);
List<MaterialAndQty> GetInventoryGroupByMaterial();
}
}

View File

@@ -1,4 +1,5 @@
using MyCode.Project.Domain.Message.Act.Common;
using MyCode.Project.Domain.Message.Act.AdminReport.PrdReport;
using MyCode.Project.Domain.Message.Act.Common;
using MyCode.Project.Domain.Message.Request.JackYun;
using MyCode.Project.Domain.Message.Request.K3Cloud;
using MyCode.Project.Domain.Message.Response.K3Cloud;
@@ -115,5 +116,56 @@ namespace MyCode.Project.Services.Implementation
}
/// <summary>
/// 获取报表头
/// </summary>
/// <param name="yearAndMonth"></param>
/// <returns></returns>
public PrdReportHead GetMoDataChartHeadByYearAndMonth(YearAndMonth yearAndMonth)
{
return _MOOrdersRepository.GetMoDataChartHeadByYearAndMonth(yearAndMonth);
}
/// <summary>
/// 获取报表折线图,获取往期12个月的数据
/// </summary>
/// <param name="yearAndMonth"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public List<PrdReportHead> GetMoDataChartByYearAndMonth(YearAndMonth yearAndMonth)
{
List<PrdReportHead> result = new List<PrdReportHead>();
var datetime = new DateTime(yearAndMonth.Year, yearAndMonth.Month, 1);
for (int i = 0; i < 12; i++)
{
var datetimeTemp = datetime.AddMonths(-i);
YearAndMonth yearAndMonthTemp = new YearAndMonth()
{
Year = datetimeTemp.Year,
Month = datetimeTemp.Month,
};
result.Add(_MOOrdersRepository.GetMoDataChartHeadByYearAndMonth(yearAndMonth));
}
return result;
}
public List<MaterialAndQty> GetPrdInStockGroupByMaterial(YearAndMonth yearAndMonth)
{
return _MOOrdersRepository.GetPrdInStockGroupByMaterial(yearAndMonth);
}
public List<MaterialAndQty> GetPrdMoGroupByMaterial(YearAndMonth yearAndMonth)
{
return _MOOrdersRepository.GetPrdMoGroupByMaterial(yearAndMonth);
}
public List<MaterialAndQty> GetInventoryGroupByMaterial()
{
return _MOOrdersRepository.GetInventoryGroupByMaterial();
}
}
}