Commit f120a736 by 毛树良

[chg]:增加过滤掉无效抓拍,注意report有flyway

1 parent 377cf53b
...@@ -26,10 +26,10 @@ public class DataCountDao { ...@@ -26,10 +26,10 @@ public class DataCountDao {
@Resource @Resource
private JdbcTemplate jdbcTemplate; private JdbcTemplate jdbcTemplate;
private static final Logger logger = LoggerFactory.getLogger(DataCountDao.class); private static final Logger logger = LoggerFactory.getLogger(DataCountDao.class);
private String SITE_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 "; private String SITE_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 ";
private String SITE_SQL_MALL_QUERY = "select id,name from b_mall where account_id=? and status=1 order by id"; private String SITE_SQL_MALL_QUERY = "select id,name from b_mall where account_id=? and status=1 order by id";
private String SQL_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"; private String SQL_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";
public List<PersonVo> get_person(Date countdate, Integer accountid) { public List<PersonVo> get_person(Date countdate, Integer accountid) {
return this.jdbcTemplate.query(this.SITE_SQL_PERSON_QUERY, new Object[]{countdate, accountid}, new BeanPropertyRowMapper(PersonVo.class)); return this.jdbcTemplate.query(this.SITE_SQL_PERSON_QUERY, new Object[]{countdate, accountid}, new BeanPropertyRowMapper(PersonVo.class));
......
...@@ -47,7 +47,7 @@ public class FaceRecognitionDao { ...@@ -47,7 +47,7 @@ public class FaceRecognitionDao {
DateTimeParam dateTimeParam = dateTimeParamService.getDateTimeParam(mallId, countDate); DateTimeParam dateTimeParam = dateTimeParamService.getDateTimeParam(mallId, countDate);
String sql = "select account_id,mall_id,gate_id,person_unid,direction,countdate as countDate," + String sql = "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 = new HashMap<>(); Map<String, Object> queryMap = new HashMap<>();
queryMap.put("mallId", mallId); queryMap.put("mallId", mallId);
...@@ -63,11 +63,11 @@ public class FaceRecognitionDao { ...@@ -63,11 +63,11 @@ public class FaceRecognitionDao {
DateTimeParam dateTimeParam = dateTimeParamService.getDateTimeParam(mallId, countDate); DateTimeParam dateTimeParam = dateTimeParamService.getDateTimeParam(mallId, countDate);
String sql = "select account_id,mall_id,gate_id,person_unid,direction,track_time,countdate as countDate,person_type,age,gender," + String sql = "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;";
String sqlNoMultipleDay = "select account_id,mall_id,gate_id,person_unid,direction,track_time,countdate as countDate,person_type,age,gender," + String sqlNoMultipleDay = "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;";
Map<String, Object> queryMap = new HashMap<>(); Map<String, Object> queryMap = new HashMap<>();
queryMap.put("mallId", mallId); queryMap.put("mallId", mallId);
queryMap.put("startDate", dateTimeParam.getStartDate()); queryMap.put("startDate", dateTimeParam.getStartDate());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!