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) => {