From 291dbcd9331cd0df41addef74defa4654ee034fb Mon Sep 17 00:00:00 2001
From: chenshijun <csj_sky@126.com>
Date: 星期一, 22 四月 2019 15:59:20 +0800
Subject: [PATCH] 增加人员异常的参数处理

---
 QiaoJiaSystem/DataManagerServer/http_configserver.h |  159 +++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 137 insertions(+), 22 deletions(-)

diff --git a/QiaoJiaSystem/DataManagerServer/http_configserver.h b/QiaoJiaSystem/DataManagerServer/http_configserver.h
index 2c8e5ed..98399e4 100644
--- a/QiaoJiaSystem/DataManagerServer/http_configserver.h
+++ b/QiaoJiaSystem/DataManagerServer/http_configserver.h
@@ -20,6 +20,8 @@
 #include "../FaceSearchServer/CasiaFaceWrapper/CasiaFaceWrapperN.h"
 #include "AppPipeController.h"
 
+#include <NsqMsgTool.hpp>
+
 typedef std::shared_ptr<HttpServer::Response> PResponse;
 
 
@@ -76,42 +78,153 @@
     std::string netconfig_show(std::string ip, unsigned int port, std::string content, PResponse &response);
 
 
+    /***
+     * 鍒涘缓闆嗙兢鑺傜偣
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string addNode(std::string ip, unsigned int port, std::string content, PResponse &response);
 
+    /***
+     * 鏌ヨ鍦ㄧ嚎鑺傜偣
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string searchNode(std::string ip, unsigned int port, std::string content, PResponse &response);
 
     std::string modifyCluName(std::string ip, unsigned int port, std::string content, PResponse &response);
 
+    /***
+     * 閫�鍑洪泦缇�
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string removeNode(std::string ip, unsigned int port, std::string content, PResponse &response);
 
+    /**
+     *鍒涘缓鏁版嵁搴曞簱
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string createDatabase(std::string ip, unsigned int port, std::string content, PResponse &response);
 
+    /**
+     * 鍒犻櫎鏁版嵁 搴曞簱
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string deleteDatabase(std::string ip, unsigned int port, std::string content, PResponse &response);
 
+    /***
+     * 鏇存柊鏁版嵁 搴曞簱
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string updateDatabase(std::string ip, unsigned int port, std::string content, PResponse &response);
 
+    /**
+     * 鏌ヨ鎵�鏈夊悓姝ュ簱
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string findAllDatabase(std::string ip, unsigned int port, std::string content, PResponse &response);
 
+    /**
+     * 鏌ヨ鎵�鏈夋湰鍦板簱
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string findLocalDatabase(std::string ip, unsigned int port, std::string content, PResponse &response);
 
+    /***
+     * 涓婁紶浜哄憳
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string addPerson(std::string ip, unsigned int port, std::string content, PResponse &response);
 
+    //#todo 鎵归噺娣诲姞浜哄憳鍊熷彛
+
+    /***
+     * 鍚戝悓姝ュ簱鎵归噺娣诲姞浜哄憳鍙婃洿鏂颁汉鍛�
+     * feature_addPersonTracking 鍒嗘敮涓洿鏂板姛鑳藉垎绂讳负鏂板�熷彛
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string addPersons(std::string ip, unsigned int port, std::string content, PResponse &response);
 
+    /***
+     * 鍒ゆ柇鍚屾搴撲腑浜哄憳鏄惁瀛樺湪
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string personIsExists(std::string ip, unsigned int port, std::string content, PResponse &response);
 
+    /**
+     * 鏇存柊鍚屾搴撲腑鐨勪汉鍛�
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string updatePersonByOldId(std::string ip, unsigned int port, std::string content, PResponse &response);
 
-
+    /**
+     * 鍒犻櫎浜哄憳
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string delPerson(std::string ip, unsigned int port, std::string content, PResponse &response);
 
+    /**
+     * 鍔犺浇鐗瑰緛
+     * @param ip
+     * @param port
+     * @param content
+     * @param response
+     * @return
+     */
     std::string loadFaceFeaData(std::string ip, unsigned int port, std::string content, PResponse &response);
 
-  
+
     std::string getAlarmImageFromVideoFile(std::string ip, unsigned int port, std::string content, PResponse &response);
-
-
-   
 
 
     std::string getRecordVideoPath(std::string ip, unsigned int port, std::string content, PResponse &response);
@@ -154,6 +267,10 @@
 
     FastFdsWithLock fdfsClient;
 
+    //nsq
+    BasicMsg::Nsq::NsqMsgProducer *nsqMsgProducer;
+
+
     bool getDevSerialNumber(const char *ip, const int port, const char *username, \
                             const char *passwd, const char *brand, unsigned char *serialNumber) const;
 
@@ -181,34 +298,32 @@
                               unsigned char *serialNumber = NULL) const;
 
     bool createDevId(const int &dev_batch, const int &dev_sequence);
-    
-    
-    //std::string getVideoPathByTime(const std::string &strImageName, const std::string &camId, qint64 &sub);
-    //std::string getVideoPathByTime2(const std::string &strImageName, const std::string &camId, qint64 &sub);
+
+
     std::vector<std::string> forEachFile(const std::string &dir_name);
 
     qint64 getVideoTime(/*const std::string& videoPath*/std::string &str_tmpTime);
 
 
-    //鏍规嵁PicDate杩涜鐩稿叧鐨勬搷浣�
-    std::string getAlarmImageFromVideoFileByPicDate(const std::string& devId,const std::string& picDate,
-                                                        PResponse &response);
+    //鏍规嵁PicDate鑾峰彇鎶ヨ鍥�
+    std::string getAlarmImageByPicDateAndDevId(const std::string &picDate, const std::string &devId,
+                                               PResponse &response);
 
-    std::string getAlarmImageFromVideoFileByImageKey(const std::string& devId,const std::string& imgKey,
-                                                        PResponse &response);
+    //鏍规嵁ImgKey鑾峰彇鎶ヨ鍥�
+    std::string getAlarmImageByImageKeyAndDevId(const std::string &imgKey, const std::string &devId,
+                                                PResponse &response);
 
-    std::string getRecordVideoPathNew(std::string ip, unsigned int port, std::string content, PResponse &response);
+    //鏍规嵁PicData鑾峰彇瑙嗛璺緞
+    std::string getVideoPathByPicDate(const std::string &picDate, const std::string &camId, qint64 &sub);
 
-    std::string getAlarmImageFromVideoFile2(std::string ip, unsigned int port, std::string content, PResponse &response);
+    //鏍规嵁ImgKey鑾峰彇瑙嗛鐨勮矾寰�
+    std::string getVideoPathByImgKey(const std::string &imgKey, const std::string &camId);
 
-    std::string getVideoPathByPicDate(const std::string &time, const std::string &camId, qint64 &sub);
-    //鏍规嵁ImageKey鑾峰彇瑙嗛鐨勮矾寰�
-    std::string getVideoPathByImgKey(const std::string &strImageName, const std::string &camId);
-
-    //std::string getVideoPathByTimeByPicDate(const std::string &time, const std::string &camId, qint64 &sub);
+    //鑾峰彇dir_name涓嬬殑鎵�鏈夋枃浠�,甯︽墿灞曞悕
     std::vector<std::string> forEachFileByImgKey(const std::string &dir_name);
 
-    std::string GetVideoByImgKey(const std::string strImageName,const std::string& strPath);
+    //鏍规嵁ImgKey鑾峰彇瑙嗛鍚�
+    std::string GetVideoNameByImgKey(const std::string &imgKey, const std::string &strPath);
 
 };
 

--
Gitblit v1.8.0