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); }