diff --git a/WebApiService/Win_in.Sfs.Scp.WebApi.sln b/WebApiService/Win_in.Sfs.Scp.WebApi.sln index d18494f..c7cde76 100644 --- a/WebApiService/Win_in.Sfs.Scp.WebApi.sln +++ b/WebApiService/Win_in.Sfs.Scp.WebApi.sln @@ -39,6 +39,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Win_in.Sfs.Scp.v1.Domain", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Win_in.Sfs.Scp.v1.EntityFrameworkCore", "src\Win_in.Sfs.Scp.v1.EntityFrameworkCore\Win_in.Sfs.Scp.v1.EntityFrameworkCore.csproj", "{77D1D3F8-A04C-4688-AC67-C8372BD268A2}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Win_in.Sfs.Scp.v1.Event", "src\Win_in.Sfs.Scp.v1.Event\Win_in.Sfs.Scp.v1.Event.csproj", "{45EED43B-B235-4C24-9176-3B7992DA4D6E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -109,6 +111,10 @@ Global {77D1D3F8-A04C-4688-AC67-C8372BD268A2}.Debug|Any CPU.Build.0 = Debug|Any CPU {77D1D3F8-A04C-4688-AC67-C8372BD268A2}.Release|Any CPU.ActiveCfg = Release|Any CPU {77D1D3F8-A04C-4688-AC67-C8372BD268A2}.Release|Any CPU.Build.0 = Release|Any CPU + {45EED43B-B235-4C24-9176-3B7992DA4D6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45EED43B-B235-4C24-9176-3B7992DA4D6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45EED43B-B235-4C24-9176-3B7992DA4D6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45EED43B-B235-4C24-9176-3B7992DA4D6E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -130,6 +136,7 @@ Global {748584B1-BA69-4F6A-81AA-F4BDE6BCE29D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} {3EE98133-3E7A-4B14-A515-12CB039A9EED} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} {77D1D3F8-A04C-4688-AC67-C8372BD268A2} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} + {45EED43B-B235-4C24-9176-3B7992DA4D6E} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F} diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Rejects/IReceiptRepository.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Parts/ITaPartRepository.cs similarity index 58% rename from WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Rejects/IReceiptRepository.cs rename to WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Parts/ITaPartRepository.cs index 5de16eb..1d40995 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Rejects/IReceiptRepository.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Parts/ITaPartRepository.cs @@ -2,7 +2,7 @@ namespace Win_in.Sfs.Scp.v1.Domain { - public interface IRejectRepository : IRepository + public interface ITaPartRepository : IRepository { } diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Parts/IPartRepository.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/PurchaseOrders/ITbPoRepository.cs similarity index 59% rename from WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Parts/IPartRepository.cs rename to WebApiService/src/Win_in.Sfs.Scp.v1.Domain/PurchaseOrders/ITbPoRepository.cs index d517f01..5d5344b 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Parts/IPartRepository.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/PurchaseOrders/ITbPoRepository.cs @@ -2,7 +2,7 @@ namespace Win_in.Sfs.Scp.v1.Domain { - public interface IPartRepository : IRepository + public interface ITbPoRepository : IRepository { } diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Receipts/IReceiptRepository.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Receipts/ITbReceiptRepository.cs similarity index 55% rename from WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Receipts/IReceiptRepository.cs rename to WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Receipts/ITbReceiptRepository.cs index d33def9..b1d5d66 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Receipts/IReceiptRepository.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Receipts/ITbReceiptRepository.cs @@ -2,7 +2,7 @@ namespace Win_in.Sfs.Scp.v1.Domain { - public interface IReceiptRepository : IRepository + public interface ITbReceiptRepository : IRepository { } diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Suppliers/ISupplierRepository.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Rejects/ITbRejectRepository.cs similarity index 58% rename from WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Suppliers/ISupplierRepository.cs rename to WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Rejects/ITbRejectRepository.cs index b93534b..f6b005c 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Suppliers/ISupplierRepository.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Rejects/ITbRejectRepository.cs @@ -2,7 +2,7 @@ namespace Win_in.Sfs.Scp.v1.Domain { - public interface ISupplierRepository : IRepository + public interface ITbRejectRepository : IRepository { } diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/PurchaseOrders/IPurchaseOrderRepository.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Suppliers/ITaVenderRepository.cs similarity index 56% rename from WebApiService/src/Win_in.Sfs.Scp.v1.Domain/PurchaseOrders/IPurchaseOrderRepository.cs rename to WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Suppliers/ITaVenderRepository.cs index d113170..7cef48d 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/PurchaseOrders/IPurchaseOrderRepository.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/Suppliers/ITaVenderRepository.cs @@ -2,7 +2,7 @@ namespace Win_in.Sfs.Scp.v1.Domain { - public interface IPurchaseOrderRepository : IRepository + public interface ITaVenderRepository : IRepository { } diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/V1ScpDomainModule.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/V1ScpDomainModule.cs index a89a3ed..915312f 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/V1ScpDomainModule.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Domain/V1ScpDomainModule.cs @@ -1,8 +1,6 @@ -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.DependencyInjection.Extensions; -using Volo.Abp.Modularity; +using Volo.Abp.Modularity; -namespace Win_in.Sfs.Scp.WebApi +namespace Win_in.Sfs.Scp.v1.Domain { [DependsOn()] public class V1ScpDomainModule : AbpModule diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/PurchaseOrderRepository.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/PurchaseOrderRepository.cs deleted file mode 100644 index a06656f..0000000 --- a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/PurchaseOrderRepository.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.Domain.Repositories.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; -using Win_in.Sfs.Scp.v1.Domain; - -namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore -{ - public class PurchaseOrderRepository : EfCoreRepository, IPurchaseOrderRepository - { - public PurchaseOrderRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) - { - } - } -} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/ReceiptRepository.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/ReceiptRepository.cs deleted file mode 100644 index 4155bf5..0000000 --- a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/ReceiptRepository.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.Domain.Repositories.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; -using Win_in.Sfs.Scp.v1.Domain; - -namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore -{ - public class ReceiptRepository : EfCoreRepository, IReceiptRepository - { - public ReceiptRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) - { - } - } -} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/RejectRepository.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TaPartRepository.cs similarity index 61% rename from WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/RejectRepository.cs rename to WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TaPartRepository.cs index f7f624e..5f402ce 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/RejectRepository.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TaPartRepository.cs @@ -4,9 +4,10 @@ using Win_in.Sfs.Scp.v1.Domain; namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore { - public class RejectRepository : EfCoreRepository, IRejectRepository + + public class TaPartRepository : EfCoreRepository, ITaPartRepository { - public RejectRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + public TaPartRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) { } } diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/SupplierRepository.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TaVenderRepository.cs similarity index 60% rename from WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/SupplierRepository.cs rename to WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TaVenderRepository.cs index ccd9939..b9ece56 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/SupplierRepository.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TaVenderRepository.cs @@ -4,9 +4,9 @@ using Win_in.Sfs.Scp.v1.Domain; namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore { - public class SupplierRepository : EfCoreRepository, ISupplierRepository + public class TaVenderRepository : EfCoreRepository, ITaVenderRepository { - public SupplierRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + public TaVenderRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) { } } diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/PartRepository.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TbPoRepository.cs similarity index 61% rename from WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/PartRepository.cs rename to WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TbPoRepository.cs index 988310f..a8bb647 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/PartRepository.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TbPoRepository.cs @@ -4,10 +4,9 @@ using Win_in.Sfs.Scp.v1.Domain; namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore { - - public class PartRepository : EfCoreRepository, IPartRepository + public class TbPoRepository : EfCoreRepository, ITbPoRepository { - public PartRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + public TbPoRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) { } } diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TbReceiptRepository.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TbReceiptRepository.cs new file mode 100644 index 0000000..50518ab --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TbReceiptRepository.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Scp.v1.Domain; + +namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore +{ + public class TbReceiptRepository : EfCoreRepository, ITbReceiptRepository + { + public TbReceiptRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TbRejectRepository.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TbRejectRepository.cs new file mode 100644 index 0000000..36e78f9 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/TbRejectRepository.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Scp.v1.Domain; + +namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore +{ + public class TbRejectRepository : EfCoreRepository, ITbRejectRepository + { + public TbRejectRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/V1ScpEntityFrameworkCoreModule.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/V1ScpEntityFrameworkCoreModule.cs index c617b71..85e6502 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/V1ScpEntityFrameworkCoreModule.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.EntityFrameworkCore/V1ScpEntityFrameworkCoreModule.cs @@ -23,11 +23,11 @@ namespace Win_in.Sfs.Scp.v1.EntityFrameworkCore // options.AddDefaultRepositories(includeAllEntities: true); - options.AddRepository(); - options.AddRepository(); - options.AddRepository(); - options.AddRepository(); - options.AddRepository(); + options.AddRepository(); + options.AddRepository(); + options.AddRepository(); + options.AddRepository(); + options.AddRepository(); // Configure(o => // { diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Event/PartEventHandler.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/PartEventHandler.cs new file mode 100644 index 0000000..a9db9dc --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/PartEventHandler.cs @@ -0,0 +1,26 @@ +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.EventBus; +using Win_in.Sfs.Scp.v1.Domain; +using Win_in.Sfs.Scp.WebApi; + +namespace Win_in.Sfs.Scp.v1.Event +{ + public class PartEventHandler:ILocalEventHandler> + { + private readonly ITaPartRepository _taPartRepository; + + public PartEventHandler(ITaPartRepository taPartRepository) + { + _taPartRepository = taPartRepository; + } + + public Task HandleEventAsync(EntityCreatedEto eventData) + { + throw new System.NotImplementedException(); + + //TODO 根据传入数据新增或修改TA_PART + + } + } +} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Event/PurchaseOrderEventHandler.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/PurchaseOrderEventHandler.cs new file mode 100644 index 0000000..c10aad3 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/PurchaseOrderEventHandler.cs @@ -0,0 +1,17 @@ +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.EventBus; +using Win_in.Sfs.Scp.WebApi; + +namespace Win_in.Sfs.Scp.v1.Event +{ + public class PurchaseOrderEventHandler:ILocalEventHandler> + { + public Task HandleEventAsync(EntityCreatedEto eventData) + { + throw new System.NotImplementedException(); + + //TODO 新增或修改TB_PO + } + } +} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Event/ReceiptEventHandler.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/ReceiptEventHandler.cs new file mode 100644 index 0000000..53df86f --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/ReceiptEventHandler.cs @@ -0,0 +1,17 @@ +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.EventBus; +using Win_in.Sfs.Scp.WebApi; + +namespace Win_in.Sfs.Scp.v1.Event +{ + public class ReceiptEventHandler:ILocalEventHandler> + { + public Task HandleEventAsync(EntityCreatedEto eventData) + { + throw new System.NotImplementedException(); + + //TODO 新增 TB_RECEIPT 或 TB_REJECT + } + } +} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Event/SupplierEventHandler.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/SupplierEventHandler.cs new file mode 100644 index 0000000..6ca8f26 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/SupplierEventHandler.cs @@ -0,0 +1,17 @@ +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.EventBus; +using Win_in.Sfs.Scp.WebApi; + +namespace Win_in.Sfs.Scp.v1.Event +{ + public class SupplierEventHandler:ILocalEventHandler> + { + public Task HandleEventAsync(EntityCreatedEto eventData) + { + throw new System.NotImplementedException(); + + //TODO 根据传入数据新增或修改TA_VENDER + } + } +} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Event/UnplannedReceiptEventHandler.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/UnplannedReceiptEventHandler.cs new file mode 100644 index 0000000..ef62413 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/UnplannedReceiptEventHandler.cs @@ -0,0 +1,17 @@ +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.EventBus; +using Win_in.Sfs.Scp.WebApi; + +namespace Win_in.Sfs.Scp.v1.Event +{ + public class UnplannedReceiptEventHandler:ILocalEventHandler> + { + public Task HandleEventAsync(EntityCreatedEto eventData) + { + throw new System.NotImplementedException(); + + //TODO 新增无订单的TB_RECEIPT + } + } +} \ No newline at end of file diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Event/V1ScpDomainModule.cs b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/V1ScpDomainModule.cs new file mode 100644 index 0000000..d939c95 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/V1ScpDomainModule.cs @@ -0,0 +1,25 @@ +using Volo.Abp.Autofac; +using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.Modularity; +using Win_in.Sfs.Scp.v1.Domain; +using Win_in.Sfs.Scp.WebApi; + +namespace Win_in.Sfs.Scp.v1.Event +{ + [DependsOn( + typeof(AbpAutofacModule), + typeof(V1ScpDomainModule), + typeof(WebApiDomainModule) + )] + public class V1ScpEventModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + + Configure(options => + { + options.AutoEventSelectors.AddAll(); + }); + } + } +} diff --git a/WebApiService/src/Win_in.Sfs.Scp.v1.Event/Win_in.Sfs.Scp.v1.Event.csproj b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/Win_in.Sfs.Scp.v1.Event.csproj new file mode 100644 index 0000000..195c1e3 --- /dev/null +++ b/WebApiService/src/Win_in.Sfs.Scp.v1.Event/Win_in.Sfs.Scp.v1.Event.csproj @@ -0,0 +1,17 @@ + + + + net5.0 + + + + + + + + + + + + +