|
@@ -34,24 +34,31 @@ bool ToEQMDataBase::initWebApi(const QString& url, const QString& serverIP, cons
|
|
}
|
|
}
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
|
|
- ret = m_httpApi->DBQInit(url);
|
|
|
|
- if(ret < 0)
|
|
|
|
|
|
+ if(!m_httpApi->Load())
|
|
{
|
|
{
|
|
- SPDLOG_LOGGER_ERROR(m_logger,"Init WebApi failed:{}, error Info:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
|
|
|
|
+ SPDLOG_LOGGER_ERROR(m_logger,"Load WebApi failed!");
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ m_httpApi->DBInit(url.toStdString().c_str());
|
|
|
|
+ // if(ret < 0)
|
|
|
|
+ // {
|
|
|
|
+ // SPDLOG_LOGGER_ERROR(m_logger,"Init WebApi failed:{}, error Info:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
|
|
+ // return false;
|
|
|
|
+ // }
|
|
// SPDLOG_LOGGER_TRACE(m_logger,"初始化WebApi成功!");
|
|
// SPDLOG_LOGGER_TRACE(m_logger,"初始化WebApi成功!");
|
|
- QString serverList;
|
|
|
|
- ret = m_httpApi->DBQGetServerList(serverList);
|
|
|
|
|
|
+ /* 获取服务器列表 */
|
|
|
|
+ char serverList[8192];
|
|
|
|
+ ret = m_httpApi->DBGetServerList(serverList, 8192);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
- SPDLOG_LOGGER_DEBUG(m_logger,"Get server list failed:{}, error info:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
|
|
|
|
+ SPDLOG_LOGGER_DEBUG(m_logger,"Get server list failed:{}, error info:{}",ret, m_httpApi->DoGetLastError(&ret).toStdString());
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- SPDLOG_LOGGER_TRACE(m_logger,"Server list:{}",serverList.toStdString());
|
|
|
|
|
|
+ SPDLOG_LOGGER_TRACE(m_logger,"Server list:{}", serverList);
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"WebAPI Sucess!");
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"WebAPI Sucess!");
|
|
/* 登录,第二个参数是限制的服务 */
|
|
/* 登录,第二个参数是限制的服务 */
|
|
- ret = m_httpApi->DBQLogin(serverIP, serID, "SPSS", m_userToken);
|
|
|
|
|
|
+ ret = m_httpApi->DBLogin(serverIP, serID, "SPSS", m_userToken);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_ERROR(m_logger,"Login failed:{}, error info:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_ERROR(m_logger,"Login failed:{}, error info:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -106,7 +113,7 @@ bool ToEQMDataBase::writeAlgorithmInfo(std::vector<AlgorithmInfo>& vecInfo)
|
|
json1["actionTaskID"] = it.ActionTaskID; /* 算法类型 */
|
|
json1["actionTaskID"] = it.ActionTaskID; /* 算法类型 */
|
|
json0["paramList"] = json1;
|
|
json0["paramList"] = json1;
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
- int ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, retStr);
|
|
|
|
|
|
+ int ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, retStr);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"写入tAction失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"写入tAction失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -135,7 +142,7 @@ bool ToEQMDataBase::deleteAlgorithmInfo(std::vector<AlgorithmInfo>& vecDeleteInf
|
|
json0["paramList"] = json1;
|
|
json0["paramList"] = json1;
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- int ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Delete, strCmd, strRet);
|
|
|
|
|
|
+ int ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Delete, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"删除tAction失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"删除tAction失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -162,7 +169,7 @@ bool ToEQMDataBase::getAlgorithmInfo(std::vector<AlgorithmInfo>& vecInfo)
|
|
json0["opName"] = "SPSS_SelectFromAction";
|
|
json0["opName"] = "SPSS_SelectFromAction";
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取tAction失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取tAction失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -230,7 +237,7 @@ bool ToEQMDataBase::insertDeviceInfo(std::vector<DeviceInfo>& vecInfo)
|
|
json0["paramList"] = json1;
|
|
json0["paramList"] = json1;
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"插入设备信息失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"插入设备信息失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -251,7 +258,7 @@ bool ToEQMDataBase::insertDeviceInfo(std::vector<DeviceInfo>& vecInfo)
|
|
json0["paramList"] = json1;
|
|
json0["paramList"] = json1;
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"插入设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"插入设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -298,7 +305,7 @@ bool ToEQMDataBase::updateDeviceInfo(std::vector<DeviceInfo>& vecUpdateInfo)
|
|
json0["paramList"] = json1;
|
|
json0["paramList"] = json1;
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Update, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Update, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"更新设备信息失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"更新设备信息失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -336,7 +343,7 @@ bool ToEQMDataBase::deleteDeviceInfo(std::vector<DeviceInfo>& vecDeleteInfo)
|
|
json0["paramList"] = json1;
|
|
json0["paramList"] = json1;
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Delete, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Delete, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"删除设备信息失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"删除设备信息失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -362,7 +369,7 @@ bool ToEQMDataBase::getDeviceInfo(std::vector<DeviceInfo>& vecInfo)
|
|
json0["opName"] = "SPSS_SelectFromCamerInfo";
|
|
json0["opName"] = "SPSS_SelectFromCamerInfo";
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取CamerInfo失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取CamerInfo失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -435,7 +442,7 @@ bool ToEQMDataBase::insertDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo)
|
|
json0["paramList"] = json1;
|
|
json0["paramList"] = json1;
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"插入设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"插入设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -466,7 +473,7 @@ bool ToEQMDataBase::updateDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo)
|
|
json0["paramList"] = json1;
|
|
json0["paramList"] = json1;
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Delete, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Delete, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"删除设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"删除设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -488,7 +495,7 @@ bool ToEQMDataBase::updateDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo)
|
|
json0["paramList"] = json1;
|
|
json0["paramList"] = json1;
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"插入设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"插入设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -521,7 +528,7 @@ bool ToEQMDataBase::deleteDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo)
|
|
json0["paramList"] = json1;
|
|
json0["paramList"] = json1;
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Delete, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Delete, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"删除设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"删除设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -554,7 +561,7 @@ bool ToEQMDataBase::deleteDeviceAlgorithmInfo(std::list<int>& vecID)
|
|
json0["paramList"] = json1;
|
|
json0["paramList"] = json1;
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Delete, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Delete, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"删除设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"删除设备信息到tActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -586,7 +593,7 @@ bool ToEQMDataBase::getDeviceAlgorithmInfo(std::vector<DeviceInfo>& vecInfo, std
|
|
json0["opName"] = "SPSS_SelectFromActionCamer";
|
|
json0["opName"] = "SPSS_SelectFromActionCamer";
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取ActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取ActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -684,7 +691,7 @@ bool ToEQMDataBase::getActionInfo(ListActionInfo& listInfo)
|
|
json0["opName"] = "SPSS_SelectFromActionInfo";
|
|
json0["opName"] = "SPSS_SelectFromActionInfo";
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取ActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取ActionCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -744,7 +751,7 @@ bool ToEQMDataBase::getRoomCameraInfo(std::list<RoomCameraInfo>& vecInfo)
|
|
json0["opName"] = "SPSS_SelectRoomCamer";
|
|
json0["opName"] = "SPSS_SelectRoomCamer";
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取RoomCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取RoomCamer失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -849,7 +856,7 @@ bool ToEQMDataBase::insertAlarmInfo(const AlarmInfo& alarmInfo)
|
|
json0["paramList"] = json1;
|
|
json0["paramList"] = json1;
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_WARN(m_logger,"插入报警信息失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_WARN(m_logger,"插入报警信息失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -880,7 +887,7 @@ bool ToEQMDataBase::updateAlarmEndTime(const AlarmInfo& alarmInfo)
|
|
|
|
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- int ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Update, strCmd, strRet);
|
|
|
|
|
|
+ int ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Update, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_WARN(m_logger,"更新报警结束时间失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_WARN(m_logger,"更新报警结束时间失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -897,7 +904,7 @@ bool ToEQMDataBase::getAlarmRuleInfo(std::vector<AlarmRuleInfo>& vecInfo)
|
|
json0["opName"] = "SPSS_SelectFromAlarmRule";
|
|
json0["opName"] = "SPSS_SelectFromAlarmRule";
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取AlarmRule失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取AlarmRule失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -956,7 +963,7 @@ bool ToEQMDataBase::getAlarmAppInfo(std::list<AppAndTimeInfo>& listInfo)
|
|
json0["opName"] = "SPSS_SelectPeriod";
|
|
json0["opName"] = "SPSS_SelectPeriod";
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取AlarmApp失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_DEBUG(m_logger,"获取AlarmApp失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
@@ -1045,7 +1052,7 @@ bool ToEQMDataBase::insertOnWorkInfo(const RoomFaceInfo& onWorkInfo)
|
|
|
|
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strCmd = QString::fromStdString(json0.dump());
|
|
QString strRet;
|
|
QString strRet;
|
|
- auto ret = m_httpApi->DBQDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, strRet);
|
|
|
|
|
|
+ auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Insert, strCmd, strRet);
|
|
if(ret < 0)
|
|
if(ret < 0)
|
|
{
|
|
{
|
|
SPDLOG_LOGGER_WARN(m_logger,"插入在岗信息失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|
|
SPDLOG_LOGGER_WARN(m_logger,"插入在岗信息失败:{}, 错误信息:{}",ret,m_httpApi->DoGetLastError(&ret).toStdString());
|