From ef0261c291a433f2a96f18df3e3223b953443e63 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Thu, 27 Jun 2024 15:37:45 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=88=9D=E5=A7=8B=E5=8C=96=E4=B8=8B?= =?UTF-8?q?=E8=BD=BDgainfomeal=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Implements/DataDownloadService.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Src/Dlhis.Middle/Services/Implements/DataDownloadService.cs b/Src/Dlhis.Middle/Services/Implements/DataDownloadService.cs index a518bf71..baad1702 100644 --- a/Src/Dlhis.Middle/Services/Implements/DataDownloadService.cs +++ b/Src/Dlhis.Middle/Services/Implements/DataDownloadService.cs @@ -50,14 +50,17 @@ public class DataDownloadService : IDataDownloadService await DownloadAsync(item); - if (!await _dbContext.Queryable().AnyAsync()) + if (!await _dbContext.Queryable().Where(x => x.Factory == item).AnyAsync()) { await DownloadAsync(item); } if (!await _dbContext.Queryable().AnyAsync()) { - await DownloadAsync(item); + foreach (var currentItem in factories) + { + await DownloadAsync(currentItem); + } } } }