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; }