Stringsql="select unid,person_unid,channel_serialnum,body_pic,countdate,counttime,direction,gate_id from d_face_recognition where countdate=? and mall_id=?";
Stringsql="select unid,person_unid,channel_serialnum,body_pic,countdate,counttime,direction,gate_id from d_face_recognition where countdate=? and mall_id=?";
//方向过滤
//方向过滤
if(StringUtils.isNotBlank(direction)){
if(StringUtils.isNotBlank(direction)){
...
@@ -83,15 +83,27 @@ public class KeliuRepository {
...
@@ -83,15 +83,27 @@ public class KeliuRepository {
sql=sql+" and channel_serialnum in ("+sb.toString()+")";
sql=sql+" and channel_serialnum in ("+sb.toString()+")";
}
}
if(StringUtils.isNotBlank(d2SerialNum)){
String[]channels=d2SerialNum.split(",");
StringBuildersb=newStringBuilder();
for(Stringchannel:channels){
if(sb.length()>0){
sb.append(",");
}
sb.append("'");
sb.append(channel);
sb.append("'");
}
sql=sql+" and person_unid in(select distinct person_unid from d_face_recognition where device_serialnum in("+sb.toString()+"))";
}
if(startTime!=null){
if(startTime!=null){
sql=sql+" and counttime >= '"+DateUtil.format("yyyy-MM-dd HH:mm:ss",startTime)+"'";
sql=sql+" and counttime >= '"+DateUtil.format("yyyy-MM-dd HH:mm:ss",startTime)+"'";
}
}
if(endTime!=null){
if(endTime!=null){
sql=sql+" and counttime <= '"+DateUtil.format("yyyy-MM-dd HH:mm:ss",endTime)+"'";
sql=sql+" and counttime <= '"+DateUtil.format("yyyy-MM-dd HH:mm:ss",endTime)+"'";