ReportViewer ve ReportDesigner
This commit is contained in:
parent
c83611c178
commit
222208471e
45 changed files with 132 additions and 797 deletions
|
|
@ -20,10 +20,6 @@ COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Application.Contracts/Erp.
|
||||||
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain/Erp.SqlQueryManager.Domain.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain/"
|
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain/Erp.SqlQueryManager.Domain.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain/"
|
||||||
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain.Shared/Erp.SqlQueryManager.Domain.Shared.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain.Shared/"
|
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain.Shared/Erp.SqlQueryManager.Domain.Shared.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain.Shared/"
|
||||||
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.EntityFrameworkCore/Erp.SqlQueryManager.EntityFrameworkCore.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.EntityFrameworkCore/"
|
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.EntityFrameworkCore/Erp.SqlQueryManager.EntityFrameworkCore.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.EntityFrameworkCore/"
|
||||||
COPY "modules/Erp.Reports/Erp.Reports.Application.Contracts/Erp.Reports.Application.Contracts.csproj" "modules/Erp.Reports/Erp.Reports.Application.Contracts/"
|
|
||||||
COPY "modules/Erp.Reports/Erp.Reports.Domain/Erp.Reports.Domain.csproj" "modules/Erp.Reports/Erp.Reports.Domain/"
|
|
||||||
COPY "modules/Erp.Reports/Erp.Reports.Domain.Shared/Erp.Reports.Domain.Shared.csproj" "modules/Erp.Reports/Erp.Reports.Domain.Shared/"
|
|
||||||
COPY "modules/Erp.Reports/Erp.Reports.EntityFrameworkCore/Erp.Reports.EntityFrameworkCore.csproj" "modules/Erp.Reports/Erp.Reports.EntityFrameworkCore/"
|
|
||||||
COPY "src/Erp.Platform.Application.Contracts/Erp.Platform.Application.Contracts.csproj" "src/Erp.Platform.Application.Contracts/"
|
COPY "src/Erp.Platform.Application.Contracts/Erp.Platform.Application.Contracts.csproj" "src/Erp.Platform.Application.Contracts/"
|
||||||
COPY "src/Erp.Platform.DbMigrator/Erp.Platform.DbMigrator.csproj" "src/Erp.Platform.DbMigrator/"
|
COPY "src/Erp.Platform.DbMigrator/Erp.Platform.DbMigrator.csproj" "src/Erp.Platform.DbMigrator/"
|
||||||
COPY "src/Erp.Platform.Domain/Erp.Platform.Domain.csproj" "src/Erp.Platform.Domain/"
|
COPY "src/Erp.Platform.Domain/Erp.Platform.Domain.csproj" "src/Erp.Platform.Domain/"
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,6 @@ COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Application.Contracts/Erp.
|
||||||
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain/Erp.SqlQueryManager.Domain.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain/"
|
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain/Erp.SqlQueryManager.Domain.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain/"
|
||||||
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain.Shared/Erp.SqlQueryManager.Domain.Shared.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain.Shared/"
|
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain.Shared/Erp.SqlQueryManager.Domain.Shared.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain.Shared/"
|
||||||
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.EntityFrameworkCore/Erp.SqlQueryManager.EntityFrameworkCore.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.EntityFrameworkCore/"
|
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.EntityFrameworkCore/Erp.SqlQueryManager.EntityFrameworkCore.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.EntityFrameworkCore/"
|
||||||
COPY "modules/Erp.Reports/Erp.Reports.Application/Erp.Reports.Application.csproj" "modules/Erp.Reports/Erp.Reports.Application/"
|
|
||||||
COPY "modules/Erp.Reports/Erp.Reports.Application.Contracts/Erp.Reports.Application.Contracts.csproj" "modules/Erp.Reports/Erp.Reports.Application.Contracts/"
|
|
||||||
COPY "modules/Erp.Reports/Erp.Reports.Domain/Erp.Reports.Domain.csproj" "modules/Erp.Reports/Erp.Reports.Domain/"
|
|
||||||
COPY "modules/Erp.Reports/Erp.Reports.Domain.Shared/Erp.Reports.Domain.Shared.csproj" "modules/Erp.Reports/Erp.Reports.Domain.Shared/"
|
|
||||||
COPY "modules/Erp.Reports/Erp.Reports.EntityFrameworkCore/Erp.Reports.EntityFrameworkCore.csproj" "modules/Erp.Reports/Erp.Reports.EntityFrameworkCore/"
|
|
||||||
COPY "src/Erp.Platform.Application/Erp.Platform.Application.csproj" "src/Erp.Platform.Application/"
|
COPY "src/Erp.Platform.Application/Erp.Platform.Application.csproj" "src/Erp.Platform.Application/"
|
||||||
COPY "src/Erp.Platform.Application.Contracts/Erp.Platform.Application.Contracts.csproj" "src/Erp.Platform.Application.Contracts/"
|
COPY "src/Erp.Platform.Application.Contracts/Erp.Platform.Application.Contracts.csproj" "src/Erp.Platform.Application.Contracts/"
|
||||||
COPY "src/Erp.Platform.Domain/Erp.Platform.Domain.csproj" "src/Erp.Platform.Domain/"
|
COPY "src/Erp.Platform.Domain/Erp.Platform.Domain.csproj" "src/Erp.Platform.Domain/"
|
||||||
|
|
|
||||||
|
|
@ -92,18 +92,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Erp.SqlQueryManager.Applica
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Erp.SqlQueryManager.EntityFrameworkCore", "modules\Erp.SqlQueryManager\Erp.SqlQueryManager.EntityFrameworkCore\Erp.SqlQueryManager.EntityFrameworkCore.csproj", "{1DA666D8-DBFE-40F7-8EBF-95CC892E4EB6}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Erp.SqlQueryManager.EntityFrameworkCore", "modules\Erp.SqlQueryManager\Erp.SqlQueryManager.EntityFrameworkCore\Erp.SqlQueryManager.EntityFrameworkCore.csproj", "{1DA666D8-DBFE-40F7-8EBF-95CC892E4EB6}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Erp.Reports", "Erp.Reports", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Erp.Reports.Application", "modules\Erp.Reports\Erp.Reports.Application\Erp.Reports.Application.csproj", "{3E1C9BC6-90C2-20F1-567F-2BA043D81721}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Erp.Reports.Application.Contracts", "modules\Erp.Reports\Erp.Reports.Application.Contracts\Erp.Reports.Application.Contracts.csproj", "{6E1A7691-CD09-860C-C6B3-86FDFDD3E372}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Erp.Reports.Domain", "modules\Erp.Reports\Erp.Reports.Domain\Erp.Reports.Domain.csproj", "{0924ACE7-6A32-F683-9F4D-A15B07D14A5E}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Erp.Reports.Domain.Shared", "modules\Erp.Reports\Erp.Reports.Domain.Shared\Erp.Reports.Domain.Shared.csproj", "{E65E10EE-41CC-B0E2-1004-E40D0CD26011}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Erp.Reports.EntityFrameworkCore", "modules\Erp.Reports\Erp.Reports.EntityFrameworkCore\Erp.Reports.EntityFrameworkCore.csproj", "{02E91CDA-E54C-9D5C-76AB-B07BE6D3E7FF}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
|
@ -242,26 +230,6 @@ Global
|
||||||
{1DA666D8-DBFE-40F7-8EBF-95CC892E4EB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{1DA666D8-DBFE-40F7-8EBF-95CC892E4EB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{1DA666D8-DBFE-40F7-8EBF-95CC892E4EB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{1DA666D8-DBFE-40F7-8EBF-95CC892E4EB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{1DA666D8-DBFE-40F7-8EBF-95CC892E4EB6}.Release|Any CPU.Build.0 = Release|Any CPU
|
{1DA666D8-DBFE-40F7-8EBF-95CC892E4EB6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{3E1C9BC6-90C2-20F1-567F-2BA043D81721}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{3E1C9BC6-90C2-20F1-567F-2BA043D81721}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{3E1C9BC6-90C2-20F1-567F-2BA043D81721}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{3E1C9BC6-90C2-20F1-567F-2BA043D81721}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{6E1A7691-CD09-860C-C6B3-86FDFDD3E372}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{6E1A7691-CD09-860C-C6B3-86FDFDD3E372}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{6E1A7691-CD09-860C-C6B3-86FDFDD3E372}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{6E1A7691-CD09-860C-C6B3-86FDFDD3E372}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{0924ACE7-6A32-F683-9F4D-A15B07D14A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{0924ACE7-6A32-F683-9F4D-A15B07D14A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{0924ACE7-6A32-F683-9F4D-A15B07D14A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{0924ACE7-6A32-F683-9F4D-A15B07D14A5E}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{E65E10EE-41CC-B0E2-1004-E40D0CD26011}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{E65E10EE-41CC-B0E2-1004-E40D0CD26011}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{E65E10EE-41CC-B0E2-1004-E40D0CD26011}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{E65E10EE-41CC-B0E2-1004-E40D0CD26011}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{02E91CDA-E54C-9D5C-76AB-B07BE6D3E7FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{02E91CDA-E54C-9D5C-76AB-B07BE6D3E7FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{02E91CDA-E54C-9D5C-76AB-B07BE6D3E7FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{02E91CDA-E54C-9D5C-76AB-B07BE6D3E7FF}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
@ -306,12 +274,6 @@ Global
|
||||||
{B45A3E8B-286B-4A74-9602-FC192ACEE8C4} = {2889482E-64CA-4A25-91D8-5B963D83681B}
|
{B45A3E8B-286B-4A74-9602-FC192ACEE8C4} = {2889482E-64CA-4A25-91D8-5B963D83681B}
|
||||||
{ED9C639A-A706-4ECB-9638-A15B3681BDEC} = {2889482E-64CA-4A25-91D8-5B963D83681B}
|
{ED9C639A-A706-4ECB-9638-A15B3681BDEC} = {2889482E-64CA-4A25-91D8-5B963D83681B}
|
||||||
{1DA666D8-DBFE-40F7-8EBF-95CC892E4EB6} = {2889482E-64CA-4A25-91D8-5B963D83681B}
|
{1DA666D8-DBFE-40F7-8EBF-95CC892E4EB6} = {2889482E-64CA-4A25-91D8-5B963D83681B}
|
||||||
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {03E1C8DA-035E-4882-AF81-F392139FCF38}
|
|
||||||
{3E1C9BC6-90C2-20F1-567F-2BA043D81721} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
|
||||||
{6E1A7691-CD09-860C-C6B3-86FDFDD3E372} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
|
||||||
{0924ACE7-6A32-F683-9F4D-A15B07D14A5E} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
|
||||||
{E65E10EE-41CC-B0E2-1004-E40D0CD26011} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
|
||||||
{02E91CDA-E54C-9D5C-76AB-B07BE6D3E7FF} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
|
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<RootNamespace>Erp.Reports</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="9.0.2" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Erp.Reports.Domain.Shared\Erp.Reports.Domain.Shared.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
using Volo.Abp.Application;
|
|
||||||
using Volo.Abp.Modularity;
|
|
||||||
|
|
||||||
namespace Erp.Reports;
|
|
||||||
|
|
||||||
[DependsOn(
|
|
||||||
typeof(ErpReportsDomainSharedModule),
|
|
||||||
typeof(AbpDddApplicationContractsModule)
|
|
||||||
)]
|
|
||||||
public class ErpReportsApplicationContractsModule : AbpModule
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
|
|
||||||
namespace Erp.Reports.ReportDefinitions;
|
|
||||||
|
|
||||||
public class CreateReportDefinitionDto
|
|
||||||
{
|
|
||||||
[Required]
|
|
||||||
[StringLength(256)]
|
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
|
||||||
[StringLength(512)]
|
|
||||||
public string DisplayName { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
|
||||||
public byte[] Content { get; set; }
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
using Volo.Abp.Application.Services;
|
|
||||||
|
|
||||||
namespace Erp.Reports.ReportDefinitions;
|
|
||||||
|
|
||||||
public interface IReportDefinitionAppService : IApplicationService
|
|
||||||
{
|
|
||||||
Task<ReportDefinitionDto> GetAsync(Guid id);
|
|
||||||
Task<ReportDefinitionDto> GetByNameAsync(string name);
|
|
||||||
Task<byte[]> GetContentAsync(string name);
|
|
||||||
Task<ReportDefinitionDto> CreateAsync(CreateReportDefinitionDto input);
|
|
||||||
Task<ReportDefinitionDto> UpdateAsync(Guid id, UpdateReportDefinitionDto input);
|
|
||||||
Task DeleteAsync(Guid id);
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
using Volo.Abp.Application.Dtos;
|
|
||||||
|
|
||||||
namespace Erp.Reports.ReportDefinitions;
|
|
||||||
|
|
||||||
public class ReportDefinitionDto : FullAuditedEntityDto<Guid>
|
|
||||||
{
|
|
||||||
public string Name { get; set; }
|
|
||||||
public string DisplayName { get; set; }
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
|
|
||||||
namespace Erp.Reports.ReportDefinitions;
|
|
||||||
|
|
||||||
public class UpdateReportDefinitionDto
|
|
||||||
{
|
|
||||||
[StringLength(512)]
|
|
||||||
public string DisplayName { get; set; }
|
|
||||||
|
|
||||||
public byte[] Content { get; set; }
|
|
||||||
}
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<RootNamespace>Erp.Reports</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Volo.Abp.Ddd.Application" Version="9.0.2" />
|
|
||||||
<PackageReference Include="Volo.Abp.AutoMapper" Version="9.0.2" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Erp.Reports.Application.Contracts\Erp.Reports.Application.Contracts.csproj" />
|
|
||||||
<ProjectReference Include="..\Erp.Reports.Domain\Erp.Reports.Domain.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
using AutoMapper;
|
|
||||||
using Erp.Reports.ReportDefinitions;
|
|
||||||
|
|
||||||
namespace Erp.Reports;
|
|
||||||
|
|
||||||
public class ErpReportsApplicationAutoMapperProfile : Profile
|
|
||||||
{
|
|
||||||
public ErpReportsApplicationAutoMapperProfile()
|
|
||||||
{
|
|
||||||
CreateMap<ReportDefinition, ReportDefinitionDto>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
using Volo.Abp.Application;
|
|
||||||
using Volo.Abp.AutoMapper;
|
|
||||||
using Volo.Abp.Modularity;
|
|
||||||
|
|
||||||
namespace Erp.Reports;
|
|
||||||
|
|
||||||
[DependsOn(
|
|
||||||
typeof(ErpReportsDomainModule),
|
|
||||||
typeof(ErpReportsApplicationContractsModule),
|
|
||||||
typeof(AbpDddApplicationModule),
|
|
||||||
typeof(AbpAutoMapperModule)
|
|
||||||
)]
|
|
||||||
public class ErpReportsApplicationModule : AbpModule
|
|
||||||
{
|
|
||||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
||||||
{
|
|
||||||
Configure<AbpAutoMapperOptions>(options =>
|
|
||||||
{
|
|
||||||
options.AddMaps<ErpReportsApplicationModule>();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,76 +0,0 @@
|
||||||
using Volo.Abp.Application.Services;
|
|
||||||
using Volo.Abp.Domain.Repositories;
|
|
||||||
|
|
||||||
namespace Erp.Reports.ReportDefinitions;
|
|
||||||
|
|
||||||
public class ReportDefinitionAppService : ApplicationService, IReportDefinitionAppService
|
|
||||||
{
|
|
||||||
private readonly IRepository<ReportDefinition, Guid> _reportDefinitionRepository;
|
|
||||||
|
|
||||||
public ReportDefinitionAppService(IRepository<ReportDefinition, Guid> reportDefinitionRepository)
|
|
||||||
{
|
|
||||||
_reportDefinitionRepository = reportDefinitionRepository;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<ReportDefinitionDto> GetAsync(Guid id)
|
|
||||||
{
|
|
||||||
var report = await _reportDefinitionRepository.GetAsync(id);
|
|
||||||
return ObjectMapper.Map<ReportDefinition, ReportDefinitionDto>(report);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<ReportDefinitionDto> GetByNameAsync(string name)
|
|
||||||
{
|
|
||||||
var report = await _reportDefinitionRepository.FirstOrDefaultAsync(x => x.Name == name);
|
|
||||||
if (report == null)
|
|
||||||
{
|
|
||||||
throw new Volo.Abp.UserFriendlyException($"Report '{name}' not found");
|
|
||||||
}
|
|
||||||
return ObjectMapper.Map<ReportDefinition, ReportDefinitionDto>(report);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<byte[]> GetContentAsync(string name)
|
|
||||||
{
|
|
||||||
var report = await _reportDefinitionRepository.FirstOrDefaultAsync(x => x.Name == name);
|
|
||||||
if (report == null)
|
|
||||||
{
|
|
||||||
throw new Volo.Abp.UserFriendlyException($"Report '{name}' not found");
|
|
||||||
}
|
|
||||||
return report.Content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<ReportDefinitionDto> CreateAsync(CreateReportDefinitionDto input)
|
|
||||||
{
|
|
||||||
var report = new ReportDefinition(
|
|
||||||
GuidGenerator.Create(),
|
|
||||||
input.Name,
|
|
||||||
input.DisplayName,
|
|
||||||
input.Content
|
|
||||||
);
|
|
||||||
|
|
||||||
await _reportDefinitionRepository.InsertAsync(report);
|
|
||||||
return ObjectMapper.Map<ReportDefinition, ReportDefinitionDto>(report);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<ReportDefinitionDto> UpdateAsync(Guid id, UpdateReportDefinitionDto input)
|
|
||||||
{
|
|
||||||
var report = await _reportDefinitionRepository.GetAsync(id);
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(input.DisplayName))
|
|
||||||
{
|
|
||||||
report.DisplayName = input.DisplayName;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (input.Content != null && input.Content.Length > 0)
|
|
||||||
{
|
|
||||||
report.UpdateContent(input.Content);
|
|
||||||
}
|
|
||||||
|
|
||||||
await _reportDefinitionRepository.UpdateAsync(report);
|
|
||||||
return ObjectMapper.Map<ReportDefinition, ReportDefinitionDto>(report);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task DeleteAsync(Guid id)
|
|
||||||
{
|
|
||||||
await _reportDefinitionRepository.DeleteAsync(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<RootNamespace>Erp.Reports</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Volo.Abp.Core" Version="9.0.2" />
|
|
||||||
<PackageReference Include="Volo.Abp.VirtualFileSystem" Version="9.0.2" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
using Volo.Abp.Modularity;
|
|
||||||
using Volo.Abp.VirtualFileSystem;
|
|
||||||
|
|
||||||
namespace Erp.Reports;
|
|
||||||
|
|
||||||
public class ErpReportsDomainSharedModule : AbpModule
|
|
||||||
{
|
|
||||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
||||||
{
|
|
||||||
Configure<AbpVirtualFileSystemOptions>(options =>
|
|
||||||
{
|
|
||||||
options.FileSets.AddEmbedded<ErpReportsDomainSharedModule>();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
namespace Erp.Reports;
|
|
||||||
|
|
||||||
public static class ReportsConsts
|
|
||||||
{
|
|
||||||
public const string DbTablePrefix = "Erp";
|
|
||||||
public const string DbSchema = null;
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<RootNamespace>Erp.Reports</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="9.0.2" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Erp.Reports.Domain.Shared\Erp.Reports.Domain.Shared.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
namespace Erp.Reports.Domain;
|
|
||||||
|
|
||||||
public static class Prefix
|
|
||||||
{
|
|
||||||
public static string MenuPrefix { get; set; } = "Plat";
|
|
||||||
public static string HostPrefix { get; set; } = "H";
|
|
||||||
public static string? DbSchema { get; set; } = null;
|
|
||||||
|
|
||||||
public const string ConnectionStringName = "Reports";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class TablePrefix
|
|
||||||
{
|
|
||||||
public static string ByName(string tableName)
|
|
||||||
{
|
|
||||||
return $"{Prefix.MenuPrefix}_{Prefix.HostPrefix}_{tableName}";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
using Volo.Abp.Domain;
|
|
||||||
using Volo.Abp.Modularity;
|
|
||||||
|
|
||||||
namespace Erp.Reports;
|
|
||||||
|
|
||||||
[DependsOn(
|
|
||||||
typeof(AbpDddDomainModule),
|
|
||||||
typeof(ErpReportsDomainSharedModule)
|
|
||||||
)]
|
|
||||||
public class ErpReportsDomainModule : AbpModule
|
|
||||||
{
|
|
||||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
||||||
{
|
|
||||||
// Domain services configuration can be added here
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
using Volo.Abp.Domain.Entities.Auditing;
|
|
||||||
|
|
||||||
namespace Erp.Reports.ReportDefinitions;
|
|
||||||
|
|
||||||
public class ReportDefinition : FullAuditedEntity<Guid>
|
|
||||||
{
|
|
||||||
public string Name { get; set; }
|
|
||||||
public string DisplayName { get; set; }
|
|
||||||
public byte[] Content { get; set; }
|
|
||||||
|
|
||||||
public ReportDefinition(Guid id, string name, string displayName, byte[] content)
|
|
||||||
: base(id)
|
|
||||||
{
|
|
||||||
Name = name;
|
|
||||||
DisplayName = displayName;
|
|
||||||
Content = content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateContent(byte[] content)
|
|
||||||
{
|
|
||||||
Content = content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<RootNamespace>Erp.Reports.EntityFrameworkCore</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="9.0.2" />
|
|
||||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="9.0.2" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Erp.Reports.Domain\Erp.Reports.Domain.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Volo.Abp.Data;
|
|
||||||
using Volo.Abp.EntityFrameworkCore;
|
|
||||||
using Erp.Reports.ReportDefinitions;
|
|
||||||
using Erp.Reports.Domain;
|
|
||||||
|
|
||||||
namespace Erp.Reports.EntityFrameworkCore;
|
|
||||||
|
|
||||||
[ConnectionStringName(Prefix.ConnectionStringName)]
|
|
||||||
public class ErpReportsDbContext : AbpDbContext<ErpReportsDbContext>
|
|
||||||
{
|
|
||||||
public DbSet<ReportDefinition> ReportDefinitions { get; set; }
|
|
||||||
|
|
||||||
public ErpReportsDbContext(DbContextOptions<ErpReportsDbContext> options)
|
|
||||||
: base(options)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder builder)
|
|
||||||
{
|
|
||||||
base.OnModelCreating(builder);
|
|
||||||
|
|
||||||
builder.ConfigureReports();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Design;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
|
|
||||||
namespace Erp.Reports.EntityFrameworkCore;
|
|
||||||
|
|
||||||
public class ErpReportsDbContextFactory : IDesignTimeDbContextFactory<ErpReportsDbContext>
|
|
||||||
{
|
|
||||||
public ErpReportsDbContext CreateDbContext(string[] args)
|
|
||||||
{
|
|
||||||
var configuration = BuildConfiguration();
|
|
||||||
|
|
||||||
var builder = new DbContextOptionsBuilder<ErpReportsDbContext>()
|
|
||||||
.UseSqlServer(configuration.GetConnectionString("SqlServer"));
|
|
||||||
|
|
||||||
return new ErpReportsDbContext(builder.Options);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static IConfigurationRoot BuildConfiguration()
|
|
||||||
{
|
|
||||||
var builder = new ConfigurationBuilder()
|
|
||||||
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../Erp.Reports.HttpApi.Host/"))
|
|
||||||
.AddJsonFile("appsettings.json", optional: false);
|
|
||||||
|
|
||||||
return builder.Build();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Volo.Abp;
|
|
||||||
using Volo.Abp.EntityFrameworkCore.Modeling;
|
|
||||||
using Erp.Reports.ReportDefinitions;
|
|
||||||
using Erp.Reports.Domain;
|
|
||||||
|
|
||||||
namespace Erp.Reports.EntityFrameworkCore;
|
|
||||||
|
|
||||||
public static class ErpReportsDbContextModelCreatingExtensions
|
|
||||||
{
|
|
||||||
public static void ConfigureReports(
|
|
||||||
this ModelBuilder builder)
|
|
||||||
{
|
|
||||||
Check.NotNull(builder, nameof(builder));
|
|
||||||
|
|
||||||
builder.Entity<ReportDefinition>(b =>
|
|
||||||
{
|
|
||||||
b.ToTable(TablePrefix.ByName(nameof(ReportDefinition)), Prefix.DbSchema);
|
|
||||||
b.ConfigureByConvention();
|
|
||||||
|
|
||||||
b.Property(x => x.Name).IsRequired().HasMaxLength(256);
|
|
||||||
b.Property(x => x.DisplayName).IsRequired().HasMaxLength(512);
|
|
||||||
b.Property(x => x.Content).IsRequired();
|
|
||||||
|
|
||||||
b.HasIndex(x => x.Name);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using Volo.Abp.EntityFrameworkCore;
|
|
||||||
using Volo.Abp.EntityFrameworkCore.SqlServer;
|
|
||||||
using Volo.Abp.Modularity;
|
|
||||||
|
|
||||||
namespace Erp.Reports.EntityFrameworkCore;
|
|
||||||
|
|
||||||
[DependsOn(
|
|
||||||
typeof(ErpReportsDomainModule),
|
|
||||||
typeof(AbpEntityFrameworkCoreSqlServerModule)
|
|
||||||
)]
|
|
||||||
public class ErpReportsEntityFrameworkCoreModule : AbpModule
|
|
||||||
{
|
|
||||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
||||||
{
|
|
||||||
context.Services.AddAbpDbContext<ErpReportsDbContext>(options =>
|
|
||||||
{
|
|
||||||
options.AddDefaultRepositories(includeAllEntities: true);
|
|
||||||
});
|
|
||||||
|
|
||||||
Configure<AbpDbContextOptions>(options =>
|
|
||||||
{
|
|
||||||
options.UseSqlServer();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\modules\Erp.Languages\Erp.Languages.Application.Contracts\Erp.Languages.Application.Contracts.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Languages\Erp.Languages.Application.Contracts\Erp.Languages.Application.Contracts.csproj" />
|
||||||
<ProjectReference Include="..\..\modules\Erp.Notifications\Erp.Notifications.Application.Contracts\Erp.Notifications.Application.Contracts.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Notifications\Erp.Notifications.Application.Contracts\Erp.Notifications.Application.Contracts.csproj" />
|
||||||
<ProjectReference Include="..\..\modules\Erp.Reports\Erp.Reports.Application.Contracts\Erp.Reports.Application.Contracts.csproj" />
|
|
||||||
<ProjectReference Include="..\..\modules\Erp.Settings\Erp.Settings.Application.Contracts\Erp.Settings.Application.Contracts.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Settings\Erp.Settings.Application.Contracts\Erp.Settings.Application.Contracts.csproj" />
|
||||||
<ProjectReference Include="..\Erp.Platform.Domain.Shared\Erp.Platform.Domain.Shared.csproj" />
|
<ProjectReference Include="..\Erp.Platform.Domain.Shared\Erp.Platform.Domain.Shared.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
using Erp.Languages;
|
using Erp.Languages;
|
||||||
using Erp.Notifications.Application;
|
using Erp.Notifications.Application;
|
||||||
using Erp.Reports;
|
|
||||||
using Erp.Settings;
|
using Erp.Settings;
|
||||||
using Volo.Abp.Account;
|
using Volo.Abp.Account;
|
||||||
using Volo.Abp.FeatureManagement;
|
using Volo.Abp.FeatureManagement;
|
||||||
|
|
@ -22,8 +21,7 @@ namespace Erp.Platform;
|
||||||
typeof(AbpObjectExtendingModule),
|
typeof(AbpObjectExtendingModule),
|
||||||
typeof(LanguagesApplicationContractsModule),
|
typeof(LanguagesApplicationContractsModule),
|
||||||
typeof(SettingsApplicationContractsModule),
|
typeof(SettingsApplicationContractsModule),
|
||||||
typeof(NotificationApplicationContractsModule),
|
typeof(NotificationApplicationContractsModule)
|
||||||
typeof(ErpReportsApplicationContractsModule)
|
|
||||||
)]
|
)]
|
||||||
public class PlatformApplicationContractsModule : AbpModule
|
public class PlatformApplicationContractsModule : AbpModule
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\modules\Erp.Languages\Erp.Languages.Application\Erp.Languages.Application.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Languages\Erp.Languages.Application\Erp.Languages.Application.csproj" />
|
||||||
<ProjectReference Include="..\..\modules\Erp.Notifications\Erp.Notifications.Application\Erp.Notifications.Application.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Notifications\Erp.Notifications.Application\Erp.Notifications.Application.csproj" />
|
||||||
<ProjectReference Include="..\..\modules\Erp.Reports\Erp.Reports.Application\Erp.Reports.Application.csproj" />
|
|
||||||
<ProjectReference Include="..\..\modules\Erp.Settings\Erp.Settings.Application\Erp.Settings.Application.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Settings\Erp.Settings.Application\Erp.Settings.Application.csproj" />
|
||||||
<ProjectReference Include="..\Erp.Platform.Domain\Erp.Platform.Domain.csproj" />
|
<ProjectReference Include="..\Erp.Platform.Domain\Erp.Platform.Domain.csproj" />
|
||||||
<ProjectReference Include="..\Erp.Platform.Application.Contracts\Erp.Platform.Application.Contracts.csproj" />
|
<ProjectReference Include="..\Erp.Platform.Application.Contracts\Erp.Platform.Application.Contracts.csproj" />
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
using Erp.Languages;
|
using Erp.Languages;
|
||||||
using Erp.Notifications.Application;
|
using Erp.Notifications.Application;
|
||||||
using Erp.Reports;
|
|
||||||
using Erp.Settings;
|
using Erp.Settings;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Volo.Abp.Account;
|
using Volo.Abp.Account;
|
||||||
|
|
@ -24,8 +23,7 @@ namespace Erp.Platform;
|
||||||
typeof(AbpFeatureManagementApplicationModule),
|
typeof(AbpFeatureManagementApplicationModule),
|
||||||
typeof(LanguagesApplicationModule),
|
typeof(LanguagesApplicationModule),
|
||||||
typeof(SettingsApplicationModule),
|
typeof(SettingsApplicationModule),
|
||||||
typeof(NotificationApplicationModule),
|
typeof(NotificationApplicationModule)
|
||||||
typeof(ErpReportsApplicationModule)
|
|
||||||
)]
|
)]
|
||||||
public class PlatformApplicationModule : AbpModule
|
public class PlatformApplicationModule : AbpModule
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\modules\Erp.Languages\Erp.Languages.Domain.Shared\Erp.Languages.Domain.Shared.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Languages\Erp.Languages.Domain.Shared\Erp.Languages.Domain.Shared.csproj" />
|
||||||
<ProjectReference Include="..\..\modules\Erp.Notifications\Erp.Notifications.Domain.Shared\Erp.Notifications.Domain.Shared.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Notifications\Erp.Notifications.Domain.Shared\Erp.Notifications.Domain.Shared.csproj" />
|
||||||
<ProjectReference Include="..\..\modules\Erp.Reports\Erp.Reports.Domain.Shared\Erp.Reports.Domain.Shared.csproj" />
|
|
||||||
<ProjectReference Include="..\..\modules\Erp.Settings\Erp.Settings.Domain.Shared\Erp.Settings.Domain.Shared.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Settings\Erp.Settings.Domain.Shared\Erp.Settings.Domain.Shared.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
using Erp.Languages;
|
using Erp.Languages;
|
||||||
using Erp.Notifications.Domain;
|
using Erp.Notifications.Domain;
|
||||||
using Erp.Reports;
|
|
||||||
using Erp.Platform.Localization;
|
using Erp.Platform.Localization;
|
||||||
using Erp.Settings;
|
using Erp.Settings;
|
||||||
using Volo.Abp.AuditLogging;
|
using Volo.Abp.AuditLogging;
|
||||||
|
|
@ -28,8 +27,7 @@ namespace Erp.Platform;
|
||||||
typeof(AbpTenantManagementDomainSharedModule),
|
typeof(AbpTenantManagementDomainSharedModule),
|
||||||
typeof(LanguagesDomainSharedModule),
|
typeof(LanguagesDomainSharedModule),
|
||||||
typeof(SettingsDomainSharedModule),
|
typeof(SettingsDomainSharedModule),
|
||||||
typeof(NotificationDomainSharedModule),
|
typeof(NotificationDomainSharedModule)
|
||||||
typeof(ErpReportsDomainSharedModule)
|
|
||||||
)]
|
)]
|
||||||
public class PlatformDomainSharedModule : AbpModule
|
public class PlatformDomainSharedModule : AbpModule
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
<ProjectReference Include="..\..\modules\Erp.MailQueue\Erp.MailQueue.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.MailQueue\Erp.MailQueue.csproj" />
|
||||||
<ProjectReference Include="..\..\modules\Erp.Notifications\Erp.Notifications.Domain\Erp.Notifications.Domain.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Notifications\Erp.Notifications.Domain\Erp.Notifications.Domain.csproj" />
|
||||||
<ProjectReference Include="..\..\modules\Erp.Settings\Erp.Settings.Domain\Erp.Settings.Domain.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Settings\Erp.Settings.Domain\Erp.Settings.Domain.csproj" />
|
||||||
<ProjectReference Include="..\..\modules\Erp.Reports\Erp.Reports.Domain\Erp.Reports.Domain.csproj" />
|
|
||||||
<ProjectReference Include="..\Erp.Platform.Domain.Shared\Erp.Platform.Domain.Shared.csproj" />
|
<ProjectReference Include="..\Erp.Platform.Domain.Shared\Erp.Platform.Domain.Shared.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ using Volo.Abp.TenantManagement;
|
||||||
using Volo.Abp.BlobStoring;
|
using Volo.Abp.BlobStoring;
|
||||||
using Volo.Abp.BlobStoring.FileSystem;
|
using Volo.Abp.BlobStoring.FileSystem;
|
||||||
using Volo.Abp.Timing;
|
using Volo.Abp.Timing;
|
||||||
using Erp.Reports;
|
|
||||||
|
|
||||||
namespace Erp.Platform;
|
namespace Erp.Platform;
|
||||||
|
|
||||||
|
|
@ -36,7 +35,6 @@ namespace Erp.Platform;
|
||||||
typeof(SettingsDomainModule),
|
typeof(SettingsDomainModule),
|
||||||
typeof(ErpMailQueueModule),
|
typeof(ErpMailQueueModule),
|
||||||
typeof(NotificationDomainModule),
|
typeof(NotificationDomainModule),
|
||||||
typeof(ErpReportsDomainModule),
|
|
||||||
typeof(AbpBlobStoringModule),
|
typeof(AbpBlobStoringModule),
|
||||||
typeof(AbpBlobStoringFileSystemModule)
|
typeof(AbpBlobStoringFileSystemModule)
|
||||||
)]
|
)]
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ using static Erp.Platform.PlatformConsts;
|
||||||
using static Erp.Settings.SettingsConsts;
|
using static Erp.Settings.SettingsConsts;
|
||||||
using Erp.Platform.Enums;
|
using Erp.Platform.Enums;
|
||||||
using Erp.SqlQueryManager.EntityFrameworkCore;
|
using Erp.SqlQueryManager.EntityFrameworkCore;
|
||||||
using Erp.Reports.EntityFrameworkCore;
|
|
||||||
|
|
||||||
namespace Erp.Platform.EntityFrameworkCore;
|
namespace Erp.Platform.EntityFrameworkCore;
|
||||||
|
|
||||||
|
|
@ -352,7 +351,6 @@ public class PlatformDbContext :
|
||||||
builder.ConfigureMailQueue();
|
builder.ConfigureMailQueue();
|
||||||
builder.ConfigureNotification();
|
builder.ConfigureNotification();
|
||||||
builder.ConfigureSqlQueryManager();
|
builder.ConfigureSqlQueryManager();
|
||||||
builder.ConfigureReports();
|
|
||||||
|
|
||||||
//Saas
|
//Saas
|
||||||
builder.Entity<AiBot>(b =>
|
builder.Entity<AiBot>(b =>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using Erp.Languages.EntityFrameworkCore;
|
using Erp.Languages.EntityFrameworkCore;
|
||||||
using Erp.Notifications.EntityFrameworkCore;
|
using Erp.Notifications.EntityFrameworkCore;
|
||||||
using Erp.Reports.EntityFrameworkCore;
|
|
||||||
using Erp.Settings.EntityFrameworkCore;
|
using Erp.Settings.EntityFrameworkCore;
|
||||||
using Erp.SqlQueryManager.EntityFrameworkCore;
|
using Erp.SqlQueryManager.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
@ -37,8 +36,7 @@ namespace Erp.Platform.EntityFrameworkCore;
|
||||||
typeof(LanguagesEntityFrameworkCoreModule),
|
typeof(LanguagesEntityFrameworkCoreModule),
|
||||||
typeof(SettingsEntityFrameworkCoreModule),
|
typeof(SettingsEntityFrameworkCoreModule),
|
||||||
typeof(NotificationEntityFrameworkCoreModule),
|
typeof(NotificationEntityFrameworkCoreModule),
|
||||||
typeof(SqlQueryManagerEntityFrameworkCoreModule),
|
typeof(SqlQueryManagerEntityFrameworkCoreModule)
|
||||||
typeof(ErpReportsEntityFrameworkCoreModule)
|
|
||||||
)]
|
)]
|
||||||
public class PlatformEntityFrameworkCoreModule : AbpModule
|
public class PlatformEntityFrameworkCoreModule : AbpModule
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
<PackageReference Include="EFCore.BulkExtensions" Version="9.0.1" />
|
<PackageReference Include="EFCore.BulkExtensions" Version="9.0.1" />
|
||||||
<ProjectReference Include="..\..\modules\Erp.Languages\Erp.Languages.EntityFrameworkCore\Erp.Languages.EntityFrameworkCore.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Languages\Erp.Languages.EntityFrameworkCore\Erp.Languages.EntityFrameworkCore.csproj" />
|
||||||
<ProjectReference Include="..\..\modules\Erp.Notifications\Erp.Notifications.EntityFrameworkCore\Erp.Notifications.EntityFrameworkCore.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Notifications\Erp.Notifications.EntityFrameworkCore\Erp.Notifications.EntityFrameworkCore.csproj" />
|
||||||
<ProjectReference Include="..\..\modules\Erp.Reports\Erp.Reports.EntityFrameworkCore\Erp.Reports.EntityFrameworkCore.csproj" />
|
|
||||||
<ProjectReference Include="..\..\modules\Erp.Settings\Erp.Settings.EntityFrameworkCore\Erp.Settings.EntityFrameworkCore.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.Settings\Erp.Settings.EntityFrameworkCore\Erp.Settings.EntityFrameworkCore.csproj" />
|
||||||
<ProjectReference Include="..\..\modules\Erp.SqlQueryManager\Erp.SqlQueryManager.EntityFrameworkCore\Erp.SqlQueryManager.EntityFrameworkCore.csproj" />
|
<ProjectReference Include="..\..\modules\Erp.SqlQueryManager\Erp.SqlQueryManager.EntityFrameworkCore\Erp.SqlQueryManager.EntityFrameworkCore.csproj" />
|
||||||
<ProjectReference Include="..\Erp.Platform.Domain\Erp.Platform.Domain.csproj" />
|
<ProjectReference Include="..\Erp.Platform.Domain\Erp.Platform.Domain.csproj" />
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Erp.Platform.Migrations
|
namespace Erp.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20260106110136_Initial")]
|
[Migration("20260107073550_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -17773,63 +17773,6 @@ namespace Erp.Platform.Migrations
|
||||||
b.ToTable("Sas_H_ForumTopic", (string)null);
|
b.ToTable("Sas_H_ForumTopic", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Reports.ReportDefinitions.ReportDefinition", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<byte[]>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("varbinary(max)");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
|
||||||
.HasColumnType("datetime2")
|
|
||||||
.HasColumnName("CreationTime");
|
|
||||||
|
|
||||||
b.Property<Guid?>("CreatorId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("CreatorId");
|
|
||||||
|
|
||||||
b.Property<Guid?>("DeleterId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("DeleterId");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("DeletionTime")
|
|
||||||
.HasColumnType("datetime2")
|
|
||||||
.HasColumnName("DeletionTime");
|
|
||||||
|
|
||||||
b.Property<string>("DisplayName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(512)
|
|
||||||
.HasColumnType("nvarchar(512)");
|
|
||||||
|
|
||||||
b.Property<bool>("IsDeleted")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("bit")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("IsDeleted");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("LastModificationTime")
|
|
||||||
.HasColumnType("datetime2")
|
|
||||||
.HasColumnName("LastModificationTime");
|
|
||||||
|
|
||||||
b.Property<Guid?>("LastModifierId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("LastModifierId");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("nvarchar(256)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Name");
|
|
||||||
|
|
||||||
b.ToTable("Plat_H_ReportDefinition", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Settings.Entities.SettingDefinition", b =>
|
modelBuilder.Entity("Erp.Settings.Entities.SettingDefinition", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -2009,27 +2009,6 @@ namespace Erp.Platform.Migrations
|
||||||
table.PrimaryKey("PK_Plat_H_NotificationRule", x => x.Id);
|
table.PrimaryKey("PK_Plat_H_NotificationRule", x => x.Id);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Plat_H_ReportDefinition",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
||||||
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
|
||||||
DisplayName = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
|
|
||||||
Content = table.Column<byte[]>(type: "varbinary(max)", nullable: false),
|
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
||||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
|
||||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Plat_H_ReportDefinition", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "Plat_H_SettingDefinition",
|
name: "Plat_H_SettingDefinition",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
|
@ -9526,11 +9505,6 @@ namespace Erp.Platform.Migrations
|
||||||
table: "Plat_H_Notification",
|
table: "Plat_H_Notification",
|
||||||
column: "NotificationRuleId");
|
column: "NotificationRuleId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Plat_H_ReportDefinition_Name",
|
|
||||||
table: "Plat_H_ReportDefinition",
|
|
||||||
column: "Name");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_Prj_T_ProjectPhase_CategoryId",
|
name: "IX_Prj_T_ProjectPhase_CategoryId",
|
||||||
table: "Prj_T_ProjectPhase",
|
table: "Prj_T_ProjectPhase",
|
||||||
|
|
@ -10701,9 +10675,6 @@ namespace Erp.Platform.Migrations
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Plat_H_Notification");
|
name: "Plat_H_Notification");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Plat_H_ReportDefinition");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Plat_H_SettingDefinition");
|
name: "Plat_H_SettingDefinition");
|
||||||
|
|
||||||
|
|
@ -17770,63 +17770,6 @@ namespace Erp.Platform.Migrations
|
||||||
b.ToTable("Sas_H_ForumTopic", (string)null);
|
b.ToTable("Sas_H_ForumTopic", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Reports.ReportDefinitions.ReportDefinition", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<byte[]>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("varbinary(max)");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
|
||||||
.HasColumnType("datetime2")
|
|
||||||
.HasColumnName("CreationTime");
|
|
||||||
|
|
||||||
b.Property<Guid?>("CreatorId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("CreatorId");
|
|
||||||
|
|
||||||
b.Property<Guid?>("DeleterId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("DeleterId");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("DeletionTime")
|
|
||||||
.HasColumnType("datetime2")
|
|
||||||
.HasColumnName("DeletionTime");
|
|
||||||
|
|
||||||
b.Property<string>("DisplayName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(512)
|
|
||||||
.HasColumnType("nvarchar(512)");
|
|
||||||
|
|
||||||
b.Property<bool>("IsDeleted")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("bit")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("IsDeleted");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("LastModificationTime")
|
|
||||||
.HasColumnType("datetime2")
|
|
||||||
.HasColumnName("LastModificationTime");
|
|
||||||
|
|
||||||
b.Property<Guid?>("LastModifierId")
|
|
||||||
.HasColumnType("uniqueidentifier")
|
|
||||||
.HasColumnName("LastModifierId");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("nvarchar(256)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Name");
|
|
||||||
|
|
||||||
b.ToTable("Plat_H_ReportDefinition", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Settings.Entities.SettingDefinition", b =>
|
modelBuilder.Entity("Erp.Settings.Entities.SettingDefinition", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,7 @@ namespace Erp.Platform;
|
||||||
typeof(AbpAspNetCoreSerilogModule),
|
typeof(AbpAspNetCoreSerilogModule),
|
||||||
typeof(AbpSwashbuckleModule),
|
typeof(AbpSwashbuckleModule),
|
||||||
typeof(AbpBackgroundWorkersHangfireModule),
|
typeof(AbpBackgroundWorkersHangfireModule),
|
||||||
typeof(SqlQueryManagerApplicationModule),
|
typeof(SqlQueryManagerApplicationModule)
|
||||||
typeof(ErpReportsApplicationModule)
|
|
||||||
)]
|
)]
|
||||||
public class PlatformHttpApiHostModule : AbpModule
|
public class PlatformHttpApiHostModule : AbpModule
|
||||||
{
|
{
|
||||||
|
|
@ -214,7 +213,6 @@ public class PlatformHttpApiHostModule : AbpModule
|
||||||
options.ConventionalControllers.Create(typeof(ErpMailQueueModule).Assembly);
|
options.ConventionalControllers.Create(typeof(ErpMailQueueModule).Assembly);
|
||||||
options.ConventionalControllers.Create(typeof(NotificationApplicationModule).Assembly);
|
options.ConventionalControllers.Create(typeof(NotificationApplicationModule).Assembly);
|
||||||
options.ConventionalControllers.Create(typeof(SqlQueryManagerApplicationModule).Assembly);
|
options.ConventionalControllers.Create(typeof(SqlQueryManagerApplicationModule).Assembly);
|
||||||
options.ConventionalControllers.Create(typeof(ErpReportsApplicationModule).Assembly);
|
|
||||||
options.ChangeControllerModelApiExplorerGroupName = false;
|
options.ChangeControllerModelApiExplorerGroupName = false;
|
||||||
options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(PlatformUpdateProfileDto));
|
options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(PlatformUpdateProfileDto));
|
||||||
options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(UploadFileDto));
|
options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(UploadFileDto));
|
||||||
|
|
@ -423,10 +421,6 @@ public class PlatformHttpApiHostModule : AbpModule
|
||||||
|
|
||||||
// Register report storage extension
|
// Register report storage extension
|
||||||
context.Services.AddScoped<ReportStorageWebExtension, CustomReportStorageWebExtension>();
|
context.Services.AddScoped<ReportStorageWebExtension, CustomReportStorageWebExtension>();
|
||||||
|
|
||||||
// Register custom SQL data connection provider
|
|
||||||
context.Services.AddScoped<CustomSqlDataConnectionProviderFactory>();
|
|
||||||
context.Services.AddScoped<CustomSqlDataSourceWizardConnectionStringsProvider>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnApplicationInitialization(ApplicationInitializationContext context)
|
public override void OnApplicationInitialization(ApplicationInitializationContext context)
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ using Microsoft.Extensions.Hosting;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using Serilog.Sinks.PostgreSQL;
|
using Serilog.Sinks.PostgreSQL;
|
||||||
using static Erp.Settings.SettingsConsts;
|
using static Erp.Settings.SettingsConsts;
|
||||||
|
using DevExpress.AspNetCore;
|
||||||
|
|
||||||
namespace Erp.Platform;
|
namespace Erp.Platform;
|
||||||
|
|
||||||
|
|
@ -151,6 +152,7 @@ public class Program
|
||||||
builder.Services.AddSingleton<IUserIdProvider, CustomUserIdProvider>();
|
builder.Services.AddSingleton<IUserIdProvider, CustomUserIdProvider>();
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
app.UseDevExpressControls();
|
||||||
app.UseCors("Dynamic");
|
app.UseCors("Dynamic");
|
||||||
|
|
||||||
// Dynamic Assembly Registration Delegate Setup
|
// Dynamic Assembly Registration Delegate Setup
|
||||||
|
|
|
||||||
|
|
@ -1,83 +1,115 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using DevExpress.XtraReports.UI;
|
|
||||||
using Erp.Reports.EntityFrameworkCore;
|
|
||||||
using System;
|
using System;
|
||||||
using Erp.Reports.PredefinedReports;
|
using Erp.Reports.PredefinedReports;
|
||||||
|
|
||||||
namespace Erp.Platform.ReportServices;
|
namespace Erp.Platform.ReportServices;
|
||||||
|
|
||||||
|
using System.ServiceModel;
|
||||||
|
using DevExpress.XtraReports.UI;
|
||||||
public class CustomReportStorageWebExtension : DevExpress.XtraReports.Web.Extensions.ReportStorageWebExtension
|
public class CustomReportStorageWebExtension : DevExpress.XtraReports.Web.Extensions.ReportStorageWebExtension
|
||||||
{
|
{
|
||||||
protected ErpReportsDbContext DbContext { get; set; }
|
readonly string reportDirectory = "Reports";
|
||||||
|
const string FileExtension = ".repx";
|
||||||
|
|
||||||
public CustomReportStorageWebExtension(ErpReportsDbContext dbContext)
|
public CustomReportStorageWebExtension()
|
||||||
{
|
{
|
||||||
this.DbContext = dbContext;
|
if (!Directory.Exists(reportDirectory))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(reportDirectory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public CustomReportStorageWebExtension(string reportDirectory)
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(reportDirectory))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(reportDirectory);
|
||||||
|
}
|
||||||
|
this.reportDirectory = reportDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool IsWithinReportsFolder(string url, string folder)
|
||||||
|
{
|
||||||
|
var rootDirectory = new DirectoryInfo(folder);
|
||||||
|
var fileInfo = new FileInfo(Path.Combine(folder, url));
|
||||||
|
return fileInfo.Directory.FullName.ToLower().StartsWith(rootDirectory.FullName.ToLower());
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanSetData(string url)
|
public override bool CanSetData(string url)
|
||||||
{
|
{
|
||||||
|
// Determines whether a report with the specified URL can be saved.
|
||||||
|
// Add custom logic that returns **false** for reports that should be read-only.
|
||||||
|
// Return **true** if no valdation is required.
|
||||||
|
// This method is called only for valid URLs (if the **IsValidUrl** method returns **true**).
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool IsValidUrl(string url)
|
public override bool IsValidUrl(string url)
|
||||||
{
|
{
|
||||||
return true;
|
// Determines whether the URL passed to the current report storage is valid.
|
||||||
|
// Implement your own logic to prohibit URLs that contain spaces or other specific characters.
|
||||||
|
// Return **true** if no validation is required.
|
||||||
|
|
||||||
|
return Path.GetFileName(url) == url;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] GetData(string url)
|
public override byte[] GetData(string url)
|
||||||
{
|
{
|
||||||
var reportData = DbContext.ReportDefinitions.FirstOrDefault(x => x.Name == url);
|
// Uses a specified URL to return report layout data stored within a report storage medium.
|
||||||
if (reportData != null)
|
// This method is called if the **IsValidUrl** method returns **true**.
|
||||||
return reportData.Content;
|
// You can use the **GetData** method to process report parameters sent from the client
|
||||||
|
// if the parameters are included in the report URL's query string.
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (Directory.EnumerateFiles(reportDirectory).Select(Path.GetFileNameWithoutExtension).Contains(url))
|
||||||
|
{
|
||||||
|
return File.ReadAllBytes(Path.Combine(reportDirectory, url + FileExtension));
|
||||||
|
}
|
||||||
if (ReportsFactory.Reports.ContainsKey(url))
|
if (ReportsFactory.Reports.ContainsKey(url))
|
||||||
{
|
{
|
||||||
using var ms = new MemoryStream();
|
using (MemoryStream ms = new MemoryStream())
|
||||||
using XtraReport report = ReportsFactory.Reports[url]();
|
{
|
||||||
report.SaveLayoutToXml(ms);
|
ReportsFactory.Reports[url]().SaveLayoutToXml(ms);
|
||||||
return ms.ToArray();
|
return ms.ToArray();
|
||||||
}
|
}
|
||||||
throw new DevExpress.XtraReports.Web.ClientControls.FaultException($"Could not find report '{url}'.");
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw new FaultException(new FaultReason("Could not get report data."), new FaultCode("Server"), "GetData");
|
||||||
|
}
|
||||||
|
throw new FaultException(new FaultReason(string.Format("Could not find report '{0}'.", url)), new FaultCode("Server"), "GetData");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Dictionary<string, string> GetUrls()
|
public override Dictionary<string, string> GetUrls()
|
||||||
{
|
{
|
||||||
return DbContext.ReportDefinitions
|
// Returns a dictionary that contains the report names (URLs) and display names.
|
||||||
.ToList()
|
// The Report Designer uses this method to populate the Open Report and Save Report dialogs.
|
||||||
.Select(x => x.Name)
|
|
||||||
|
return Directory.GetFiles(reportDirectory, "*" + FileExtension)
|
||||||
|
.Select(Path.GetFileNameWithoutExtension)
|
||||||
.Union(ReportsFactory.Reports.Select(x => x.Key))
|
.Union(ReportsFactory.Reports.Select(x => x.Key))
|
||||||
.ToDictionary<string, string>(x => x);
|
.ToDictionary<string, string>(x => x);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SetData(XtraReport report, string url)
|
public override void SetData(XtraReport report, string url)
|
||||||
{
|
{
|
||||||
using var stream = new MemoryStream();
|
// Saves the specified report to the report storage with the specified name
|
||||||
report.SaveLayoutToXml(stream);
|
// (saves existing reports only).
|
||||||
|
if (!IsWithinReportsFolder(url, reportDirectory))
|
||||||
var reportData = DbContext.ReportDefinitions.FirstOrDefault(x => x.Name == url);
|
throw new FaultException(new FaultReason("Invalid report name."), new FaultCode("Server"), "GetData");
|
||||||
if (reportData == null)
|
report.SaveLayoutToXml(Path.Combine(reportDirectory, url + FileExtension));
|
||||||
{
|
|
||||||
var newReport = new Erp.Reports.ReportDefinitions.ReportDefinition(
|
|
||||||
Guid.NewGuid(),
|
|
||||||
url,
|
|
||||||
url,
|
|
||||||
stream.ToArray()
|
|
||||||
);
|
|
||||||
DbContext.ReportDefinitions.Add(newReport);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
reportData.UpdateContent(stream.ToArray());
|
|
||||||
}
|
|
||||||
DbContext.SaveChanges();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string SetNewData(XtraReport report, string defaultUrl)
|
public override string SetNewData(XtraReport report, string defaultUrl)
|
||||||
{
|
{
|
||||||
|
// Allows you to validate and correct the specified name (URL).
|
||||||
|
// This method also allows you to return the resulting name (URL),
|
||||||
|
// and to save your report to a storage. The method is called only for new reports.
|
||||||
SetData(report, defaultUrl);
|
SetData(report, defaultUrl);
|
||||||
return defaultUrl;
|
return defaultUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
using System;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using DevExpress.DataAccess.ConnectionParameters;
|
|
||||||
using DevExpress.DataAccess.Sql;
|
|
||||||
using DevExpress.DataAccess.Web;
|
|
||||||
using static Erp.Settings.SettingsConsts;
|
|
||||||
using DevExpress.DataAccess.Wizard.Services;
|
|
||||||
|
|
||||||
namespace Erp.Platform.ReportServices;
|
|
||||||
|
|
||||||
public class CustomSqlDataConnectionProviderFactory : IConnectionProviderFactory
|
|
||||||
{
|
|
||||||
private readonly IConfiguration _configuration;
|
|
||||||
|
|
||||||
public CustomSqlDataConnectionProviderFactory(IConfiguration configuration)
|
|
||||||
{
|
|
||||||
_configuration = configuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IConnectionProviderService Create()
|
|
||||||
{
|
|
||||||
return new CustomSqlConnectionProviderService(_configuration);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CustomSqlConnectionProviderService : IConnectionProviderService
|
|
||||||
{
|
|
||||||
private readonly IConfiguration _configuration;
|
|
||||||
|
|
||||||
public CustomSqlConnectionProviderService(IConfiguration configuration)
|
|
||||||
{
|
|
||||||
_configuration = configuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SqlDataConnection LoadConnection(string connectionName)
|
|
||||||
{
|
|
||||||
// appsettings.json'dan SQL Server connection string'ini al
|
|
||||||
var connectionString = _configuration.GetConnectionString(DefaultDatabaseProvider);
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(connectionString))
|
|
||||||
throw new InvalidOperationException($"Connection string for '{DefaultDatabaseProvider}' not found in configuration.");
|
|
||||||
|
|
||||||
// SQL Server için CustomStringConnectionParameters kullan
|
|
||||||
var connectionParameters = new CustomStringConnectionParameters(connectionString);
|
|
||||||
return new SqlDataConnection(connectionName, connectionParameters);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using DevExpress.DataAccess.ConnectionParameters;
|
|
||||||
using DevExpress.DataAccess.Web;
|
|
||||||
using static Erp.Settings.SettingsConsts;
|
|
||||||
|
|
||||||
namespace Erp.Platform.ReportServices;
|
|
||||||
|
|
||||||
public class CustomSqlDataSourceWizardConnectionStringsProvider : IDataSourceWizardConnectionStringsProvider
|
|
||||||
{
|
|
||||||
private readonly IConfiguration _configuration;
|
|
||||||
|
|
||||||
public CustomSqlDataSourceWizardConnectionStringsProvider(IConfiguration configuration)
|
|
||||||
{
|
|
||||||
_configuration = configuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
Dictionary<string, string> IDataSourceWizardConnectionStringsProvider.GetConnectionDescriptions()
|
|
||||||
{
|
|
||||||
// SqlServer adında bir bağlantı tanımla
|
|
||||||
return new Dictionary<string, string>
|
|
||||||
{
|
|
||||||
{ "SqlServer", "SQL Server Database Connection" }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
DataConnectionParametersBase IDataSourceWizardConnectionStringsProvider.GetDataConnectionParameters(string name)
|
|
||||||
{
|
|
||||||
var connectionString = _configuration.GetConnectionString(DefaultDatabaseProvider);
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(connectionString))
|
|
||||||
return null;
|
|
||||||
|
|
||||||
return new CustomStringConnectionParameters(connectionString);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
50
api/src/Erp.Platform.HttpApi.Host/Reports/TestReport.repx
Normal file
50
api/src/Erp.Platform.HttpApi.Host/Reports/TestReport.repx
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<XtraReportsLayoutSerializer SerializerVersion="25.1.7.0" Ref="1" ControlType="Erp.Reports.PredefinedReports.TestReport, Erp.Platform.HttpApi.Host, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Name="Report" PageWidthF="850" PageHeightF="1100" Version="25.1" DataMember="Sas_T_Sector" DataSource="#Ref-0" Font="Arial, 9.75pt">
|
||||||
|
<Bands>
|
||||||
|
<Item1 Ref="2" ControlType="TopMarginBand" Name="TopMargin" />
|
||||||
|
<Item2 Ref="3" ControlType="ReportHeaderBand" Name="ReportHeader" HeightF="60">
|
||||||
|
<Controls>
|
||||||
|
<Item1 Ref="4" ControlType="XRLabel" Name="label1" Text="Sector Report" SizeF="650,24.19433" LocationFloat="0,0" StyleName="Title" />
|
||||||
|
</Controls>
|
||||||
|
</Item2>
|
||||||
|
<Item3 Ref="5" ControlType="DetailBand" Name="Detail" HeightF="25">
|
||||||
|
<Controls>
|
||||||
|
<Item1 Ref="6" ControlType="XRTable" Name="table2" SizeF="650,25" LocationFloat="0,0" OddStyleName="DetailData3_Odd">
|
||||||
|
<Rows>
|
||||||
|
<Item1 Ref="7" ControlType="XRTableRow" Name="tableRow1" Weight="1">
|
||||||
|
<Cells>
|
||||||
|
<Item1 Ref="8" ControlType="XRTableCell" Name="tableCell1" Weight="0.3" Text="Id" StyleName="DetailData1" Borders="None">
|
||||||
|
<ExpressionBindings>
|
||||||
|
<Item1 Ref="9" EventName="BeforePrint" PropertyName="Text" Expression="[Id]" />
|
||||||
|
</ExpressionBindings>
|
||||||
|
<StylePriority Ref="10" UseBorders="false" />
|
||||||
|
</Item1>
|
||||||
|
<Item2 Ref="11" ControlType="XRTableCell" Name="tableCell2" Weight="0.7" Text="Name" StyleName="DetailData1">
|
||||||
|
<ExpressionBindings>
|
||||||
|
<Item1 Ref="12" EventName="BeforePrint" PropertyName="Text" Expression="[Name]" />
|
||||||
|
</ExpressionBindings>
|
||||||
|
</Item2>
|
||||||
|
</Cells>
|
||||||
|
</Item1>
|
||||||
|
</Rows>
|
||||||
|
</Item1>
|
||||||
|
</Controls>
|
||||||
|
</Item3>
|
||||||
|
<Item4 Ref="13" ControlType="BottomMarginBand" Name="BottomMargin">
|
||||||
|
<Controls>
|
||||||
|
<Item1 Ref="14" ControlType="XRPageInfo" Name="pageInfo1" PageInfo="DateTime" SizeF="325,23" LocationFloat="0,0" StyleName="PageInfo" />
|
||||||
|
<Item2 Ref="15" ControlType="XRPageInfo" Name="pageInfo2" TextFormatString="Page {0} of {1}" TextAlignment="TopRight" SizeF="325,23" LocationFloat="325,0" StyleName="PageInfo" />
|
||||||
|
</Controls>
|
||||||
|
</Item4>
|
||||||
|
</Bands>
|
||||||
|
<StyleSheet>
|
||||||
|
<Item1 Ref="16" Name="Title" BorderStyle="Inset" Padding="6,6,0,0,100" Font="Arial, 14.25pt" ForeColor="255,64,70,80" BackColor="Transparent" BorderColor="Black" Sides="None" StringFormat="Near;Near;0;None;Character;Default" BorderWidthSerializable="1" />
|
||||||
|
<Item2 Ref="17" Name="DetailCaption1" BorderStyle="Inset" Padding="6,6,0,0,100" Font="Arial, 8.25pt, style=Bold" ForeColor="255,64,70,80" BackColor="255,181,211,142" BorderColor="White" Sides="Left" StringFormat="Near;Center;0;None;Character;Default" TextAlignment="MiddleLeft" BorderWidthSerializable="2" />
|
||||||
|
<Item3 Ref="18" Name="DetailData1" BorderStyle="Inset" Padding="6,6,0,0,100" Font="Arial, 8.25pt" ForeColor="Black" BorderColor="Transparent" Sides="Left" StringFormat="Near;Center;0;None;Character;Default" TextAlignment="MiddleLeft" BorderWidthSerializable="2" />
|
||||||
|
<Item4 Ref="19" Name="DetailData3_Odd" BorderStyle="Inset" Padding="6,6,0,0,100" Font="Arial, 8.25pt" ForeColor="Black" BackColor="255,243,245,248" BorderColor="Transparent" Sides="None" StringFormat="Near;Center;0;None;Character;Default" TextAlignment="MiddleLeft" BorderWidthSerializable="1" />
|
||||||
|
<Item5 Ref="20" Name="PageInfo" BorderStyle="Inset" Padding="6,6,0,0,100" Font="Arial, 8.25pt, style=Bold" ForeColor="255,64,70,80" StringFormat="Near;Near;0;None;Character;Default" />
|
||||||
|
</StyleSheet>
|
||||||
|
<ComponentStorage>
|
||||||
|
<Item1 Ref="0" ObjectType="DevExpress.DataAccess.Sql.SqlDataSource,DevExpress.DataAccess.v25.1" Name="sqlDataSource1" Base64="PFNxbERhdGFTb3VyY2UgTmFtZT0ic3FsRGF0YVNvdXJjZTEiPjxDb25uZWN0aW9uIE5hbWU9IlNxbFNlcnZlciIgRnJvbUFwcENvbmZpZz0idHJ1ZSIgLz48UXVlcnkgVHlwZT0iU2VsZWN0UXVlcnkiIE5hbWU9IlNhc19UX1NlY3RvciI+PFRhYmxlcz48VGFibGUgTmFtZT0iU2FzX1RfU2VjdG9yIiAvPjwvVGFibGVzPjxDb2x1bW5zPjxDb2x1bW4gVGFibGU9IlNhc19UX1NlY3RvciIgTmFtZT0iSWQiIC8+PENvbHVtbiBUYWJsZT0iU2FzX1RfU2VjdG9yIiBOYW1lPSJOYW1lIiAvPjwvQ29sdW1ucz48L1F1ZXJ5PjxSZXN1bHRTY2hlbWE+PERhdGFTZXQgTmFtZT0ic3FsRGF0YVNvdXJjZTEiPjxWaWV3IE5hbWU9IlNhc19UX1NlY3RvciI+PEZpZWxkIE5hbWU9IklkIiBUeXBlPSJTdHJpbmciIC8+PEZpZWxkIE5hbWU9Ik5hbWUiIFR5cGU9IlN0cmluZyIgLz48L1ZpZXc+PC9EYXRhU2V0PjwvUmVzdWx0U2NoZW1hPjxDb25uZWN0aW9uT3B0aW9ucyBDbG9zZUNvbm5lY3Rpb249InRydWUiIC8+PC9TcWxEYXRhU291cmNlPg==" />
|
||||||
|
</ComponentStorage>
|
||||||
|
</XtraReportsLayoutSerializer>
|
||||||
Loading…
Reference in a new issue