From 1c93c6e96bb8a7b83eeee7def1819aace127044b Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 11 Jan 2022 18:28:37 +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 --- .../appsettings.Development.json | 18 ++++++++--------- .../appsettings.json | 20 +++++++++---------- .../SettleAccounts/SettleAccountAppService.cs | 11 ++++++++-- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json index 6f3b5a80..c8c74e7f 100644 --- a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json @@ -2,17 +2,17 @@ "App": { "CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088" }, - "ConnectionStrings": { - "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#", - "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;" - }, //"ConnectionStrings": { - // //"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", - // //"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;" - // "Default": "Server=192.168.0.67;Database=ABP;User ID=sa;Password=Microsoft2008;", - // "SettleAccountService": "Server=192.168.0.67;Database=SettleAccountService;user id=sa;password=Microsoft2008;", - // "Wms": "Server=192.168.0.63;Database=CPAT_WMS;user id=sa;password=Microsoft2008;" + // "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#", + // "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;" //}, + "ConnectionStrings": { + //"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", + //"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;" + "Default": "Server=192.168.0.67;Database=ABP;User ID=sa;Password=Microsoft2008;", + "SettleAccountService": "Server=192.168.0.67;Database=SettleAccountService;user id=sa;password=Microsoft2008;", + "Wms": "Server=192.168.0.63;Database=CPAT_WMS;user id=sa;password=Microsoft2008;" + }, "Logging": { "LogLevel": { "Default": "Information", diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json index 62b95db0..2b54af4e 100644 --- a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json @@ -2,18 +2,18 @@ "App": { "CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088" }, - "ConnectionStrings": { - "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#", - "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService1;user id=sa;Password=1q2w!@#;" - }, //"ConnectionStrings": { - // //"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", - // //"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;", - // "Default": "Server=192.168.0.67;Database=ABP;User ID=sa;Password=Microsoft2008;", - // "SettleAccountService": "Server=192.168.0.67;Database=SettleAccountService;user id=sa;password=Microsoft2008;", - // "Wms": "Server=192.168.0.63;Database=CPAT_WMS;user id=sa;password=Microsoft2008;" - + // "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#", + // "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService1;user id=sa;Password=1q2w!@#;" //}, + "ConnectionStrings": { + //"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", + //"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;", + "Default": "Server=192.168.0.67;Database=ABP;User ID=sa;Password=Microsoft2008;", + "SettleAccountService": "Server=192.168.0.67;Database=SettleAccountService;user id=sa;password=Microsoft2008;", + "Wms": "Server=192.168.0.63;Database=CPAT_WMS;user id=sa;password=Microsoft2008;" + + }, "Logging": { "LogLevel": { "Default": "Information", diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs index e69c78f1..2e65593a 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs @@ -274,9 +274,16 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts customConditionList.Add(new CustomCondition() { Name = "Period", Value = period ?? string.Empty }); customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty }); var _versionQuery = _versionRepository.Where(p => p.Version == version); - _versionQuery.BatchDelete(); + if (_versionQuery.Count() > 0) + { + _versionQuery.BatchDelete(); + } + var _query = _repository.Where(p => p.Version == version); - _query.BatchDelete(); + if (_query.Count() > 0) + { + await _query.BatchDeleteAsync(); + } var _taskid = await _service.ImportEnqueueAsync(files, "结算数据", CurrentUser, typeof(SettleAccountImportService), customConditionList, (rs) => {