QiaoJiaSystem/DataManagerServer/http_configserver.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
QiaoJiaSystem/DataManagerServer/vss/controller/CamDevController.h | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
QiaoJiaSystem/DataManagerServer/vss/dao/BaseDao.h | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
QiaoJiaSystem/DataManagerServer/vss/dao/CamDevSqliteDao.h | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
QiaoJiaSystem/DataManagerServer/vss/dao/VssDevTblDao.h | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
QiaoJiaSystem/VideoServer/QiaoJia/DB/DBStruct.h | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
QiaoJiaSystem/VideoServer/QiaoJia/DB/LDBTool.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
QiaoJiaSystem/DataManagerServer/http_configserver.cpp
@@ -1052,7 +1052,7 @@ if ((!ret) || (serialnumber[0] == 0)) { return "{\"ret_status\": \"内容有误,请检查!\"}"; } rec.type = 0; rec.str_cam_dev_id = QString::fromLatin1((const char *) serialnumber);//摄像机id cam_mac rec.str_name = QString::fromStdString(value["str_name"].asString()); rec.str_addr = QString::fromStdString(value["str_addr"].asString()); QiaoJiaSystem/DataManagerServer/vss/controller/CamDevController.h
@@ -321,6 +321,8 @@ Json::Value typeJsonValue = requestJsonValue[CamDev_type]; if (typeJsonValue.type() != Json::ValueType::nullValue) { camDevBuilder.addtype((typeJsonValue.asString())); } else { camDevBuilder.addtype("1"); } responseJsonValue["message"] = "查询成功!"; responseJsonValue["success"] = "true"; @@ -402,6 +404,8 @@ Json::Value typeJsonValue = requestJsonValue[CamDev_type]; if (typeJsonValue.type() != Json::ValueType::nullValue) { camDevBuilder.addtype((typeJsonValue.asString())); } else { camDevBuilder.addtype("1"); } responseJsonValue["message"] = "查询成功!"; responseJsonValue["success"] = "true"; QiaoJiaSystem/DataManagerServer/vss/dao/BaseDao.h
@@ -98,6 +98,7 @@ rowList.append(row); } } else { cout << "error " <<query.error() << endl; cout << "query failed" << endl; } return rowList; @@ -131,6 +132,7 @@ return updateSql; } static void doConnect() { cout << "db_host=" << appConfig.getStringProperty("db_host").c_str() << endl; if (conn->connect( appConfig.getStringProperty("database").c_str(), appConfig.getStringProperty("db_host").c_str(), QiaoJiaSystem/DataManagerServer/vss/dao/CamDevSqliteDao.h
@@ -4,6 +4,7 @@ #include "../model/CamDev.h" #include "BaseSqliteDao.h" #include <qsqlfield.h> #define CamDev_TABLE_NAME "cam_dev" QiaoJiaSystem/DataManagerServer/vss/dao/VssDevTblDao.h
@@ -3,7 +3,9 @@ #define VSSDEVTBL_MANAGER_H #include "../model/VssDevTbl.h" #include "VssChannelTblDao.h" #include "BaseDao.h" #include "CamDevSqliteDao.h" #define VSSDevTbl_TABLE_NAME "VSSDevTbl" @@ -37,6 +39,19 @@ /** 删除创建一级设备表 whereColumnNameValues 列名和列值对条件 */ bool deleteVssDevTbl(std::map<std::string, std::string>& whereKeyValues) { QMutexLocker mutexLocker(&m_mutexVisit); vector<map<string, string>> devRowDataList = findList(string("select * from ") + VSSDevTbl_TABLE_NAME + " where 1=1 " + getWhereColumnNameValuePair(whereKeyValues)); if (devRowDataList.size() > 0) { auto DevPubID = devRowDataList.at(0)[VssDevTbl_DevPubID]; vector<map<string, string>> channelRowDataList = findList(string("select * from ") + VSSChannelTbl_TABLE_NAME + " where 1=1 AND DevPubID='"+DevPubID+"'"); for (auto channelRowData : channelRowDataList) { auto ChanPubID = channelRowData[VssChannelTbl_ChanPubID]; CamDevSqliteDao::instance()->deleteByColumn(CamDev_cam_dev_id, ChanPubID); } CamDevSqliteDao::instance()->deleteByColumn(CamDev_cam_dev_id, DevPubID); } return del(VSSDevTbl_TABLE_NAME, whereKeyValues); } QiaoJiaSystem/VideoServer/QiaoJia/DB/DBStruct.h
@@ -61,6 +61,7 @@ str_brand = ""; str_reserved = ""; n_type = -1; type = -1; } int n_id;//自增id @@ -76,6 +77,7 @@ QString str_brand;//摄像机品牌 QString str_reserved;//预留 int n_type;//预留 int type;// 0 rtsp, 1 gb28181 }; struct Record_Cam_Chn { QiaoJiaSystem/VideoServer/QiaoJia/DB/LDBTool.cpp
@@ -500,7 +500,7 @@ std::list<Record_Cam_Dev> lst; QSqlTableModel pModel(NULL, m_db); pModel.setTable("cam_dev"); pModel.setFilter(QObject::tr("cam_dev_id != '' and cam_dev_id is not null")); pModel.setFilter(QObject::tr("cam_dev_id != '' and cam_dev_id is not null and type='0'")); pModel.setEditStrategy(QSqlTableModel::OnManualSubmit);//OnManualSubmit OnFieldChange pModel.select();