From 02cb4fc486f5bfac3b63447f5e7b6510428101e5 Mon Sep 17 00:00:00 2001 From: zhaoxinyu Date: Fri, 22 Dec 2023 11:56:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../appsettings.json | 3 + .../Entities/BQ/Syncs/EdiWmsDiffSerice.cs | 10 -- .../Entities/BQ/BalanceSum.cs | 123 ++++++++++++++++++ ...AccountDbContextModelCreatingExtensions.cs | 22 +++- .../BalanceSum/BalanceSumDapperRepository.cs | 94 +------------ .../SettleAccount.EntityFrameworkCore.csproj | 4 + .../appsettings.json | 2 +- 7 files changed, 155 insertions(+), 103 deletions(-) create mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BalanceSum.cs diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json index a4667838..b07bffff 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json @@ -5,6 +5,9 @@ "ConnectionStrings": { "Default": "Server=dev.ccwin-in.com,13326;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True", "SettleAccountService": "Server=dev.ccwin-in.com,13326;Database=BQ_SA;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;", + + //"SettleAccountService": "Server=10.60.101.83;Database=BQ_SA;User ID=sa;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;", + "ExChangeCenterService": "Server=dev.ccwin-in.com,13326;Database=ExChangeCenter;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;", "WMSBJBMPT": "Server=dev.ccwin-in.com,6208;Database=WMS_BJBMPT_2;User ID=sa;Password=ChangkeTec@2021;Trusted_Connection=False;TrustServerCertificate=True;", "questdb": "host=dev.ccwin-in.com;port=10580;username=admin;password=quest;database=vmi;ServerCompatibilityMode=NoTypeLoading;" diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/EdiWmsDiffSerice.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/EdiWmsDiffSerice.cs index bbac2d8a..42609480 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/EdiWmsDiffSerice.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/EdiWmsDiffSerice.cs @@ -49,11 +49,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs } - - - - - } public class HBPOEdiWmsDiffService : BASE_SERVICE, ITransientDependency, IExportJob @@ -87,11 +82,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs } - - - - - } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BalanceSum.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BalanceSum.cs new file mode 100644 index 00000000..165fc069 --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BalanceSum.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Magicodes.ExporterAndImporter.Core; +using Volo.Abp.Domain.Entities; + +namespace Win.Sfs.SettleAccount.Entities.BQ +{ + public class BalanceSum : Entity + { + public BalanceSum() + { + } + + public BalanceSum(string year, string realPartCode, string materialDesc, string erpToLoc, decimal? historyQty, decimal? balanceQty, decimal? inventQty, decimal? settleQty, decimal? january, decimal? settleJanuary, decimal? february, decimal? settleFebruary, decimal? march, decimal? settleMarch, decimal? april, decimal? settleApril, decimal? may, decimal? settleMay, decimal? june, decimal? settleJune, decimal? july, decimal? settleJuly, decimal? august, decimal? settleAugust, decimal? september, decimal? settleSeptember, decimal? october, decimal? settleOctober, decimal? november, decimal? settleNovember, decimal? december, decimal? settleDecember) + { + Year = year; + RealPartCode = realPartCode; + MaterialDesc = materialDesc; + ErpToLoc = erpToLoc; + HistoryQty = historyQty; + BalanceQty = balanceQty; + InventQty = inventQty; + SettleQty = settleQty; + January = january; + SettleJanuary = settleJanuary; + February = february; + SettleFebruary = settleFebruary; + March = march; + SettleMarch = settleMarch; + April = april; + SettleApril = settleApril; + May = may; + SettleMay = settleMay; + June = june; + SettleJune = settleJune; + July = july; + SettleJuly = settleJuly; + August = august; + SettleAugust = settleAugust; + September = september; + SettleSeptember = settleSeptember; + October = october; + SettleOctober = settleOctober; + November = november; + SettleNovember = settleNovember; + December = december; + SettleDecember = settleDecember; + } + + [ExporterHeader(DisplayName = "年份", IsBold = true)] + public string Year { set; get; } + [ExporterHeader(DisplayName = "零件号", IsBold = true)] + public string RealPartCode { set; get; } + [ExporterHeader(DisplayName = "零件名称", IsBold = true)] + public string MaterialDesc { set; get; } + [ExporterHeader(DisplayName = "库位", IsBold = true)] + public string ErpToLoc { set; get; } + [ExporterHeader(DisplayName = "历史库存数量", IsBold = true)] + public decimal? HistoryQty { set; get; } + [ExporterHeader(DisplayName = "当年库存数量", IsBold = true)] + public decimal? BalanceQty { set; get; } + [ExporterHeader(DisplayName = "库存余额数量", IsBold = true)] + public decimal? InventQty { set; get; } + [ExporterHeader(DisplayName = "有结无发合计", IsBold = true)] + public decimal? SettleQty { set; get; } + [ExporterHeader(DisplayName = "1月", IsBold = true)] + public decimal? January { set; get; } + [ExporterHeader(DisplayName = "1月有结无发", IsBold = true)] + public decimal? SettleJanuary { set; get; } + [ExporterHeader(DisplayName = "2月", IsBold = true)] + public decimal? February { set; get; } + [ExporterHeader(DisplayName = "2月有结无发", IsBold = true)] + public decimal? SettleFebruary { set; get; } + [ExporterHeader(DisplayName = "3月", IsBold = true)] + public decimal? March { set; get; } + [ExporterHeader(DisplayName = "3月有结无发", IsBold = true)] + public decimal? SettleMarch { set; get; } + [ExporterHeader(DisplayName = "4月", IsBold = true)] + public decimal? April { set; get; } + [ExporterHeader(DisplayName = "4月有结无发", IsBold = true)] + public decimal? SettleApril { set; get; } + [ExporterHeader(DisplayName = "5月", IsBold = true)] + public decimal? May { set; get; } + [ExporterHeader(DisplayName = "5月有结无发", IsBold = true)] + public decimal? SettleMay { set; get; } + [ExporterHeader(DisplayName = "6月", IsBold = true)] + public decimal? June { set; get; } + [ExporterHeader(DisplayName = "6月有结无发", IsBold = true)] + public decimal? SettleJune { set; get; } + [ExporterHeader(DisplayName = "7月", IsBold = true)] + public decimal? July { set; get; } + [ExporterHeader(DisplayName = "7月有结无发", IsBold = true)] + public decimal? SettleJuly { set; get; } + [ExporterHeader(DisplayName = "8月", IsBold = true)] + public decimal? August { set; get; } + [ExporterHeader(DisplayName = "8月有结无发", IsBold = true)] + public decimal? SettleAugust { set; get; } + [ExporterHeader(DisplayName = "9月", IsBold = true)] + public decimal? September { set; get; } + [ExporterHeader(DisplayName = "9月有结无发", IsBold = true)] + public decimal? SettleSeptember { set; get; } + [ExporterHeader(DisplayName = "10月", IsBold = true)] + public decimal? October { set; get; } + [ExporterHeader(DisplayName = "10月有结无发", IsBold = true)] + public decimal? SettleOctober { set; get; } + [ExporterHeader(DisplayName = "11月", IsBold = true)] + public decimal? November { set; get; } + [ExporterHeader(DisplayName = "11月有结无发", IsBold = true)] + public decimal? SettleNovember { set; get; } + [ExporterHeader(DisplayName = "12月", IsBold = true)] + public decimal? December { set; get; } + [ExporterHeader(DisplayName = "12月有结无发", IsBold = true)] + public decimal? SettleDecember { set; get; } + + + + + + } +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs index 37fabbab..b0bdc94b 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs @@ -17,6 +17,7 @@ using Win.Sfs.SettleAccount.Entities.Controls; using Win.Sfs.SettleAccount.Entities.Materials; using Win.Sfs.SettleAccount.Entities.Prices; using Win.Sfs.SettleAccount.MaterialRelationships; +using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report; using Win.Sfs.Shared; using Win.Sfs.Shared.Constant; @@ -116,7 +117,7 @@ namespace Win.Sfs.SettleAccount builder.ConfigurePUB_PD(options); builder.ConfigureVmiBalanceSum(options); builder.ConfigureVmiBalanceSumDetail(options); - + builder.ConfigureBalanceSum(options); //builder.ConfigureTED_SA_INV(options); //大众发票导入 //builder.ConfigureInvoice(options); @@ -1144,6 +1145,25 @@ namespace Win.Sfs.SettleAccount }); } + private static void ConfigureBalanceSum(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + b.ToTable($"{options.TablePrefix}_BalanceSum", options.Schema); + + b.ConfigureByConvention(); + b.Property(x => x.ErpToLoc).HasMaxLength(50); + b.Property(x => x.RealPartCode).HasMaxLength(50); + b.Property(x => x.Year).HasMaxLength(50); + + + }); + } + + + + + diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/BalanceSum/BalanceSumDapperRepository.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/BalanceSum/BalanceSumDapperRepository.cs index 6e0579f2..1629ba01 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/BalanceSum/BalanceSumDapperRepository.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/BalanceSum/BalanceSumDapperRepository.cs @@ -6,9 +6,11 @@ using Magicodes.ExporterAndImporter.Core; using NPOI.HPSF; using SettleAccount.Domain.BQ; using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories.Dapper; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.Uow; +using Win.Sfs.SettleAccount.Entities.BQ; using Win.Sfs.SettleAccount.Entities.BQ.Temp; @@ -40,97 +42,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report } - public class BalanceSum - { - - [ExporterHeader(DisplayName = "年份", IsBold = true)] - public string Year { set; get; } - - [ExporterHeader(DisplayName = "零件号", IsBold = true)] - public string RealPartCode { set; get; } - - [ExporterHeader(DisplayName = "零件名称", IsBold = true)] - public string MaterialDesc { set; get; } - - - [ExporterHeader(DisplayName = "库位", IsBold = true)] - public string ErpToLoc { set; get; } - - - [ExporterHeader(DisplayName = "历史库存数量", IsBold = true)] - public string HistoryQty { set; get; } - - [ExporterHeader(DisplayName = "当年库存数量", IsBold = true)] - public string BalanceQty { set; get; } - - [ExporterHeader(DisplayName = "库存余额数量", IsBold = true)] - public string InventQty { set; get; } - - - - [ExporterHeader(DisplayName = "有结无发合计", IsBold = true)] - public string SettleQty { set; get; } - - [ExporterHeader(DisplayName = "1月", IsBold = true)] - public string January { set; get; } - [ExporterHeader(DisplayName = "1月有结无发", IsBold = true)] - public string SettleJanuary { set; get; } - - [ExporterHeader(DisplayName = "2月", IsBold = true)] - public string February { set; get; } - - [ExporterHeader(DisplayName = "2月有结无发", IsBold = true)] - public string SettleFebruary { set; get; } - - [ExporterHeader(DisplayName = "3月", IsBold = true)] - public string March { set; get; } - - [ExporterHeader(DisplayName = "3月有结无发", IsBold = true)] - public string SettleMarch { set; get; } - - [ExporterHeader(DisplayName = "4月", IsBold = true)] - public string April { set; get; } - [ExporterHeader(DisplayName = "4月有结无发", IsBold = true)] - public string SettleApril { set; get; } - - [ExporterHeader(DisplayName = "5月", IsBold = true)] - public string May { set; get; } - - [ExporterHeader(DisplayName = "5月有结无发", IsBold = true)] - public string SettleMay { set; get; } - - [ExporterHeader(DisplayName = "6月", IsBold = true)] - public string June { set; get; } - [ExporterHeader(DisplayName = "6月有结无发", IsBold = true)] - public string SettleJune { set; get; } - - [ExporterHeader(DisplayName = "7月", IsBold = true)] - public string July { set; get; } - [ExporterHeader(DisplayName = "7月有结无发", IsBold = true)] - public string SettleJuly { set; get; } - [ExporterHeader(DisplayName = "8月", IsBold = true)] - public string August { set; get; } - [ExporterHeader(DisplayName = "8月有结无发", IsBold = true)] - public string SettleAugust { set; get; } - [ExporterHeader(DisplayName = "9月", IsBold = true)] - public string September { set; get; } - [ExporterHeader(DisplayName = "9月有结无发", IsBold = true)] - public string SettleSeptember { set; get; } - - [ExporterHeader(DisplayName = "10月", IsBold = true)] - public string October { set; get; } - [ExporterHeader(DisplayName = "10月有结无发", IsBold = true)] - public string SettleOctober { set; get; } - [ExporterHeader(DisplayName = "11月", IsBold = true)] - public string November { set; get; } - [ExporterHeader(DisplayName = "11月有结无发", IsBold = true)] - public string SettleNovember { set; get; } - [ExporterHeader(DisplayName = "12月", IsBold = true)] - public string December { set; get; } - [ExporterHeader(DisplayName = "12月有结无发", IsBold = true)] - public string SettleDecember { set; get; } - - } + diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/SettleAccount.EntityFrameworkCore.csproj b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/SettleAccount.EntityFrameworkCore.csproj index 590b3016..0ed3f96c 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/SettleAccount.EntityFrameworkCore.csproj +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/SettleAccount.EntityFrameworkCore.csproj @@ -39,5 +39,9 @@ + + + + diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/appsettings.json b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/appsettings.json index f6085a2c..ff295e84 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/appsettings.json +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/appsettings.json @@ -10,7 +10,7 @@ }, "ConnectionStrings": { "Default": "Server=dev.ccwin-in.com,13326;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True", - "SettleAccountService": "Server=dev.ccwin-in.com,13319;Database=BQ_SA;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;" + "SettleAccountService": "Server=dev.ccwin-in.com,13326;Database=BQ_SA;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;" //"SettleAccountService": "Server=localhost;Database=BQ_SA;User ID=sa;Password=aA123456!;Trusted_Connection=False;TrustServerCertificate=True", //"Default": "Server=localhost;Database=BJABP;User ID=sa;Password=aA123456!;Trusted_Connection=False;TrustServerCertificate=True" },