[BE] 更新 Niagara 資料同步,同步電梯系統

fic_system 的電梯系統 tag 要改成 B
This commit is contained in:
keke 2023-08-25 16:45:52 +08:00
parent 01d0ad6db1
commit 685a4fcf59
4 changed files with 9 additions and 6 deletions

View File

@ -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;

View File

@ -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;

View File

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

View File

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