From db3adb6cb3454cc2a6d08598f6391b064eb44e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Wed, 20 Sep 2023 09:54:07 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SettleAccount.HttpApi.Host/appsettings.json | 13 +++++++++++-- .../SettleAccount.Application/Bases/BA_SERVICE.cs | 2 +- .../Entities/BQ/INVOICE_SERVICE.cs | 4 +++- .../Entities/BQ/Managers/INV_MNG.cs | 9 +++------ 4 files changed, 18 insertions(+), 10 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 18cbf47d..122445cd 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json @@ -74,13 +74,22 @@ } }, - "AuthServer": { - "Authority": "http://dev.ccwin-in.com:16082", + //"Authority": "http://dev.ccwin-in.com:10580", + "Authority": "http://localhost:44378", "ClientId": "basic-web", "ClientSecret": "1q2w3e*" }, + + + + //"AuthServer": { + // "Authority": "http://dev.ccwin-in.com:16082", + // "ClientId": "basic-web", + // "ClientSecret": "1q2w3e*" + //}, + "Redis": { "Configuration": "127.0.0.1" }, diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs index 3f460f75..5f2bfd46 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs @@ -204,7 +204,7 @@ namespace Win.Sfs.SettleAccount.Bases PartDesc = tm == null ? string.Empty : itm.PartDesc, InvDate = itm1.CreationTime, RealInvbillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum, - Version = itm.Version, + //Version = itm.Version, InvbillNum = itm.InvbillNum, InvGroupNum = itm.InvGroupNum, LU = itm.LU, diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs index 11c505e3..79b978b6 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs @@ -209,6 +209,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ bj.VendorCode = itm.ExtraProperties["VendorCode"].ToSqlValue();//供应商代码 bj.VendorName = itm.ExtraProperties["VendorName"].ToSqlValue();//供应商名称 bj.DeliveryNumber = itm.ExtraProperties["DeliveryNumber"].ToSqlValue();//交货号; + bj.BeginDate=itm.BeginDate; + bj.EndDate = itm.EndDate; //bj.DeliveryNumber = itm.GetProperty("DeliveryNumber", "");//交货号 //bj.InvbillNum = itm.GetProperty("InvoiceNumber", "");//发票号 @@ -232,7 +234,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ PartDesc = tm == null ? string.Empty : itm.PartDesc, InvDate = itm1.CreationTime, RealInvbillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum, - Version = itm.Version, + //Version = itm.Version, InvbillNum = itm.InvbillNum, InvGroupNum = itm.InvGroupNum, LU = itm.LU, diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs index 2d33cc93..9747f1a6 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs @@ -2206,10 +2206,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers groupList.AddRange(mapList); } List _entityDetailList = new List(); - foreach (var detail in query.ToList()) { - var entity = new INVOICE_WAIT_DETAIL( guid: GuidGenerator.Create(), version: p_version, @@ -2226,13 +2224,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers endDate: detail.EndDate, partcode: detail.PartCode); entity.LineCode = detail.LineCode; - entity.SetProperty("DeliveryNumber", detail.DeliveryIndexNumber);//交货号 + entity.SetProperty("DeliveryNumber", detail.DeliveryNumber);//交货号 entity.SetProperty("VendorCode", detail.VendorCode);//供应商代码 entity.SetProperty("VendorName", detail.VendorName);//供应商名称 entity.SetProperty("PurchaseOrderNumber", "");//采购订单号 - entity.SetProperty("DeliveryIndexNumber", "");//交付索引号 - entity.SetProperty("PartName", "");//零件名称 - + entity.SetProperty("DeliveryIndexNumber", detail.DeliveryIndexNumber);//交付索引号 + entity.SetProperty("PartName", detail.PartName);//零件名称 _entityDetailList.Add(entity); } if (_entityDetailList.Count > 0) From bbe76e56eb9caece61fbe2bc40be31f49a9d5138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Wed, 20 Sep 2023 11:09:06 +0800 Subject: [PATCH 2/3] =?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 --- .../Bases/BA_SERVICE.cs | 1 - .../Bases/PD_SERVICE.cs | 2 +- .../Entities/BQ/INVOICE_SERVICE.cs | 2 +- .../BQ/Syncs/PendingDeductionService.cs | 5 ++++- .../Entities/BQ/Managers/INV_MNG.cs | 17 +++++++---------- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs index 5f2bfd46..666c9ea4 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs @@ -178,7 +178,6 @@ namespace Win.Sfs.SettleAccount.Bases bj.LU = itm.LU; bj.PartCode = itm.PartCode; bj.PRICE = itm.PRICE; - bj.InvGroupNum = itm.InvGroupNum; bj.DeliveryNumber = itm.ExtraProperties["DeliveryIndexNumber"].ToSqlValue(); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs index 3c537c2d..10dc17f9 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs @@ -190,7 +190,7 @@ namespace Win.Sfs.SettleAccount.Bases } } await _repository.DbContext.BulkUpdateAsync(ls); - + var _taskid = await p_service.ExportEnqueueAsync($"{first.BusinessType.ToString()}待扣减任务", ExportExtentsion.Excel, DateTime.Now.ToString("yyyyMM"), string.Empty, CurrentUser, typeof(PendingDeductionService), customConditionList, (rs) => { }); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs index 79b978b6..61b329c2 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs @@ -201,7 +201,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ bj.PRICE = itm.PRICE; bj.InvbillNum = itm.InvbillNum; bj.InvGroupNum = itm.InvGroupNum; - bj.DeliveryNumber =itm.ExtraProperties["DeliveryIndexNumber"].ToSqlValue(); + bj.DeliveryIndexNumber =itm.ExtraProperties["DeliveryIndexNumber"].ToSqlValue(); bj.Qty = itm.Qty; bj.PRICE = itm.PRICE; bj.Amt = Math.Round(itm.PRICE * itm.Qty, 2); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs index c43acf41..2b7731ce 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using EFCore.BulkExtensions; @@ -151,6 +151,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs } Sync(detailist, EnumDeliverBjBmpBillType.JIT直供件, email, isout == "out" ? true : false); } + + + return id.ToString(); } //public List GetPagedData(List dataList, int pageNumber, int pageSize) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs index 9747f1a6..3428bb99 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs @@ -1403,7 +1403,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers ); string site = dtos.Where(p => !string.IsNullOrEmpty(p.Site)).FirstOrDefault().Site; string clientCode = string.Empty; - switch (site) { case "1040": @@ -1434,7 +1433,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers await _repository.DbContext.BulkInsertAsync(invlist).ConfigureAwait(false); await _repository.DbContext.BulkInsertAsync(groupList).ConfigureAwait(false); await _repository.DbContext.BulkInsertAsync(detailList).ConfigureAwait(false); - if (adjlist.Count > 0) { await _repository.DbContext.BulkUpdateAsync(adjlist).ConfigureAwait(false); @@ -1673,7 +1671,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers { detailList.AddRange(_entityDetailList); } - if (p_first == true) { var notsettle = _nothbpoRepository.Where(p => p.SettleBillNum == p_InvGroupNum);//一次开票时查找不可结数据,追加需求 @@ -2223,13 +2220,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers beginDate: detail.BeginDate, endDate: detail.EndDate, partcode: detail.PartCode); - entity.LineCode = detail.LineCode; - entity.SetProperty("DeliveryNumber", detail.DeliveryNumber);//交货号 - entity.SetProperty("VendorCode", detail.VendorCode);//供应商代码 - entity.SetProperty("VendorName", detail.VendorName);//供应商名称 - entity.SetProperty("PurchaseOrderNumber", "");//采购订单号 - entity.SetProperty("DeliveryIndexNumber", detail.DeliveryIndexNumber);//交付索引号 - entity.SetProperty("PartName", detail.PartName);//零件名称 + entity.LineCode = detail.LineCode; + entity.SetProperty("DeliveryNumber", detail.DeliveryNumber);//交货号 + entity.SetProperty("VendorCode", detail.VendorCode);//供应商代码 + entity.SetProperty("VendorName", detail.VendorName);//供应商名称 + entity.SetProperty("PurchaseOrderNumber", "");//采购订单号 + entity.SetProperty("DeliveryIndexNumber", detail.DeliveryIndexNumber);//交付索引号 + entity.SetProperty("PartName", detail.PartName);//零件名称 _entityDetailList.Add(entity); } if (_entityDetailList.Count > 0) From 496587e50f17049126bdda6ab1ce06d2c07848a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Wed, 20 Sep 2023 11:09:19 +0800 Subject: [PATCH 3/3] =?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 --- .../Entities/BQ/INVOICE_SERVICE.cs | 54 +++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs index 61b329c2..12433f66 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs @@ -189,9 +189,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ else if (invs.FirstOrDefault().BusinessType == EnumBusinessType.BeiJian) { var B = await _wRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false); - B.OrderBy(p => p.LineCode); - List BMap = new List(); foreach (var itm in B) { @@ -225,32 +223,32 @@ namespace Win.Sfs.SettleAccount.Entities.BQ //var BMap = ObjectMapper.Map, List>(B); var bjquery = from itm in BMap - join itm1 in invs on itm.InvbillNum equals itm1.InvbillNum - join itm2 in materialList on itm.LU equals itm2.SettleMaterialCode into temp - from tm in temp.DefaultIfEmpty() - select - new INVOICE_WAIT_DETAIL_BJ_DTO() - { - PartDesc = tm == null ? string.Empty : itm.PartDesc, - InvDate = itm1.CreationTime, - RealInvbillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum, - //Version = itm.Version, - InvbillNum = itm.InvbillNum, - InvGroupNum = itm.InvGroupNum, - LU = itm.LU, - PartCode = itm.PartCode, - PRICE = itm.PRICE, - Qty = itm.Qty, - Amt = itm.Amt, - DeliveryNumber = itm.DeliveryNumber , - VendorCode = itm.VendorCode , - VendorName = itm.VendorName , - // PurchaseOrderNumber = itm.PurchaseOrderNumber, - DeliveryIndexNumber =itm.DeliveryIndexNumber , - Extend1 = itm.Extend1, - BeginDate = itm.BeginDate, - EndDate = itm.EndDate, - }; + join itm1 in invs on itm.InvbillNum equals itm1.InvbillNum + join itm2 in materialList on itm.LU equals itm2.SettleMaterialCode into temp + from tm in temp.DefaultIfEmpty() + select + new INVOICE_WAIT_DETAIL_BJ_DTO() + { + PartDesc = tm == null ? string.Empty : itm.PartDesc, + InvDate = itm1.CreationTime, + RealInvbillNum = string.IsNullOrEmpty(itm1.RealnvBillNum) ? string.Empty : itm1.RealnvBillNum, + //Version = itm.Version, + InvbillNum = itm.InvbillNum, + InvGroupNum = itm.InvGroupNum, + LU = itm.LU, + PartCode = itm.PartCode, + PRICE = itm.PRICE, + Qty = itm.Qty, + Amt = itm.Amt, + DeliveryNumber = itm.DeliveryNumber, + VendorCode = itm.VendorCode, + VendorName = itm.VendorName, + // PurchaseOrderNumber = itm.PurchaseOrderNumber, + DeliveryIndexNumber = itm.DeliveryIndexNumber, + Extend1 = itm.Extend1, + BeginDate = itm.BeginDate, + EndDate = itm.EndDate, + }; entity.INVOICE_WAIT_DETAIL_BJ = bjquery.ToList(); } else