From 685a4fcf5951dd692d86b9df435b1219dad36758 Mon Sep 17 00:00:00 2001 From: keke Date: Fri, 25 Aug 2023 16:45:52 +0800 Subject: [PATCH] =?UTF-8?q?[BE]=20=E6=9B=B4=E6=96=B0=20Niagara=20=E8=B3=87?= =?UTF-8?q?=E6=96=99=E5=90=8C=E6=AD=A5=EF=BC=8C=E5=90=8C=E6=AD=A5=E9=9B=BB?= =?UTF-8?q?=E6=A2=AF=E7=B3=BB=E7=B5=B1=20fic=5Fsystem=20=E7=9A=84=E9=9B=BB?= =?UTF-8?q?=E6=A2=AF=E7=B3=BB=E7=B5=B1=20tag=20=E8=A6=81=E6=94=B9=E6=88=90?= =?UTF-8?q?=20B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Controllers/DeviceImportController.cs | 3 ++- Backend/Controllers/NiagaraDataSynchronizeController.cs | 3 ++- .../Implement/NiagaraDataSynchronizeRepository.cs | 4 ++-- Repository/BaseRepository/Implement/BaseRepository.cs | 5 +++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Backend/Controllers/DeviceImportController.cs b/Backend/Controllers/DeviceImportController.cs index 0aea80e..3b7ab77 100644 --- a/Backend/Controllers/DeviceImportController.cs +++ b/Backend/Controllers/DeviceImportController.cs @@ -52,7 +52,8 @@ namespace Backend.Controllers catch (Exception exception) { apiResult.Code = "9999"; - Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); + // Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); + Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message + Environment.NewLine + exception.StackTrace); } return apiResult; diff --git a/Backend/Controllers/NiagaraDataSynchronizeController.cs b/Backend/Controllers/NiagaraDataSynchronizeController.cs index 27a5a3c..f85cca4 100644 --- a/Backend/Controllers/NiagaraDataSynchronizeController.cs +++ b/Backend/Controllers/NiagaraDataSynchronizeController.cs @@ -76,7 +76,8 @@ namespace Backend.Controllers { apiResult.Code = "9999"; apiResult.Msg = "【" + controllerName + "/" + actionName + "】" + exception.Message; - Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); + Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message + Environment.NewLine + exception.StackTrace); + // Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); } //return apiResult; diff --git a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs index 14761d4..f135096 100644 --- a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs +++ b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs @@ -143,12 +143,12 @@ namespace Repository.BackendRepository.Implement { sb.Append($@" -- tag 第二碼為小類(除了安全系統之外) update import_niagara_tag set device_name_tag = device_system_tag - where (device_system_tag <> 'S' and device_system_tag <> 'CWB'); + where (device_system_tag <> 'S' and device_system_tag <> 'CWB' and device_system_tag <> 'B'); update import_niagara_tag a join dic_system b on a.device_name_tag COLLATE utf8mb4_general_ci = b.s2_code set device_system_tag = b.s1_code -- tag 第二碼為小類(除了安全系統之外) - where (device_system_tag <> 'S' and device_system_tag <> 'CWB'); -- 安全系統 第二段大類 第四段小類"); + where (device_system_tag <> 'S' and device_system_tag <> 'CWB' and device_system_tag <> 'B'); -- 安全系統 第二段大類 第四段小類"); await conn.ExecuteAsync(sb.ToString()); } } diff --git a/Repository/BaseRepository/Implement/BaseRepository.cs b/Repository/BaseRepository/Implement/BaseRepository.cs index 0543d8d..4aacb27 100644 --- a/Repository/BaseRepository/Implement/BaseRepository.cs +++ b/Repository/BaseRepository/Implement/BaseRepository.cs @@ -137,7 +137,7 @@ namespace Repository.BaseRepository.Implement } catch (Exception exception) { - throw exception; + throw; } return result; } @@ -162,7 +162,8 @@ namespace Repository.BaseRepository.Implement } catch (Exception exception) { - throw exception; + // throw exception; + throw; } return result; }