| | |
| | | file.setFieldName("event_type"); |
| | | file.setFieldValue("131588");//安防告警 |
| | | file.setType("in"); |
| | | if(type == 1){ |
| | | |
| | | }else if(type == 1){ |
| | | |
| | | } |
| | | request.getFiledOptions().add(file); |
| | | SortRequest sort = new SortRequest(); |
| | | sort.setSortField("happen_time"); |
| | |
| | | VisitDataVO result = new VisitDataVO(); |
| | | result.setWaitVisitNum(visitsJoinMapper.selectCount(new MPJLambdaWrapper<Visits>() |
| | | .eq(Visits::getIsdeleted,Constants.ZERO) |
| | | .apply("to_days(create_date)=to_days(now()") |
| | | .in(Visits::getStatus,Constants.VisitStatus.pass,Constants.VisitStatus.xfSuccess )));//待访问 |
| | | result.setWaitVisitNum(visitsJoinMapper.selectCount(new MPJLambdaWrapper<Visits>() |
| | | .eq(Visits::getIsdeleted,Constants.ZERO) |
| | | .apply("to_days(create_date)=to_days(now()") |
| | | .in(Visits::getStatus,Constants.VisitStatus.signout,Constants.VisitStatus.signin )));//已登记 |
| | | result.setWaitVisitNum(visitsJoinMapper.selectCount(new MPJLambdaWrapper<Visits>() |
| | | .eq(Visits::getIsdeleted,Constants.ZERO) |
| | | .apply("to_days(create_date)=to_days(now()") |
| | | .in(Visits::getStatus,Constants.VisitStatus.signout )));//已签离 |
| | | PageWrap<Visits> pageWrap = new PageWrap<>(); |
| | | /*PageWrap<Visits> pageWrap = new PageWrap<>(); |
| | | pageWrap.setCapacity(10); |
| | | pageWrap.setPage(1); |
| | | pageWrap.setModel(new Visits()); |
| | |
| | | list.add(data); |
| | | } |
| | | result.setRetentionNum(visitsPageData.getTotal()); |
| | | }*/ |
| | | |
| | | String code= systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.TIMEOUT_WARNING).getCode(); |
| | | MPJLambdaWrapper<Visits> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(Visits.class); |
| | | queryWrapper.selectAs(Member::getName,Visits::getReceptMemberName); |
| | | queryWrapper.select("TIMESTAMPDIFF( MINUTE, NOW(), t.OUT_DATE) AS timeOut"); |
| | | queryWrapper.selectAs(Company::getName,Visits::getReceptMemberDepartment); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,Visits::getReceptMemberId); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId); |
| | | queryWrapper.leftJoin(" member m on m.id= t.MEMBER_ID"); |
| | | queryWrapper.eq(Visits::getStatus,Constants.VisitStatus.signin); |
| | | queryWrapper.apply(" TIMESTAMPDIFF( MINUTE, NOW(), t.OUT_DATE) <= "+code+" "); |
| | | queryWrapper.ne("m.type ",Constants.TWO); |
| | | queryWrapper.eq(Visits::getIsdeleted,Constants.ZERO); |
| | | queryWrapper.orderByDesc(Visits::getEditDate); |
| | | List<Visits> vr = visitsJoinMapper.selectList(queryWrapper); |
| | | result.setVisitRetentionDataList(new ArrayList<>());//访客滞留数据集合 |
| | | if(vr!=null&&vr!=null){ |
| | | vr.stream().forEach(s ->{ |
| | | VisitRetentionDataVO t = new VisitRetentionDataVO(); |
| | | t.setName(s.getName()); |
| | | t.setCompanyName(s.getCompanyName()); |
| | | t.setTimeOutMinute(s.getTimeOut()); |
| | | result.getVisitRetentionDataList().add(t); |
| | | }); |
| | | } |
| | | result.setVisitRetentionDataList(list);//访客滞留数据集合 |
| | | return result; |
| | | |
| | | } |
| | | @Override |
| | | public SecurityBoardVO centerSecurityData(){ |
| | | |
| | | |
| | | SecurityBoardVO data = new SecurityBoardVO(); |
| | | getParkingCarsNum(data);//获取车位数据 |
| | |
| | | (int) retentionList.stream().filter(i->!Constants.equalsInteger(i.getType(),Constants.THREE)).count() |
| | | ); |
| | | //在园长期相关方人数 |
| | | data.setInternalTotal( |
| | | data.setRelatedTotal( |
| | | (int) retentionList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.TWO) && Constants.equalsInteger(i.getCompanyType(),Constants.ZERO)).count() |
| | | ); |
| | | //在园内部员工人数 |
| | | data.setInternalTotal( |
| | | (int) retentionList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.TWO) && Constants.equalsInteger(i.getCompanyType(),Constants.ONE)).count() |
| | | ); |
| | | //在园访客数量 |
| | | data.setVisitTotal( |
| | | (int) retentionList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&Objects.isNull(i.getCompanyType())).count() |