From f151aa3647abb6df5fa2d427846e534abff4f20a Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 12 Jan 2022 10:12:51 +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/WMS/WMSHQFSharePartAppService .cs | 1 + .../Entities/WMS/WMSJitAppService.cs | 4 +--- .../Entities/WMS/WMSKanbanAppService.cs | 2 +- .../Entities/WMS/WMSSharePartAppService.cs | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) 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 6f180115..fb191f32 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs @@ -293,6 +293,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts " @type = 4\n" + " @date = N'{1}',\n" + "SELECT 'Return Value' = @return_value"; + await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( string.Format(sql, input.BillNum,input.AccountDate)); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs index da00e419..04e7ba18 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs @@ -361,7 +361,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts } await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 }); int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum == _billNum); - if (_count == 0) + if (_count == 0 && _wmslst.Count()>0) { var _version = new WmsJitOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email); //var _ls = new List(); @@ -388,8 +388,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts job.FileName =_errinfo; await _job.UpdateAsync(job); } - - } } else diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs index 68cf5174..90cf82d8 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs @@ -328,7 +328,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts } await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 }); int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum == _billNum); - if (_count == 0) + if (_count == 0 && _wmslst.Count()>0) { var _version = new WmsKanbanOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs index d247eac8..00bfbcd1 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs @@ -438,7 +438,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts } await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 }); int _count = _wmsVersionRepository.Count(p => p.Version == version && p.BillNum == _billNum); - if (_count == 0) + if (_count == 0 && _wmslst.Count()>0) { var _version = new WmsSharePartOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email); await _wmsVersionRepository.InsertAsync(_version, true);