From 95cff31400403312320034f70f293619377c88e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Sun, 29 Sep 2024 14:30:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SettleAccount.HttpApi.Host/appsettings.json | 4 ++-- .../Entities/BQ/BBAC_NOT_SA_SERVICE.cs | 13 ------------- .../BQ/Syncs/GenerateJisInvoiceService.cs | 15 ++++++++------- 3 files changed, 10 insertions(+), 22 deletions(-) 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 a4fa68a9..f42549cf 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json @@ -3,8 +3,8 @@ "CorsOrigins": "https://*.abc.com,http://localhost:9527,http://149.223.116.5:8088,http://localhost:44378" }, "ConnectionStrings": { - "Default": "Server=10.60.101.83;Database=BJABP;User ID=sa;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;", + "Default": "Server=dev.ccwin-in.com,13326;Database=BJABP;User ID=sa;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True", + "SettleAccountService": "Server=dev.ccwin-in.com,13326;Database=BQ_SA;User ID=sa;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;", "ExChangeCenterService": "Server=local;Database=ExchangeCenter;User ID=sa;Password=Microsoft2008;Trusted_Connection=False;TrustServerCertificate=True;", "WMSBJBMPT": "Server=local;Database=ExchangeCenter;User ID=sa;Password=Microsoft2008;Trusted_Connection=False;TrustServerCertificate=True;" //"WMSBJBMPT": "Server=WIN-33SNP5V4K0L,1433;Database=WMS_BJBMPT_2;User ID=sa;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;" diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs index 86b0dc91..ae75bede 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs @@ -74,19 +74,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ IExporter _excel = new ExcelExporter(); var entities = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true).ConfigureAwait(false); - - - - - - - - - - - - - var dtoDetails = ObjectMapper.Map, List>(entities); var inner = from d in entities diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/GenerateJisInvoiceService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/GenerateJisInvoiceService.cs index 141658c6..a6bfe9d4 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/GenerateJisInvoiceService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/GenerateJisInvoiceService.cs @@ -602,7 +602,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs { List _invls = new List(); - var groupDtos = dtos.GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID, p.LU })//明细 + var groupDtos = dtos.GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID, p.LU })//明细 合同号BBAC专有其他业务全默认成1 .Select(itm => new GroupPartCode { PartCode = itm.Key.PartCode, @@ -611,7 +611,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs ContactDocID = itm.Key.ContractDocID, Price = itm.Key.Price, Amt = Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2),//税前 - Tax = Math.Round(Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2) * 0.13m, 2),//税 + Tax = Math.Round(Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2) * 0.13m, 2),//税额 TaxAmt = Math.Round(Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2) * 0.13m, 2) + Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2),//税后进 Qty = itm.Sum(k => k.Qty), BeginDate = itm.Key.BeginDate, @@ -664,9 +664,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs var invlist = new List(); var salist = new List(); var adjlist = new List(); - foreach (var big in biglist)//单条大于1000W的开票 + foreach (var big in biglist)//单条大于1000W的开票,拆成多张 { - var list = p_list.Where(p => p.InvGroupNum == big.InvGroupNum && p.PartCode == big.PartCode && p.Price == big.Price && p.LU == big.LU); + + var list = p_list.Where(p => p.InvGroupNum == big.InvGroupNum && p.PartCode == big.PartCode && p.Price == big.Price && p.LU == big.LU ); var gener = new InvoiceGeneratorSame(); var entitylist=list.ToList(); @@ -736,8 +737,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs if (parlist is List) { var partlist1 = parlist as List; - var sq = partlist1.GroupBy(p => new { p.LU, p.GroupNum, p.InvbillNum }) - .Select(p => new { version = p_version, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty), InvBillNum = p.Key.InvbillNum, GroupNum = p.Key.GroupNum }); + var sq = partlist1.GroupBy(p => new { p.LU, p.GroupNum, p.InvbillNum,p.ContractDocID }) + .Select(p => new { version = p_version, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty), InvBillNum = p.Key.InvbillNum, GroupNum = p.Key.GroupNum, ContractDocID = p.Key.ContractDocID }); foreach (var sitm in sq) { innotls.Add(new INVOICE_NOT_SETTLE( @@ -748,7 +749,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs lU: sitm.LU, lU1: sitm.LU, extend1: "可结算", - extend2: string.Empty, + extend2: sitm.ContractDocID, qty: sitm.Qty, p_invbillnum: inv.InvBillNum ));