| | |
| | | import java.util.Set;
|
| | |
|
| | | import cn.com.basic.face.base.BaseApplication;
|
| | | import cn.com.basic.face.base.MainActivity;
|
| | | import cn.com.basic.face.discern.common.BaseCommonCallBack;
|
| | | import cn.com.basic.face.discern.common.CommonVariables;
|
| | | import cn.com.basic.face.discern.query.item.SurveillanceQueryItem;
|
| | |
| | | @Override
|
| | | public void run() {
|
| | | try {
|
| | | List prevList = SurveillanceMng.getInstance().removeTimeoutItem(null);
|
| | | SurveillanceMng.getInstance().registerTopAndCheckInBottom(prevList);
|
| | | SurveillanceFragment.getInstance().get_fragment_supervisory_bottom_visitor_list_view().show(prevList);
|
| | | Thread.sleep(1000*60*10);
|
| | | while (true) {
|
| | | MainActivity.getInstance().runOnUiThread(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | List prevList = SurveillanceMng.getInstance().removeTimeoutItem(null);
|
| | | SurveillanceMng.getInstance().registerTopAndCheckInBottom(prevList);
|
| | | SurveillanceFragment.getInstance().get_fragment_supervisory_bottom_visitor_list_view().show(prevList);
|
| | | }
|
| | | });
|
| | | Thread.sleep(1000*60*5);
|
| | | }
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | if (item.getRegisterOrCheckIn() == CommonVariables.Surveillance.VISIT_REGISTER_ITEM_TYPE) {
|
| | | Date now = new Date();
|
| | | Date createTime = item.getCreateTime();
|
| | | long minutes = (now.getTime() - createTime.getTime()) / 1000 / 60;
|
| | | if (minutes*1.0 / 10 >= 1) {
|
| | | long secs = (now.getTime() - createTime.getTime()) / 1000 ;
|
| | | if (secs*1.0 / 60*5 >= 1) {
|
| | | continue;
|
| | | }
|
| | | newPrevList.add(item);
|
| | |
| | | if (type == CommonVariables.Surveillance.VISIT_REGISTER_ITEM_TYPE
|
| | | || type == CommonVariables.Surveillance.VISIT_CHECK_IN_ITEM_TYPE
|
| | | ) {
|
| | | item.setCreateTime(new Date());
|
| | | newVisitorList.add(0, item);
|
| | | if (i < bitmapList.size()) {
|
| | | SurveillanceQueryItem surveillanceQueryItem = bitmapList.get(i);
|