| | |
| | | subJson.append("\"uuid\":\"" + item.second.uuid + "\","); |
| | | subJson.append("\"tableName\":\"" + TableName + "\","); |
| | | subJson.append("\"idcard\":\"" + t_faceInfoCache[item.second.uuid].idCard + "\","); |
| | | subJson.append("\"enable\":\"" + item.second.enable + "\","); |
| | | subJson.append("\"enable\":\"" + t_faceInfoCache[item.second.uuid].enable + "\","); |
| | | subJson.append("\"monLevel\":\"" + t_faceInfoCache[item.second.uuid].monLevel + "\","); |
| | | subJson.append("\"imgUrl\":\"" + item.second.faceurl + "\""); |
| | | // subJson.append("\"feature\":\"" + item.second.feature + "\","); |
| | | //#todo modifysvn upda svn comm |
| | |
| | | memcpy(t_feas.faceFeature.data(), t_fea.data(), t_fea.size()); |
| | | // string create_time = query.value(2).toString().toStdString(); |
| | | t_feas.faceurl = query.value(3).toString().toStdString(); |
| | | t_feas.enable = query.value(5).toString().toStdString(); |
| | | } |
| | | } |
| | | } |
| | |
| | | std::string faceurl; |
| | | FaceFeature faceFeature; |
| | | std::string enable; |
| | | std::string monLevel; |
| | | }; |
| | | |
| | | typedef std::map<std::string, FaceFeatureWithUrl> FeatureDBWithUrlCache; |
| | |
| | | std::string getFacesFromTableSql(std::string tableName) { |
| | | // #todo get monLevel 联合查询 |
| | | std::string sql = |
| | | "select uuid,feature,create_time,faceUrl,del_flag,enabled from '" + tableName + |
| | | "select uuid,feature,create_time,faceUrl,del_flag from '" + tableName + |
| | | "_fea' where feature is not null "; |
| | | return sql; |
| | | } |
| | |
| | | } |
| | | if (str_tableUuid.size() > 0) { |
| | | QString sql = QString::fromStdString( |
| | | "Select a.uuid as id ,a.faceUrl as img,a.feature,b.idCard as idcard,a.enable,a.monitorLevel from '" + str_tableUuid + |
| | | "Select a.uuid as id ,a.faceUrl as img,a.feature,b.idCard as idcard,b.enable,b.monitorLevel from '" + |
| | | str_tableUuid + |
| | | "_fea' as a ,'" + str_tableUuid + "' as b where a.uuid = b.uuid and ( a.del_flag=0 AND b.del_flag=0);"); |
| | | QSqlQuery query(g_syncDbFile); |
| | | query.prepare(sql); |