privateStringSITE_SQL_PERSON_QUERY="select person_unid,mall_id,person_type,min(counttime) as counttime,max(mood) as mood from d_face_recognition where countdate=? and direction=1 and account_id=? and gate_id in (select id from b_gate where is_mall_gate=1) \ngroup by mall_id,person_unid,person_type order by mall_id,counttime ";
privateStringSITE_SQL_PERSON_QUERY="select person_unid,mall_id,person_type,min(counttime) as counttime,max(mood) as mood from d_face_recognition where countdate=? and direction=1 and account_id=? and invalid=0 and gate_id in (select id from b_gate where is_mall_gate=1) \ngroup by mall_id,person_unid,person_type order by mall_id,counttime ";
privateStringSITE_SQL_MALL_QUERY="select id,name from b_mall where account_id=? and status=1 order by id";
privateStringSITE_SQL_MALL_QUERY="select id,name from b_mall where account_id=? and status=1 order by id";
privateStringSQL_QUERY_PERSON_BY_MALL_ID="select person_unid as personUnid,mall_id as mallId,person_type as personType,min(counttime) as countTime,max(mood) as mood from d_face_recognition where countdate=? and direction=1 and mall_id=? and gate_id in (select id from b_gate where mall_id = ? and is_mall_gate=1) group by mall_id,person_unid,person_type order by mall_id,counttime";
privateStringSQL_QUERY_PERSON_BY_MALL_ID="select person_unid as personUnid,mall_id as mallId,person_type as personType,min(counttime) as countTime,max(mood) as mood from d_face_recognition where countdate=? and direction=1 and mall_id=? and invalid=0 and gate_id in (select id from b_gate where mall_id = ? and is_mall_gate=1) group by mall_id,person_unid,person_type order by mall_id,counttime";
Stringsql="select account_id,mall_id,gate_id,person_unid,direction,countdate as countDate,"+
Stringsql="select account_id,mall_id,gate_id,person_unid,direction,countdate as countDate,"+
"counttime as countTime from d_face_recognition "+
"counttime as countTime from d_face_recognition "+
"where mall_id = :mallId and countdate between :startDate and :endDate and counttime >= :startTime and counttime < :endTime and gate_id in(:gateIds) "+
"where mall_id = :mallId and countdate between :startDate and :endDate and counttime >= :startTime and counttime < :endTime and invalid=0 and gate_id in(:gateIds) "+
"and person_type = 0 and direction in(-1,1,6) order by person_unid asc,counttime asc;";
"and person_type = 0 and direction in(-1,1,6) order by person_unid asc,counttime asc;";
Map<String,Object>queryMap=newHashMap<>();
Map<String,Object>queryMap=newHashMap<>();
queryMap.put("mallId",mallId);
queryMap.put("mallId",mallId);
...
@@ -63,11 +63,11 @@ public class FaceRecognitionDao {
...
@@ -63,11 +63,11 @@ public class FaceRecognitionDao {
Stringsql="select account_id,mall_id,gate_id,person_unid,direction,track_time,countdate as countDate,person_type,age,gender,"+
Stringsql="select account_id,mall_id,gate_id,person_unid,direction,track_time,countdate as countDate,person_type,age,gender,"+
"counttime as countTime from d_face_recognition where mall_id = :mallId and countdate between :startDate and :endDate and counttime >= :startTime and counttime < :endTime "+
"counttime as countTime from d_face_recognition where mall_id = :mallId and countdate between :startDate and :endDate and counttime >= :startTime and counttime < :endTime "+
"and direction in(-1,1,6) and person_type = 0 order by person_unid asc, counttime asc;";
"and direction in(-1,1,6) and invalid=0 and person_type = 0 order by person_unid asc, counttime asc;";
StringsqlNoMultipleDay="select account_id,mall_id,gate_id,person_unid,direction,track_time,countdate as countDate,person_type,age,gender,"+
StringsqlNoMultipleDay="select account_id,mall_id,gate_id,person_unid,direction,track_time,countdate as countDate,person_type,age,gender,"+
"counttime as countTime from d_face_recognition where mall_id = :mallId and countdate = :startDate and counttime >= :startTime and counttime < :endTime "+
"counttime as countTime from d_face_recognition where mall_id = :mallId and countdate = :startDate and counttime >= :startTime and counttime < :endTime "+
"and direction in(-1,1,6) and person_type = 0 order by person_unid asc, counttime asc;";
"and direction in(-1,1,6) and invalid=0 and person_type = 0 order by person_unid asc, counttime asc;";