From aba0311664bbd50eddc25e1c21463aa019bf136b Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 13 Jan 2022 18:24:11 +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 --- .../Entities/Prices/PriceListAppService.cs | 9 +++++++-- .../Entities/WMS/WMSHQFSharePartAppService .cs | 4 ---- .../Entities/WMS/WMSHQHSharePartAppService.cs | 4 ++-- .../Entities/Prices/PriceListManager.cs | 18 +----------------- 4 files changed, 10 insertions(+), 25 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs index bbaaf95b..c404cfa6 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs @@ -161,10 +161,15 @@ namespace Win.Sfs.SettleAccount.Entities.Prices { ExportImporter _exportImporter = new ExportImporter(); + var result = await _exportImporter.UploadExcelImport(files, _excelImportService); + + var list=result.Where(p => p.Type == 20).ToList(); + + + + - - var result = await _exportImporter.UploadExcelImport(files, _excelImportService); var entityList = ObjectMapper.Map, List>(result); var _ls = entityList.Where(p=>p.EndDate.ToString().Contains("9999")).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault()); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs index 2de0a8d2..fe3a9425 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs @@ -265,15 +265,12 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts var _version = new WmsHQFSharePartOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email); await _wmsVersionRepository.InsertAsync(_version, true); - } - foreach (var job in _joblist) { job.FileName = _billNum; await _job.UpdateAsync(job); } - } else { @@ -290,7 +287,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts await _job.UpdateAsync(job); } } - } return ApplicationConsts.SuccessStr; diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs index 59a13488..d69d46ab 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs @@ -376,8 +376,8 @@ into temp1 var sql = "DECLARE @return_value int\n" + "EXEC @return_value = [dbo].[p_wms_output]\n" + " @billnum = N'{0}',\n" + - " @type = 4\n" + - " @date = N'{1}',\n"+ + " @type = 4 ,\n" + + " @date = N'{1}'\n"+ "SELECT 'Return Value' = @return_value"; await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString())); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListManager.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListManager.cs index 770c59b7..b91ebbc6 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListManager.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListManager.cs @@ -95,20 +95,8 @@ namespace Win.Sfs.SettleAccount.Entities.Prices where itm1.Price != itm2.Price select new PriceList(itm2.Id, itm2.BeginDate, itm2.EndDate, itm1.Price, itm2.MaterialCode,itm2.Type, itm2.ParentId, itm2.Version); - - - - - - - - - - - - await _repository.GetDbContext().BulkUpdateAsync(update.ToList()); - await _repository.GetDbContext().BulkInsertAsync(add.ToList()); + await _repository.GetDbContext().BulkInsertAsync(add.ToList()); var _first = _versionRepository.FirstOrDefault(p => p.Version == version); @@ -118,10 +106,6 @@ namespace Win.Sfs.SettleAccount.Entities.Prices List _versionList = new List() { new PriceListVersion(GuidGenerator.Create(), DateTime.Now.Year.ToString(), DateTime.Now.Month.ToString(), version) }; await _versionRepository.GetDbContext().BulkInsertAsync(_versionList); } - - - - return _errorList; }