From 7271af8b0ef2c1c9fc1b9a30c8d6d41a057df9c7 Mon Sep 17 00:00:00 2001 From: dev02 Date: Mon, 15 May 2023 17:43:00 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=8C=E7=AB=AF]=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=8F=96tag=5Fquantity=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Controllers/NiagaraDataSynchronizeController.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Backend/Controllers/NiagaraDataSynchronizeController.cs b/Backend/Controllers/NiagaraDataSynchronizeController.cs index 957dfcb..c9610c7 100644 --- a/Backend/Controllers/NiagaraDataSynchronizeController.cs +++ b/Backend/Controllers/NiagaraDataSynchronizeController.cs @@ -75,6 +75,7 @@ namespace Backend.Controllers catch (Exception exception) { apiResult.Code = "9999"; + apiResult.Msg = "【" + controllerName + "/" + actionName + "】" + exception.Message; Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); } @@ -92,7 +93,9 @@ namespace Backend.Controllers bool result = false; ApiResult apiResult = new ApiResult(); - string tag_quantity = backEndConfig.Getobixtag_quantity(); + var sqlObix = $@"SELECT system_value as Value, system_key as Name FROM variable WHERE deleted = 0 AND system_type = 'obixConfig'"; + var variableObix = await backendRepository.GetAllAsync(sqlObix); + string tag_quantity = variableObix.Where(x => x.Name == "tag_quantity").Select(x => x.Value).FirstOrDefault(); try { @@ -125,6 +128,7 @@ namespace Backend.Controllers catch (Exception exception) { apiResult.Code = "9999"; + apiResult.Msg = "【" + controllerName + "/" + actionName + "】" + exception.Message; Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); } @@ -170,6 +174,7 @@ namespace Backend.Controllers catch (Exception exception) { apiResult.Code = "9999"; + apiResult.Msg = "【" + controllerName + "/" + actionName + "】" + exception.Message; Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); } @@ -210,6 +215,7 @@ namespace Backend.Controllers catch (Exception exception) { apiResult.Code = "9999"; + apiResult.Msg = "【" + controllerName + "/" + actionName + "】" + exception.Message; Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message); }