|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private InoutDayCountMapper inoutDayCountMapper; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private InoutRecordMapper inoutRecordMapper; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private CarEventMapper carEventMapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | 
|---|
|  |  |  | if (erpVisitDTO.getEndtime().getTime() <= erpVisitDTO.getStarttime().getTime()) { | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,预约结束时间必须大于开始时间!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Constants.equalsInteger(Constants.ZERO, erpVisitDTO.getIdcardType()) && erpVisitDTO.getIdcardNo().length() != 18 | 
|---|
|  |  |  | if (StringUtils.isNotBlank(erpVisitDTO.getIdcardNo()) && Constants.equalsInteger(Constants.ZERO, erpVisitDTO.getIdcardType()) && erpVisitDTO.getIdcardNo().length() != 18 | 
|---|
|  |  |  | //&&!IdcardUtil.isValidCard(visits.getIdcardNo()) | 
|---|
|  |  |  | ){ | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,身份证号码有误,请核实后重试!"); | 
|---|
|  |  |  | 
|---|
|  |  |  | getHkDeviceRoles(visits,isERP); | 
|---|
|  |  |  | //检验拜访人是否合法 | 
|---|
|  |  |  | Member visitMember = isValideVisitedUser(visits.getReceptMemberId()); | 
|---|
|  |  |  | if(Constants.equalsInteger(Constants.ZERO, visits.getIdcardType()) | 
|---|
|  |  |  | &&visits.getIdcardNo().length()!=18 | 
|---|
|  |  |  | ){ | 
|---|
|  |  |  | if(StringUtils.isNotBlank(visits.getIdcardNo()) && Constants.equalsInteger(Constants.ZERO, visits.getIdcardType()) | 
|---|
|  |  |  | &&visits.getIdcardNo().length()!=18 ){ | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,身份证号码有误,请核实后重试!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Date date = new Date(); | 
|---|
|  |  |  | 
|---|
|  |  |  | WxPlatNotice wxPlatNotice = new WxPlatNotice(); | 
|---|
|  |  |  | wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz, | 
|---|
|  |  |  | wxNoticeConfigMapper,visits, | 
|---|
|  |  |  | Constants.equalsInteger(visits.getType(),Constants.TWO)?WxPlatConstants.visitReportContent.visitReportUpload:WxPlatConstants.visitContent.visitUpload, | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), | 
|---|
|  |  |  | Constants.equalsInteger(visits.getType(),Constants.TWO)?WxPlatConstants.visitReportContent.visitReportUpload:WxPlatConstants.visitContent.visitUpload, | 
|---|
|  |  |  | Arrays.asList(visits.getOpenid().split(",")) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return visits.getId(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) | 
|---|
|  |  |  | 
|---|
|  |  |  | wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz, | 
|---|
|  |  |  | wxNoticeConfigMapper,visits, | 
|---|
|  |  |  | Constants.equalsInteger(visits.getType(),Constants.TWO)?WxPlatConstants.visitReportContent.visitReportUpload:WxPlatConstants.visitContent.visitUpload, | 
|---|
|  |  |  | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), | 
|---|
|  |  |  | Arrays.asList(systemUser.getOpenid().split(",")) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | if(Constants.equalsInteger(visits.getType(),Constants.ZERO) | 
|---|
|  |  |  | ||  Constants.equalsInteger(visits.getType(),Constants.ONE)){ | 
|---|
|  |  |  | if(  visits.getIdcardType() == null | 
|---|
|  |  |  | ||  StringUtils.isBlank( visits.getIdcardNo() ) || StringUtils.isBlank(visits.getFaceImg()) ){ | 
|---|
|  |  |  | || StringUtils.isBlank(visits.getFaceImg()) ){ | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,信息填写不正确!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | queryWrapper.isNull(Visits::getParentId); | 
|---|
|  |  |  | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getMemberId()),Visits::getMemberId,pageWrap.getModel().getMemberId()); | 
|---|
|  |  |  | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getReceptMemberId()),Visits::getReceptMemberId,pageWrap.getModel().getReceptMemberId()); | 
|---|
|  |  |  | queryWrapper.ge(Objects.nonNull(pageWrap.getModel().getQueryStarttime()),Visits::getStarttime,Utils.Date.getStart(pageWrap.getModel().getQueryStarttime())); | 
|---|
|  |  |  | queryWrapper.le(Objects.nonNull(pageWrap.getModel().getQueryEndtime()),Visits::getStarttime,Utils.Date.getEnd(pageWrap.getModel().getQueryEndtime())); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(Objects.nonNull(pageWrap.getModel().getBusinessStatus())){ | 
|---|
|  |  |  | if(Constants.equalsInteger(pageWrap.getModel().getBusinessStatus(),Constants.TWO)){ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) | 
|---|
|  |  |  | public  void  visitLevelForCarOut(Visits visits){ | 
|---|
|  |  |  | visits.setRemark("跟随访客车辆离园自动签离"); | 
|---|
|  |  |  | visitLevelBiz(visits); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) | 
|---|
|  |  |  | public void  visitLevel(Integer visitId){ | 
|---|
|  |  |  | Visits visits = visitsMapper.selectById(visitId); | 
|---|
|  |  |  | visits.setRemark("平台管理员手动签离成功"); | 
|---|
|  |  |  | visitLevelBiz(visits); | 
|---|
|  |  |  | //产出在场人员信息 | 
|---|
|  |  |  | retentionMapper.delete(new UpdateWrapper<Retention>().lambda() | 
|---|
|  |  |  | .eq(Retention::getType,Constants.memberType.visitor) | 
|---|
|  |  |  | .eq(Retention::getMemberId,visits.getMemberId())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private void visitLevelBiz(Visits visits) { | 
|---|
|  |  |  | if(Objects.isNull(visits)){ | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | request.setOrderId(visits.getHkId()); | 
|---|
|  |  |  | //调用海康强制签离 | 
|---|
|  |  |  | BaseResponse response =  HKService.iccmSignoff(request); | 
|---|
|  |  |  | //        BaseResponse response =  HKService.outVisitAppiontment(request); | 
|---|
|  |  |  | visitsMapper.update(null,new UpdateWrapper<Visits>().lambda().set(Visits::getStatus,Constants.VisitStatus.signout) | 
|---|
|  |  |  | .eq(Visits::getId,visitId)); | 
|---|
|  |  |  | //产出在场人员信息 | 
|---|
|  |  |  | retentionMapper.delete(new UpdateWrapper<Retention>().lambda() | 
|---|
|  |  |  | .eq(Retention::getType,Constants.memberType.visitor) | 
|---|
|  |  |  | .eq(Retention::getMemberId,visits.getMemberId())); | 
|---|
|  |  |  | if(response!=null &&StringUtils.isNotBlank(response.getCode()) && StringUtils.equals(response.getCode(),HKConstants.RESPONSE_SUCCEE)){ | 
|---|
|  |  |  | visitsMapper.update(null,new UpdateWrapper<Visits>().lambda() | 
|---|
|  |  |  | .set(Visits::getStatus,Constants.VisitStatus.signout) | 
|---|
|  |  |  | .set(Visits::getRemark,visits.getRemark()) | 
|---|
|  |  |  | .eq(Visits::getId,visits.getId())); | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"访客签离失败,请刷新重试"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void  visitCancel(Integer visitId){ | 
|---|
|  |  |  | Visits visits = visitsMapper.selectById(visitId); | 
|---|
|  |  |  | 
|---|
|  |  |  | .eq(Notices::getStatus,Constants.ZERO) | 
|---|
|  |  |  | .eq(Notices::getParam2,Constants.ZERO)//待处理 | 
|---|
|  |  |  | .eq(Notices::getObjId,visits.getId()) | 
|---|
|  |  |  | .eq(Notices::getObjType,Constants.equalsInteger(visits.getType(),Constants.ZERO)?Constants.noticesObjectType.visit:Constants.noticesObjectType.visitReporting) | 
|---|
|  |  |  | .eq(Notices::getObjType,!Constants.equalsInteger(visits.getType(),Constants.TWO)? | 
|---|
|  |  |  | Constants.noticesObjectType.visit:Constants.noticesObjectType.visitReporting) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Approve approve = new Approve(); | 
|---|
|  |  |  | 
|---|
|  |  |  | .apply(" DATE(TIME_INFO) = CURDATE()  ") | 
|---|
|  |  |  | .last(" limit 1 ") | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //今日在园人数 | 
|---|
|  |  |  | pcWorkPlatformDataVO.setTodayInParkUserNum( | 
|---|
|  |  |  | retentionList.stream().filter(i->!Constants.equalsInteger(i.getType(),Constants.THREE)).count() | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //在园长期相关方人数 | 
|---|
|  |  |  | pcWorkPlatformDataVO.setInParkLwUserNum( | 
|---|
|  |  |  | retentionList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.TWO) | 
|---|
|  |  |  | && Constants.equalsInteger(i.getCompanyType(),Constants.ZERO)).count() | 
|---|
|  |  |  | retentionList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.FOUR)).count() | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | pcWorkPlatformDataVO.setLwUserInNum(Constants.ZERO); | 
|---|
|  |  |  | pcWorkPlatformDataVO.setLwUserOutNum(Constants.ZERO); | 
|---|
|  |  |  | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | pcWorkPlatformDataVO.setVisitUserNum(Constants.ZERO); | 
|---|
|  |  |  | pcWorkPlatformDataVO.setSignLevelNum(Constants.ZERO); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //在园货运车辆司机 | 
|---|
|  |  |  | pcWorkPlatformDataVO.setInParkDriverUserNum( | 
|---|
|  |  |  | retentionList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.FIVE)&&Objects.isNull(i.getCompanyType())).count()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //在园车辆 | 
|---|
|  |  |  | pcWorkPlatformDataVO.setTodayInParkCarNum( | 
|---|
|  |  |  | 
|---|
|  |  |  | List<InterestedListVO> weekVisitList = new ArrayList<>(); | 
|---|
|  |  |  | List<InterestedListVO> weekCarList = new ArrayList<>(); | 
|---|
|  |  |  | List<InterestedListVO> lwList = new ArrayList<>(); | 
|---|
|  |  |  | List<InterestedListVO> internalList = new ArrayList<>(); | 
|---|
|  |  |  | //查询七天前的访客记录数量 | 
|---|
|  |  |  | List<Visits> visitsList = visitsMapper.selectList(new QueryWrapper<Visits>().lambda().in(Visits::getStatus, | 
|---|
|  |  |  | Constants.VisitStatus.signin,Constants.VisitStatus.signout) | 
|---|
|  |  |  | .apply(" STARTTIME >   CURDATE() - INTERVAL 7 DAY " ) | 
|---|
|  |  |  | //            List<Visits> visitsList = visitsMapper.selectList(new QueryWrapper<Visits>().lambda().in(Visits::getStatus, | 
|---|
|  |  |  | //                    Constants.VisitStatus.signin,Constants.VisitStatus.signout) | 
|---|
|  |  |  | //                    .apply(" STARTTIME >   CURDATE() - INTERVAL 7 DAY " ) | 
|---|
|  |  |  | //            ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<InoutRecord> inoutRecordList = inoutRecordMapper.selectList(new QueryWrapper<InoutRecord>().lambda() | 
|---|
|  |  |  | .eq(InoutRecord::getInOrOut,Constants.ZERO).eq(InoutRecord::getIsdeleted,Constants.ZERO) | 
|---|
|  |  |  | .apply(" TIME_INFO >   CURDATE() - INTERVAL 7 DAY " ) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<CarEvent> carEventList = carEventMapper.selectList(new QueryWrapper<CarEvent>().lambda() | 
|---|
|  |  |  | .in(CarEvent::getEventType,"771760131","771760130") | 
|---|
|  |  |  | .apply(" STR_TO_DATE(happen_time, '%Y-%m-%dT%H:%i:%s') > CURDATE() - INTERVAL 7 DAY  " ) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | //            List<CarEvent> carEventList = carEventMapper.selectList(new QueryWrapper<CarEvent>().lambda() | 
|---|
|  |  |  | //                    .in(CarEvent::getEventType,"771760131","771760130") | 
|---|
|  |  |  | //                    .apply(" STR_TO_DATE(happen_time, '%Y-%m-%dT%H:%i:%s') > CURDATE() - INTERVAL 7 DAY  " ) | 
|---|
|  |  |  | //            ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for (String days:weekDays) { | 
|---|
|  |  |  | InterestedListVO visitVO = new InterestedListVO(); | 
|---|
|  |  |  | visitVO.setName(days); | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(visitsList)){ | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(inoutRecordList)){ | 
|---|
|  |  |  | //处理访客人员数量 | 
|---|
|  |  |  | List<Visits> daysList = visitsList.stream().filter(i->Objects.nonNull(i.getStarttime())&&DateUtil.dateToString(i.getStarttime(),"yyyy-MM-dd").equals(days)).collect(Collectors.toList()); | 
|---|
|  |  |  | List<String> memberIds = daysList.stream().map(i->i.getMemberId().toString()).collect(Collectors.toList()); | 
|---|
|  |  |  | //                    List<Visits> daysList = visitsList.stream().filter(i->Objects.nonNull(i.getStarttime())&&DateUtil.dateToString(i.getStarttime(),"yyyy-MM-dd").equals(days)).collect(Collectors.toList()); | 
|---|
|  |  |  | //                    List<String> memberIds = daysList.stream().map(i->i.getMemberId().toString()).collect(Collectors.toList()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<String> memberIds  = inoutRecordList.stream().filter(i-> | 
|---|
|  |  |  | Objects.isNull(i.getCarCode())&& | 
|---|
|  |  |  | Objects.nonNull(i.getMemberPhone())&&DateUtil.dateToString(i.getTimeInfo(),"yyyy-MM-dd").equals(days) | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | .map(i->i.getMemberPhone()) | 
|---|
|  |  |  | .collect(Collectors.toList()); | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(memberIds)){ | 
|---|
|  |  |  | visitVO.setNum(new HashSet<String>(memberIds).size()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | visitVO.setName(days); | 
|---|
|  |  |  | InterestedListVO carVO = new InterestedListVO(); | 
|---|
|  |  |  | carVO.setNum(Constants.ZERO); | 
|---|
|  |  |  | carVO.setName(days); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(carEventList)){ | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(inoutRecordList)){ | 
|---|
|  |  |  | //处理访客人员数量 | 
|---|
|  |  |  | List<CarEvent> daysList = carEventList.stream().filter(i->StringUtils.isNotBlank(i.getHappenTime()) && i.getHappenTime().substring(0,10).equals(days)).collect(Collectors.toList()); | 
|---|
|  |  |  | List<String> carCodeList = daysList.stream().map(i->i.getPlateNos()).collect(Collectors.toList()); | 
|---|
|  |  |  | //                    List<CarEvent> daysList = carEventList.stream().filter(i->StringUtils.isNotBlank(i.getHappenTime()) && i.getHappenTime().substring(0,10).equals(days)).collect(Collectors.toList()); | 
|---|
|  |  |  | //                    List<String> carCodeList = daysList.stream().map(i->i.getPlateNos()).collect(Collectors.toList()); | 
|---|
|  |  |  | List<String> carCodeList  = inoutRecordList.stream().filter(i-> | 
|---|
|  |  |  | Objects.isNull(i.getCarCode())&& | 
|---|
|  |  |  | Objects.nonNull(i.getMemberPhone())&&DateUtil.dateToString(i.getTimeInfo(),"yyyy-MM-dd").equals(days) | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | .map(i->i.getMemberPhone()) | 
|---|
|  |  |  | .collect(Collectors.toList()); | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(carCodeList)){ | 
|---|
|  |  |  | carVO.setNum(new HashSet<String>(carCodeList).size()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | pcWorkPlatformDataVO.setWeekCarList(weekCarList); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<Company> companyList = companyMapper.selectList(new QueryWrapper<Company>().lambda() | 
|---|
|  |  |  | .eq(Company::getType,Constants.ZERO) | 
|---|
|  |  |  | .eq(Company::getIsdeleted,Constants.ZERO) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(companyList)){ | 
|---|
|  |  |  | List<Integer> companyIds = companyList.stream().map(i->i.getId()).collect(Collectors.toList()); | 
|---|
|  |  |  | List<Retention> retentionList = retentionMapper.selectList( | 
|---|
|  |  |  | new QueryWrapper<Retention>().lambda() | 
|---|
|  |  |  | .eq(Retention::getType,Constants.TWO) | 
|---|
|  |  |  | .in(Retention::getCompanyId,companyIds) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | for (Company company:companyList) { | 
|---|
|  |  |  | Integer count = retentionList.stream().filter(i->Constants.equalsInteger(i.getCompanyId(),company.getId())).collect(Collectors.toList()).size(); | 
|---|
|  |  |  | if(count>0){ | 
|---|
|  |  |  | InterestedListVO lw = new InterestedListVO(); | 
|---|
|  |  |  | lw.setNum(count); | 
|---|
|  |  |  | lw.setName(company.getName()); | 
|---|
|  |  |  | lwList.add(lw); | 
|---|
|  |  |  | List<Company>  lwCompanyList  = companyList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ZERO)).collect(Collectors.toList()); | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(lwCompanyList)){ | 
|---|
|  |  |  | List<Integer> lwCompanyIds = lwCompanyList.stream().map(i->i.getId()).collect(Collectors.toList()); | 
|---|
|  |  |  | List<Retention> retentionList = retentionMapper.selectList( | 
|---|
|  |  |  | new QueryWrapper<Retention>().lambda() | 
|---|
|  |  |  | .eq(Retention::getIsdeleted,Constants.ZERO) | 
|---|
|  |  |  | .eq(Retention::getType,Constants.FOUR) | 
|---|
|  |  |  | .in(Retention::getCompanyId,lwCompanyIds) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | for (Company company:lwCompanyList) { | 
|---|
|  |  |  | Integer count = retentionList.stream().filter(i->Constants.equalsInteger(i.getCompanyId(),company.getId())).collect(Collectors.toList()).size(); | 
|---|
|  |  |  | if(count>0){ | 
|---|
|  |  |  | InterestedListVO lw = new InterestedListVO(); | 
|---|
|  |  |  | lw.setNum(count); | 
|---|
|  |  |  | lw.setName(company.getName()); | 
|---|
|  |  |  | lwList.add(lw); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<Company>  internalCompanyList  = companyList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)).collect(Collectors.toList()); | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(internalCompanyList)){ | 
|---|
|  |  |  | List<Integer> internalCompanyIds = internalCompanyList.stream().map(i->i.getId()).collect(Collectors.toList()); | 
|---|
|  |  |  | List<Retention> retentionList = retentionMapper.selectList( | 
|---|
|  |  |  | new QueryWrapper<Retention>().lambda() | 
|---|
|  |  |  | .eq(Retention::getIsdeleted,Constants.ZERO) | 
|---|
|  |  |  | .eq(Retention::getType,Constants.TWO) | 
|---|
|  |  |  | .in(Retention::getCompanyId,internalCompanyIds) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | for (Company company:internalCompanyList) { | 
|---|
|  |  |  | Integer count = retentionList.stream().filter(i->Constants.equalsInteger(i.getCompanyId(),company.getId())).collect(Collectors.toList()).size(); | 
|---|
|  |  |  | if(count>0){ | 
|---|
|  |  |  | InterestedListVO lw = new InterestedListVO(); | 
|---|
|  |  |  | lw.setNum(count); | 
|---|
|  |  |  | lw.setName(company.getName()); | 
|---|
|  |  |  | internalList.add(lw); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | pcWorkPlatformDataVO.setLwList(lwList   ); | 
|---|
|  |  |  | pcWorkPlatformDataVO.setInternalList(internalList); | 
|---|
|  |  |  | pcWorkPlatformDataVO.setLwList(lwList); | 
|---|
|  |  |  | }else if(Constants.equalsInteger(queryType,Constants.THREE)) { | 
|---|
|  |  |  | if (Objects.isNull(loginUserInfo.getMemberId())) { | 
|---|
|  |  |  | pcWorkPlatformDataVO.setNoticesList(new ArrayList<>()); | 
|---|