xusc 5 months ago
parent
commit
8ac1fdcc5a
  1. 27
      src/aspnet-core/ICS.Application/Business/Service/报表管理/IcsReportAppService.cs

27
src/aspnet-core/ICS.Application/Business/Service/报表管理/IcsReportAppService.cs

@ -40,6 +40,11 @@ namespace ICS.Application.Business.Service
private readonly IExtensionAppService _extensionService;
private readonly IRepository<IcsServiceOrder, long> _serviceOrderRepository;
private readonly IRepository<SysEnumValue, long> _enumValueRepository;
private readonly IRepository<IcsProduct, long> _productRepository;
private readonly IRepository<IcsSystemFiled, long> _systemFiledRepository;
private readonly IRepository<IcsSystemModule, long> _systemModuleRepository;
#endregion
/// <summary>
@ -49,6 +54,9 @@ namespace ICS.Application.Business.Service
IConfiguration configuration
, IRepository<IcsServiceOrder, long> serviceOrderRepository
, IRepository<SysEnumValue, long> enumValueRepository
, IRepository<IcsProduct, long> productRepository
, IRepository<IcsSystemFiled, long> systemFiledRepository
, IRepository<IcsSystemModule, long> systemModuleRepository
, IExtensionAppService extService
)
{
@ -56,6 +64,9 @@ namespace ICS.Application.Business.Service
_serviceOrderRepository = serviceOrderRepository;
_enumValueRepository = enumValueRepository;
_extensionService = extService;
_productRepository = productRepository;
_systemFiledRepository = systemFiledRepository;
_systemModuleRepository = systemModuleRepository;
}
@ -1451,16 +1462,12 @@ order by a.ItemCode,a.RouteCode, a.OpSeq
from enumvalue in de.DefaultIfEmpty()
join e2 in _enumValueRepository.GetAll() on new { a.Urgency, EnumKey = "Urgency" } equals new { Urgency = e2.EnumValue, EnumKey = e2.EnumKey } into de2
from enumvalue2 in de2.DefaultIfEmpty()
join e3 in _enumValueRepository.GetAll() on new { a.ServiceField, EnumKey = "ServiceField" } equals new { ServiceField = e3.EnumValue, EnumKey = e3.EnumKey } into de3
join e3 in _productRepository.GetAll() on a.BusinessSystem equals e3.ProductCode into de3
from enumvalue3 in de3.DefaultIfEmpty()
join e4 in _enumValueRepository.GetAll() on new { a.ServiceModule, EnumKey = "ServiceModule" } equals new { ServiceModule = e4.EnumValue, EnumKey = e4.EnumKey } into de4
join e4 in _systemFiledRepository.GetAll() on a.ServiceField equals e4.FiledCode into de4
from enumvalue4 in de4.DefaultIfEmpty()
//join e5 in _enumValueRepository.GetAll() on new { a.SourceOfProblem, EnumKey = "SourceOfProblem" } equals new { SourceOfProblem = e5.EnumValue, EnumKey = e5.EnumKey } into de5
//from enumvalue5 in de5.DefaultIfEmpty()
join e6 in _enumValueRepository.GetAll() on new { a.BusinessSystem, EnumKey = "BusinessSystem" } equals new { BusinessSystem = e6.EnumValue, EnumKey = e6.EnumKey } into de6
join e6 in _systemModuleRepository.GetAll() on a.ServiceModule equals e6.ModuleCode into de6
from enumvalue6 in de6.DefaultIfEmpty()
//join e7 in _enumValueRepository.GetAll() on new { a.SystemVersion, EnumKey = "SystemVersion" } equals new { SystemVersion = e7.EnumValue, EnumKey = e7.EnumKey } into de7
//from enumvalue7 in de7.DefaultIfEmpty()
select new IcsServiceOrderListDto
{
Id = a.Id,
@ -1471,10 +1478,10 @@ order by a.ItemCode,a.RouteCode, a.OpSeq
QuestionDescribe = a.QuestionDescribe,
SolutionWay = a.SolutionWay,
EventClass = enumvalue.EnumText,
ServiceField = enumvalue3.EnumText,
ServiceModule = enumvalue4.EnumText,
ServiceField = enumvalue4.FiledName,
ServiceModule = enumvalue6.ModuleName,
Urgency = enumvalue2.EnumText,
BusinessSystem = enumvalue6.EnumText,
BusinessSystem = enumvalue3.ProductName,
CustomerCode = a.CustomerCode,
CustomerName = a.CustomerName,
CreationTime = a.CreationTime,

Loading…
Cancel
Save